{
  "openapi": "3.1.0",
  "info": {
    "title": "EveryScreening API",
    "version": "1.0.0",
    "summary": "Movie showtimes worldwide: every screening, theater, and film, with seat availability and ticket links.",
    "description": "Showtimes from movie theaters in 160 countries, from now up to 120 days ahead. Each screening has its start time with the theater's UTC offset, format and language version codes (with the theater's own wording in raw), a seat availability level and a ticket link.\n\nRecords: each screening, film, or theater in a response counts as one (X-Records header). Errors, empty answers, 304s and /countries, /cities, /chains are free.\n\nIDs are stable and carry a type prefix: sh_ screening, fm_ film, cn_ cinema, ct_ city, ch_ chain, wh_ webhook.\n\nDocumentation: https://everyscreening.com/docs.html. For AI assistants there is also an MCP server at https://mcp.everyscreening.com/mcp.",
    "contact": {
      "url": "https://everyscreening.com/"
    },
    "termsOfService": "https://everyscreening.com/"
  },
  "servers": [
    {
      "url": "https://api.everyscreening.com/v1"
    }
  ],
  "security": [
    {
      "ApiKey": []
    },
    {
      "Bearer": []
    }
  ],
  "externalDocs": {
    "url": "https://everyscreening.com/docs.html"
  },
  "tags": [
    {
      "name": "Showtimes"
    },
    {
      "name": "Films"
    },
    {
      "name": "Cinemas"
    },
    {
      "name": "Places",
      "description": "Reference lists; free of records."
    },
    {
      "name": "Files",
      "description": "Whole countries as gzipped files, rebuilt at 06:00 and 18:00 UTC."
    },
    {
      "name": "Webhooks",
      "description": "Added and canceled screenings pushed to your URL."
    }
  ],
  "paths": {
    "/showtimes": {
      "get": {
        "tags": [
          "Showtimes"
        ],
        "operationId": "listShowtimes",
        "summary": "Screenings in a place or of a film",
        "description": "Ordered by day, cinema and start time. Give a place (cinema_id, city_id, chain_id or lat+lon) or a film (film_id, or id_type+id) plus country. With changed_since, only screenings added or changed after that time, plus a removed list (the change feed). A page can hold fewer than limit items when format, version or language filters remove rows: follow next_cursor until it is null.",
        "parameters": [
          {
            "name": "city_id",
            "in": "query",
            "required": false,
            "description": "A city id (ct_…) from /cities.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cinema_id",
            "in": "query",
            "required": false,
            "description": "One cinema id (cn_…), or up to 100 comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain_id",
            "in": "query",
            "required": false,
            "description": "A chain id (ch_…) from /chains.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Latitude of a point (with lon).",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Longitude of a point (with lat).",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "description": "Radius around lat/lon in km.",
            "schema": {
              "type": "number",
              "default": 30,
              "maximum": 200
            }
          },
          {
            "name": "film_id",
            "in": "query",
            "required": false,
            "description": "One film id (fm_…). With a film, add country instead of a place.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id_type",
            "in": "query",
            "required": false,
            "description": "Instead of film_id: an outside catalog, e.g. imdb, tmdb, rentrak, wikidata (see docs for all 67).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "The film's id in id_type, e.g. tt32243339.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Two-letter country code, e.g. pl.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "description": "First program day (the theater's local date). Default today.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "description": "Last program day. Default today + 6; at most 31 days per request.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Only screenings with all these format codes, comma-separated, e.g. imax,3d.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "description": "Language version.",
            "schema": {
              "type": "string",
              "enum": [
                "original",
                "dubbed",
                "subtitled",
                "voice_over"
              ]
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Audio language, ISO 639-1, e.g. en.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "changed_since",
            "in": "query",
            "required": false,
            "description": "Only what changed after this UTC time; adds removed.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "include_started",
            "in": "query",
            "required": false,
            "description": "true to include screenings that have already started.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 500,
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page, with the same other parameters.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Showtime"
                      }
                    },
                    "removed": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RemovedShowtime"
                      },
                      "description": "With changed_since: screenings withdrawn since then."
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as cursor; null on the last page."
                    },
                    "total_estimate": {
                      "type": "integer",
                      "description": "Approximate number of matching screenings."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/showtimes/{id}": {
      "get": {
        "tags": [
          "Showtimes"
        ],
        "operationId": "getShowtime",
        "summary": "One screening (also a canceled one)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Screening id (sh_…).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Showtime"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/films": {
      "get": {
        "tags": [
          "Films"
        ],
        "operationId": "listFilms",
        "summary": "Films playing in a place, or a title search",
        "description": "Most screenings first. Titles match the local, original and English title.",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Two-letter country code, e.g. pl.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            }
          },
          {
            "name": "city_id",
            "in": "query",
            "required": false,
            "description": "A city id (ct_…) from /cities.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cinema_id",
            "in": "query",
            "required": false,
            "description": "One cinema.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search by name or title; accents optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "upcoming",
            "in": "query",
            "required": false,
            "description": "true for films released later or on presale only.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "release_from",
            "in": "query",
            "required": false,
            "description": "Films released on or after this day.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of the titles, e.g. en.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "external_ids",
            "in": "query",
            "required": false,
            "description": "Extra film catalogs to include in external_ids, comma-separated (e.g. letterboxd,rotten_tomatoes), or all. Default: imdb, tmdb, rentrak, wikidata.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 500,
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page, with the same other parameters.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Film"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of matching items."
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as cursor for the next page; null on the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/films/lookup": {
      "get": {
        "tags": [
          "Films"
        ],
        "operationId": "lookupFilm",
        "summary": "Our film for an outside id",
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "required": true,
            "description": "imdb, tmdb, rentrak, wikidata or a local catalog.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "The id in that catalog.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "external_ids",
            "in": "query",
            "required": false,
            "description": "Extra film catalogs to include in external_ids, comma-separated (e.g. letterboxd,rotten_tomatoes), or all. Default: imdb, tmdb, rentrak, wikidata.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Film"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/films/{id}": {
      "get": {
        "tags": [
          "Films"
        ],
        "operationId": "getFilm",
        "summary": "One film",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Film id (fm_…).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Adds the release date and screenings in that country.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of the titles, e.g. en.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "external_ids",
            "in": "query",
            "required": false,
            "description": "Extra film catalogs to include in external_ids, comma-separated (e.g. letterboxd,rotten_tomatoes), or all. Default: imdb, tmdb, rentrak, wikidata.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Film"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cinemas": {
      "get": {
        "tags": [
          "Cinemas"
        ],
        "operationId": "listCinemas",
        "summary": "Movie theaters in a place, near a point, or by name",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Two-letter country code, e.g. pl.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            }
          },
          {
            "name": "city_id",
            "in": "query",
            "required": false,
            "description": "A city id (ct_…) from /cities.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chain_id",
            "in": "query",
            "required": false,
            "description": "A chain id (ch_…) from /chains.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Latitude of a point (with lon).",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "description": "Longitude of a point (with lat).",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "description": "Radius around lat/lon in km.",
            "schema": {
              "type": "number",
              "default": 30,
              "maximum": 200
            }
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Up to 100 cinema ids, comma-separated.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search by name or title; accents optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 500,
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page, with the same other parameters.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Cinema"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of matching items."
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as cursor for the next page; null on the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cinemas/{id}": {
      "get": {
        "tags": [
          "Cinemas"
        ],
        "operationId": "getCinema",
        "summary": "One cinema",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Cinema id (cn_…).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cinema"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/countries": {
      "get": {
        "tags": [
          "Places"
        ],
        "operationId": "listCountries",
        "summary": "Countries with their number of cinemas",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Country"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of matching items."
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as cursor for the next page; null on the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/cities": {
      "get": {
        "tags": [
          "Places"
        ],
        "operationId": "listCities",
        "summary": "Cities of a country",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "Two-letter country code, e.g. pl.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search by name or title; accents optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 500,
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page, with the same other parameters.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/City"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of matching items."
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as cursor for the next page; null on the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/chains": {
      "get": {
        "tags": [
          "Places"
        ],
        "operationId": "listChains",
        "summary": "Theater chains of a country",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "Two-letter country code, e.g. pl.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search by name or title; accents optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Items per page.",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 500,
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "next_cursor from the previous page, with the same other parameters.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Chain"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of matching items."
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as cursor for the next page; null on the last page."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/files": {
      "get": {
        "tags": [
          "Files"
        ],
        "operationId": "listFiles",
        "summary": "Data files of the countries on your file list",
        "description": "Plans Starter, Pro and Scale. Downloads do not count records.",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Only this country.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "history",
            "in": "query",
            "required": false,
            "description": "true lists every run still kept (the last 14).",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DataFile"
                      }
                    },
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "runs_utc": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "next_run": {
                      "type": "string",
                      "description": "Next rebuild, UTC.",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/files/{name}": {
      "get": {
        "tags": [
          "Files"
        ],
        "operationId": "downloadFile",
        "summary": "Download one file (gzip; Range and If-Modified-Since work)",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "File name from /files, e.g. pl_2026-12-06T06_showtimes.jsonl.gz.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "application/gzip": {
                "schema": {
                  "type": "string",
                  "contentEncoding": "binary"
                }
              }
            }
          },
          "206": {
            "description": "Part of the file (Range)"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhooks",
        "summary": "Your webhooks with their delivery status",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "description": "Number of webhooks."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "createWebhook",
        "summary": "Register a webhook",
        "description": "We POST added and canceled screenings in the scope, up to 500 changes a request, signed with X-EveryScreening-Signature: t=<unix>,v1=<hex HMAC-SHA256 of t + \".\" + body with the secret>. Reply 2xx within 15 s; failures are retried with backoff for 24 hours, then the webhook is switched off. Deliveries come from Cloudflare's network, not a fixed IP. At most 10 per account. Each added screening delivered is one record; cancellations are free.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created; secret is shown only here",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "getWebhook",
        "summary": "One webhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Webhook id (wh_…).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "deleteWebhook",
        "summary": "Delete a webhook and its queue",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Webhook id (wh_…).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "testWebhook",
        "summary": "Send a ping now and report what your server answered",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Webhook id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "Your server answered 2xx."
                    },
                    "status": {
                      "type": "integer",
                      "description": "Its HTTP status (0 = no answer)."
                    },
                    "error": {
                      "type": "string",
                      "description": "Why it failed."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/webhooks/{id}/enable": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "enableWebhook",
        "summary": "Switch a webhook back on and retry now",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Webhook id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Your API key from the account panel."
      },
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "The same API key as Authorization: Bearer <key>."
      }
    },
    "responses": {
      "Error": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Machine-readable code",
                "examples": [
                  "invalid_parameter",
                  "missing_api_key",
                  "invalid_api_key",
                  "insufficient_balance",
                  "out_of_quota",
                  "trial_ended",
                  "payment_required",
                  "country_not_allowed",
                  "not_found",
                  "rate_limited",
                  "temporarily_unavailable"
                ]
              },
              "message": {
                "type": "string",
                "description": "What to fix."
              }
            }
          }
        }
      },
      "Format": {
        "type": "object",
        "properties": {
          "dimension": {
            "type": "string",
            "description": "2d or 3d"
          },
          "technologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "e.g. imax, 4dx, screenx, dolby_cinema, dolby_atmos, laser, film_70mm"
          },
          "experiences": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "e.g. vip, recliner, kids"
          }
        }
      },
      "Version": {
        "type": "object",
        "description": "Parts may be missing when the theater does not say.",
        "properties": {
          "type": {
            "type": "string",
            "description": "original, dubbed, subtitled or voice_over"
          },
          "audio_language": {
            "type": "string",
            "description": "ISO 639-1"
          },
          "subtitle_language": {
            "type": "string",
            "description": "ISO 639-1"
          }
        }
      },
      "Availability": {
        "type": "object",
        "properties": {
          "level": {
            "type": "string",
            "enum": [
              "plenty",
              "filling",
              "almost_full",
              "sold_out",
              "unknown"
            ],
            "description": "plenty < half sold; filling ≥ half; almost_full ≥ 85% or ≤ 10 seats left; unknown = no numbered seats online or the reading is too old."
          },
          "read_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When we last read the seats (UTC).",
            "format": "date-time"
          }
        }
      },
      "Showtime": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable screening id (sh_…)"
          },
          "film_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Film id; null while the theater's title is not matched to a film (see raw.film_title)"
          },
          "cinema_id": {
            "type": "string",
            "description": "Cinema id"
          },
          "starts_at": {
            "type": "string",
            "description": "Start time with the theater's UTC offset",
            "format": "date-time"
          },
          "date": {
            "type": "string",
            "description": "Program day, the theater's local date",
            "format": "date"
          },
          "auditorium": {
            "type": [
              "string",
              "null"
            ],
            "description": "Screen name as the theater gives it"
          },
          "format": {
            "$ref": "#/components/schemas/Format"
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "accessibility": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "closed_captions, open_captions, audio_description, hearing_impaired, wheelchair"
          },
          "raw": {
            "type": "object",
            "description": "Exactly what the theater published",
            "properties": {
              "print_type": {
                "type": "string",
                "description": ""
              },
              "speaking_type": {
                "type": "string",
                "description": ""
              },
              "film_title": {
                "type": "string",
                "description": ""
              }
            }
          },
          "booking_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Where to buy tickets"
          },
          "booking_url_kind": {
            "type": "string",
            "enum": [
              "deep",
              "cinema",
              "none"
            ],
            "description": "deep = this screening; cinema = the theater's site"
          },
          "booking_target": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "seats",
              "show",
              "programme",
              "website"
            ],
            "description": "What the link opens"
          },
          "availability": {
            "$ref": "#/components/schemas/Availability"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "cancelled"
            ]
          },
          "updated_at": {
            "type": "string",
            "description": "Last change (UTC)",
            "format": "date-time"
          }
        }
      },
      "RemovedShowtime": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": ""
          },
          "cinema_id": {
            "type": "string",
            "description": ""
          },
          "date": {
            "type": "string",
            "description": "",
            "format": "date"
          },
          "starts_at": {
            "type": "string",
            "description": "",
            "format": "date-time"
          }
        }
      },
      "Film": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable film id (fm_…)"
          },
          "title": {
            "type": "string",
            "description": "The title the country's theaters use; without a country, the international title"
          },
          "original_title": {
            "type": "string",
            "description": "Title in the film's own language"
          },
          "international_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "English (international) title"
          },
          "year": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Production year"
          },
          "release_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Release date in the country",
            "format": "date"
          },
          "genres": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "original_language": {
            "type": [
              "string",
              "null"
            ],
            "description": "Language code"
          },
          "poster_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Poster image"
          },
          "external_ids": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Ids in other catalogs: imdb, tmdb, rentrak, wikidata by default; see the external_ids parameter"
          },
          "showtimes": {
            "type": "object",
            "description": "In a place",
            "properties": {
              "first_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "",
                "format": "date"
              },
              "last_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "",
                "format": "date"
              },
              "cinemas": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": ""
              },
              "showtimes_next_7_days": {
                "type": "integer",
                "description": ""
              },
              "now_playing": {
                "type": "boolean",
                "description": ""
              }
            }
          }
        }
      },
      "Cinema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable cinema id (cn_…)"
          },
          "name": {
            "type": "string",
            "description": ""
          },
          "chain_id": {
            "type": [
              "string",
              "null"
            ],
            "description": ""
          },
          "chain_name": {
            "type": [
              "string",
              "null"
            ],
            "description": ""
          },
          "country": {
            "type": "string",
            "description": ""
          },
          "city_id": {
            "type": "string",
            "description": ""
          },
          "city": {
            "type": "string",
            "description": ""
          },
          "street": {
            "type": "string",
            "description": ""
          },
          "zipcode": {
            "type": "string",
            "description": ""
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "lat": {
                "type": "number",
                "description": ""
              },
              "lon": {
                "type": "number",
                "description": ""
              }
            }
          },
          "time_zone": {
            "type": "string",
            "description": "IANA time zone, e.g. Europe/Warsaw"
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cinema's own site"
          },
          "screens": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of screens, where known"
          }
        }
      },
      "Country": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Two-letter code"
          },
          "name": {
            "type": "string",
            "description": ""
          },
          "time_zone": {
            "type": "string",
            "description": "Main IANA time zone"
          },
          "cinemas": {
            "type": "integer",
            "description": ""
          }
        }
      },
      "City": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ct_…"
          },
          "name": {
            "type": "string",
            "description": ""
          },
          "country": {
            "type": "string",
            "description": ""
          },
          "location": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "lat": {
                "type": "number",
                "description": ""
              },
              "lon": {
                "type": "number",
                "description": ""
              }
            }
          },
          "cinemas": {
            "type": "integer",
            "description": ""
          }
        }
      },
      "Chain": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ch_…"
          },
          "name": {
            "type": "string",
            "description": ""
          },
          "country": {
            "type": "string",
            "description": ""
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "description": ""
          },
          "cinemas": {
            "type": "integer",
            "description": ""
          }
        }
      },
      "DataFile": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "description": ""
          },
          "name": {
            "type": "string",
            "description": "File name"
          },
          "file": {
            "type": "string",
            "description": "showtimes.jsonl, showtimes.csv, cinemas.jsonl or films.jsonl"
          },
          "run": {
            "type": "string",
            "description": "Build time (UTC)",
            "format": "date-time"
          },
          "size": {
            "type": "integer",
            "description": "Bytes"
          },
          "url": {
            "type": "string",
            "description": "Download URL"
          }
        }
      },
      "WebhookScope": {
        "type": "object",
        "description": "A screening is sent when it matches every field given; within a field, any value.",
        "properties": {
          "country": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "city_id": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "chain_id": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cinema_id": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "film_id": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "WebhookInput": {
        "type": "object",
        "required": [
          "url"
        ],
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "description": "https URL with a host name (no IP address), port 443 or 8443"
          },
          "country": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "city_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "chain_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "cinema_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "film_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "days": {
            "type": "integer",
            "description": "How far ahead, 1-124",
            "default": 31,
            "minimum": 1,
            "maximum": 124
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "showtime.added",
                "showtime.cancelled"
              ]
            }
          }
        }
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "wh_…"
          },
          "url": {
            "type": "string",
            "description": ""
          },
          "scope": {
            "$ref": "#/components/schemas/WebhookScope"
          },
          "scope_labels": {
            "$ref": "#/components/schemas/WebhookScope"
          },
          "days": {
            "type": "integer",
            "description": ""
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "active": {
            "type": "boolean",
            "description": ""
          },
          "disabled_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "e.g. failing_for_24_hours, key_revoked"
          },
          "failures": {
            "type": "integer",
            "description": "Failed deliveries in a row"
          },
          "last_delivery_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "",
            "format": "date-time"
          },
          "last_status": {
            "type": [
              "integer",
              "null"
            ],
            "description": ""
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ],
            "description": ""
          },
          "pending": {
            "type": "integer",
            "description": "Changes waiting in the queue"
          },
          "created_at": {
            "type": "string",
            "description": "",
            "format": "date-time"
          },
          "secret": {
            "type": "string",
            "description": "Signing secret; only in the answer that creates the webhook"
          }
        }
      }
    }
  }
}
