{
  "openapi": "3.1.0",
  "info": {
    "title": "ProductionList Data API",
    "version": "1.0.0",
    "description": "The earliest structured feed of new US film & TV productions, by the Film & Television Industry Alliance. AI-assisted detection of projects entering development and pre-production — typically before public job postings.\n\n**Authentication:** every request needs an API key sent as `Authorization: Bearer pl_live_…`. Request access at https://www.productionlist.com/api.\n\n**No personal contact data:** v1 never returns crew or company emails/phones. Detection metadata and public credits only.\n\n**Data freshness** depends on your plan: Sandbox is delayed 30 days, Monitor 72 hours, Pipeline and above are real-time.\n\n**Support:** api@productionlist.com\n\n**Attribution:** responses carry `meta.attribution`. Unless your plan includes the white-label add-on, display the supplied credit wherever this data appears — the block includes ready-to-paste `text`, `url` and `html`. Check `meta.attribution.required` rather than hard-coding the badge: it flips to `false` the moment white-label is enabled on your key, so no code change is needed when you upgrade. To remove attribution, contact api@productionlist.com.",
    "contact": { "name": "ProductionList API", "url": "https://www.productionlist.com/api", "email": "api@productionlist.com" }
  },
  "servers": [{ "url": "https://api.productionlist.com", "description": "Production" }],
  "security": [{ "bearerAuth": [] }],
  "paths": {
    "/v1/productions": {
      "get": {
        "summary": "List & search production detections",
        "operationId": "listProductions",
        "parameters": [
          { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "Title search (substring, case-insensitive)." },
          { "name": "type", "in": "query", "schema": { "type": "string" }, "description": "Production type slug (see /v1/taxonomies)." },
          { "name": "status", "in": "query", "schema": { "type": "string" }, "description": "Detection status slug, e.g. casting, pre-production." },
          { "name": "stage", "in": "query", "schema": { "type": "string", "enum": ["in-pre-production", "in-production", "in-post-production", "completed"] } },
          { "name": "country", "in": "query", "schema": { "type": "string" } },
          { "name": "state", "in": "query", "schema": { "type": "string" } },
          { "name": "city", "in": "query", "schema": { "type": "string" } },
          { "name": "since", "in": "query", "schema": { "type": "string", "format": "date-time" }, "description": "Only detections first seen at/after this time (detected_at)." },
          { "name": "updated_since", "in": "query", "schema": { "type": "string", "format": "date-time" } },
          { "name": "page", "in": "query", "schema": { "type": "integer", "default": 1 } },
          { "name": "per_page", "in": "query", "schema": { "type": "integer", "default": 25, "maximum": 100 } }
        ],
        "responses": {
          "200": {
            "description": "A page of productions.",
            "content": { "application/json": { "schema": {
              "type": "object",
              "properties": {
                "data": { "type": "array", "items": { "$ref": "#/components/schemas/Production" } },
                "meta": { "$ref": "#/components/schemas/ListMeta" }
              }
            } } }
          },
          "401": { "$ref": "#/components/responses/Unauthorized" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/v1/productions/{id_or_slug}": {
      "get": {
        "summary": "Get a single production",
        "operationId": "getProduction",
        "parameters": [{ "name": "id_or_slug", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": {
          "200": { "description": "One production.", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Production" } } } } } },
          "404": { "description": "Not found at your plan's freshness." }
        }
      }
    },
    "/v1/productions/changes": {
      "get": {
        "summary": "Delta-sync feed (Pipeline+)",
        "description": "Ordered feed of `created` / `updated` events for CRM sync, driven by each production's last-modified time. Requires the Pipeline plan or above.\n\nStart with `?since=<ISO 8601 timestamp>`, then follow `next_cursor` until `has_more` is false; store the last cursor and resume from it on your next sync. Events are ordered by (occurred_at, production_id) with stable pagination — pass **exactly one** of `since` or `cursor`.\n\n`type` is `created` when the event is the record's first appearance, `updated` otherwise.\n\n**Not yet emitted:** `removed` events. A production that is unpublished or deleted simply stops appearing; a future revision adds `removed` without a contract change. Support: api@productionlist.com.",
        "operationId": "productionChanges",
        "parameters": [
          { "name": "since", "in": "query", "schema": { "type": "string", "format": "date-time" }, "description": "ISO 8601 timestamp to start from (first sync). Mutually exclusive with cursor." },
          { "name": "cursor", "in": "query", "schema": { "type": "string" }, "description": "Opaque next_cursor token from a previous response. Mutually exclusive with since." },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100, "maximum": 500 }, "description": "Max events per page." }
        ],
        "responses": {
          "200": {
            "description": "A page of change events.",
            "content": { "application/json": { "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "events": { "type": "array", "items": { "$ref": "#/components/schemas/ChangeEvent" } },
                    "next_cursor": { "type": ["string", "null"], "description": "Pass as ?cursor= on your next call. Non-null whenever this page contained events (even the final page), so it is always safe to store and resume from; null only when this page was empty — keep your previous cursor and poll again later." },
                    "has_more": { "type": "boolean" },
                    "notes": { "type": "string", "description": "Contract caveats, e.g. that 'removed' events are not yet emitted." }
                  }
                },
                "meta": { "type": "object", "properties": { "request_id": { "type": "string" } } }
              }
            } } }
          },
          "400": { "description": "Missing/invalid since or cursor (provide exactly one).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "403": { "description": "Plan below Pipeline. Upgrade at https://www.productionlist.com/api or contact api@productionlist.com.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/v1/companies": {
      "get": {
        "summary": "List production companies",
        "operationId": "listCompanies",
        "parameters": [
          { "name": "q", "in": "query", "schema": { "type": "string" } },
          { "name": "category", "in": "query", "schema": { "type": "string" } },
          { "name": "updated_since", "in": "query", "schema": { "type": "string", "format": "date-time" } },
          { "name": "page", "in": "query", "schema": { "type": "integer", "default": 1 } },
          { "name": "per_page", "in": "query", "schema": { "type": "integer", "default": 25, "maximum": 100 } }
        ],
        "responses": { "200": { "description": "A page of companies.", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Company" } }, "meta": { "$ref": "#/components/schemas/ListMeta" } } } } } } }
      }
    },
    "/v1/companies/{id_or_slug}": {
      "get": {
        "summary": "Get a single company",
        "operationId": "getCompany",
        "parameters": [{ "name": "id_or_slug", "in": "path", "required": true, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "One company.", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "$ref": "#/components/schemas/Company" } } } } } } }
      }
    },
    "/v1/taxonomies": {
      "get": {
        "summary": "Valid filter slugs",
        "operationId": "getTaxonomies",
        "responses": { "200": { "description": "Types, statuses, stages, categories." } }
      }
    },
    "/v1/weekly-edition": {"get": {"summary": "This week's Production List Weekly, ready to post", "operationId": "getWeeklyEdition", "description": "The current published weekly list as ready-made posts: a Reddit title and Markdown body with every title linked to its page, and a short LinkedIn post. Public fields only (title, stage, primary place). No API key required.", "security": [], "responses": {"200": {"description": "{ data: { monday, week_label, count, url, reddit: { title, markdown }, linkedin: { post, first_comment } } }"}, "404": {"description": "No weekly list is published yet."}}}}
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "pl_live_…" }
    },
    "responses": {
      "Unauthorized": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "RateLimited": { "description": "Rate limit exceeded; see Retry-After.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
    },
    "schemas": {
      "Production": {
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "slug": { "type": "string" },
          "title": { "type": "string" },
          "logline": { "type": ["string", "null"] },
          "stage": { "type": ["string", "null"], "enum": ["in-development", "in-pre-production", "in-production", "in-post-production", "completed", null], "description": "Canonical lifecycle stage slug (also the value accepted by the ?stage filter)." },
          "union_status": { "type": "string", "enum": ["union", "non-union", "unknown"], "description": "Union status; \"unknown\" until determined." },
          "poster_url": { "type": ["string", "null"], "description": "Public key-art / poster image URL, when available." },
          "synopsis": { "type": ["string", "null"], "description": "Pipeline+ only. Full plain-text synopsis (logline carries the short version)." },
          "types": { "type": "array", "items": { "type": "string" } },
          "locations": { "type": "array", "items": { "type": "object", "properties": { "city": { "type": ["string", "null"] }, "state": { "type": ["string", "null"] }, "country": { "type": ["string", "null"] } } } },
          "production_dates": { "type": "object", "properties": { "start": { "type": ["string", "null"] }, "end": { "type": ["string", "null"] }, "post_start": { "type": ["string", "null"] }, "post_end": { "type": ["string", "null"] } } },
          "detected_at": { "type": "string", "format": "date-time" },
          "updated_at": { "type": "string", "format": "date-time" },
          "url": { "type": "string" },
          "attached_people": { "type": "array", "description": "Pipeline+ only. Public profile fields & roles; never contact details (no emails/phones). Verified credits only: credits a crew member added to their own profile (self-reported) are excluded.", "items": { "type": "object", "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "role": { "type": ["string", "null"] }, "roles": { "type": "array", "items": { "type": "string" } }, "known_for": { "type": "array", "items": { "type": "string" } }, "imdb": { "type": ["string", "null"] }, "website": { "type": ["string", "null"] }, "location": { "type": ["string", "null"] }, "socials": { "type": "object", "properties": { "linkedin": { "type": ["string", "null"] }, "twitter": { "type": ["string", "null"] }, "instagram": { "type": ["string", "null"] } } }, "representation": { "type": ["string", "null"], "description": "Representation agency name (business only; agent/manager personal names are omitted)." } } } },
          "attached_companies": { "type": "array", "description": "Pipeline+ only.", "items": { "type": "object", "properties": { "name": { "type": "string" }, "slug": { "type": "string" }, "website": { "type": ["string", "null"] }, "socials": { "type": "object", "properties": { "linkedin": { "type": ["string", "null"] }, "twitter": { "type": ["string", "null"] }, "instagram": { "type": ["string", "null"] } } } } } }
        }
      },
      "Company": {
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "slug": { "type": "string" },
          "name": { "type": "string" },
          "description": { "type": ["string", "null"], "description": "Plain-text company description/bio." },
          "logo_url": { "type": ["string", "null"], "description": "Public company logo/image URL, when available." },
          "website": { "type": ["string", "null"] },
          "socials": { "type": "object", "properties": { "linkedin": { "type": ["string", "null"] }, "twitter": { "type": ["string", "null"] }, "instagram": { "type": ["string", "null"] }, "facebook": { "type": ["string", "null"] }, "imdb": { "type": ["string", "null"] } } },
          "categories": { "type": "array", "items": { "type": "string" } },
          "listed_at": { "type": ["string", "null"], "format": "date-time" },
          "updated_at": { "type": "string", "format": "date-time" },
          "url": { "type": "string" }
        }
      },
      "ChangeEvent": {
        "type": "object",
        "properties": {
          "type": { "type": "string", "enum": ["created", "updated"], "description": "'removed' is reserved but not yet emitted." },
          "production_id": { "type": "integer" },
          "occurred_at": { "type": "string", "format": "date-time" }
        }
      },
      "ListMeta": {
        "type": "object",
        "properties": {
          "page": { "type": "integer" },
          "per_page": { "type": "integer" },
          "total": { "type": ["integer", "null"] },
          "total_pages": { "type": ["integer", "null"] },
          "request_id": { "type": "string" }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" } } },
          "request_id": { "type": "string" }
        }
      }
    }
  }
}
