{
  "openapi": "3.1.0",
  "info": {
    "title": "City and Community Events Calendar API",
    "description": "Aggregates upcoming city and community events from local government calendars. 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/community-events-calendar",
      "description": "Pre-launch: endpoints are not live yet and answer 503."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/events": {
      "get": {
        "summary": "List city and community events",
        "description": "Returns events aggregated from local government calendars for a city and date range.",
        "tags": [
          "community"
        ],
        "operationId": "community-events-calendar-get-events",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": true,
            "description": "City or council area to search for events.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Start of the date range in ISO 8601 date format (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "End of the date range in ISO 8601 date format (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events found.",
            "content": {
              "application/json": {
                "example": {
                  "city": "bristol",
                  "events": [
                    {
                      "name": "Harbourside Festival",
                      "start": "2026-10-11T10:00:00Z",
                      "venue": "Harbourside",
                      "description": "Street food and live music."
                    }
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": "string"
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "start": {
                            "type": "string"
                          },
                          "venue": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No events found for the city and date range."
          }
        }
      }
    }
  },
  "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."
      }
    }
  }
}
