{
  "openapi": "3.1.0",
  "info": {
    "title": "Restaurant Health Inspection Scores by Zip API",
    "description": "Returns restaurant health inspection grades, violations and history for a restaurant name or zip code. Pre-launch design; endpoints are not live yet.",
    "version": "0.1.0",
    "x-planned-pricing": {
      "model": "free tier for evaluation, paid tiers by volume",
      "status": "planned; nothing charged before launch"
    }
  },
  "servers": [
    {
      "url": "https://openapiregistry.com/api/v1/restaurant-health-score",
      "description": "Pre-launch: endpoints are not live yet and answer 503."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/inspections": {
      "get": {
        "summary": "Look up restaurant health inspections",
        "description": "Returns inspection grades, violations and history for a restaurant name or zip code.",
        "tags": [
          "health/safety"
        ],
        "operationId": "restaurant-health-score-get-inspections",
        "parameters": [
          {
            "name": "zip",
            "in": "query",
            "required": false,
            "description": "Zip code to search for restaurants in.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Restaurant name to look up.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching inspections returned.",
            "content": {
              "application/json": {
                "example": {
                  "restaurants": [
                    {
                      "name": "Example Diner",
                      "grade": "A",
                      "violations": 2
                    }
                  ]
                },
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No inspections found for the query."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Planned for launch: an API key issued on request. Free tier for evaluation, paid tiers by volume; nothing is charged before launch."
      }
    }
  }
}
