{
  "openapi": "3.1.0",
  "info": {
    "title": "Artificial Careers Observatory API",
    "version": "1.0.0",
    "summary": "Open, read-only access to frozen Observatory releases.",
    "description": "Read-only API for frozen Artificial Careers Observatory releases, country reviews, tool aggregates, pay references and release files. No authentication is required. Requests are limited to 60 per minute per client IP. Aggregated data are published under CC BY 4.0 where upstream terms permit; each release carries its own attribution and source conditions. Availability objective: 99.5% per calendar month; measured results are reported only when supported by a verifiable monitoring history. This is not a contractual SLA.",
    "termsOfService": "https://artificial.careers/terms",
    "contact": {
      "name": "Artificial Careers — L’Observatoire",
      "url": "https://artificial.careers/observatory",
      "email": "hello@artificial.careers"
    },
    "license": {
      "name": "Creative Commons Attribution 4.0 International (CC BY 4.0), subject to upstream terms",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "externalDocs": {
    "description": "API guide and availability notes",
    "url": "https://artificial.careers/developers/observatory-api"
  },
  "servers": [
    {
      "url": "https://artificial.careers/api/observatory/v1",
      "description": "Production API"
    }
  ],
  "tags": [
    { "name": "Releases", "description": "Frozen report editions and release files." },
    { "name": "Analysis", "description": "Aggregated cohorts, tool mentions and pay context." },
    { "name": "Country review", "description": "Compact country-level summaries for reuse." }
  ],
  "paths": {
    "/releases": {
      "get": {
        "operationId": "listReleases",
        "tags": ["Releases"],
        "summary": "List published releases",
        "description": "Returns published releases, newest first. Use editionCountry only to select a separately published country edition. Country filters on the global release use the country parameter on analysis endpoints.",
        "parameters": [
          { "$ref": "#/components/parameters/EditionCountry" }
        ],
        "responses": {
          "200": {
            "description": "Release index.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReleaseIndex" } } }
          },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/benchmark": {
      "get": {
        "operationId": "getPayBenchmark",
        "tags": ["Analysis"],
        "summary": "Look up a frozen advertised-pay cohort",
        "description": "Returns an exact-role, annual-pay cohort from one frozen release. Missing or sparse selections return status=insufficient; the API never substitutes an estimate or a wider population.",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseQuery" },
          { "$ref": "#/components/parameters/Role" },
          { "$ref": "#/components/parameters/Seniority" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/City" },
          { "$ref": "#/components/parameters/Contract" },
          { "$ref": "#/components/parameters/Currency" },
          { "$ref": "#/components/parameters/Period" },
          { "$ref": "#/components/parameters/PayBasis" }
        ],
        "responses": {
          "200": { "description": "Matching cohort or an explicit insufficient-data result.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}": {
      "get": {
        "operationId": "getRelease",
        "tags": ["Releases"],
        "summary": "Get a release manifest and report data",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseSelector" },
          { "$ref": "#/components/parameters/EditionCountry" }
        ],
        "responses": {
          "200": { "description": "Frozen release JSON, with source and license links.", "headers": { "Link": { "description": "Citation and license relations.", "schema": { "type": "string" } }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}/tools": {
      "get": {
        "operationId": "getToolMentions",
        "tags": ["Analysis"],
        "summary": "Filter aggregated tool mentions",
        "description": "Returns aggregate job-ad counts, employer counts, shares and intervals. Context values are required, preferred, workflow, selling, restriction or incidental; only qualifying contexts are included in headline figures. Company background and promotion are excluded.",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseSelector" },
          { "$ref": "#/components/parameters/EditionCountry" },
          { "$ref": "#/components/parameters/Role" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/Seniority" },
          { "$ref": "#/components/parameters/EmployerType" },
          { "$ref": "#/components/parameters/AiStatus" },
          { "$ref": "#/components/parameters/Tool" },
          { "$ref": "#/components/parameters/MentionContext" }
        ],
        "responses": {
          "200": { "description": "Filtered aggregates and cohort denominator.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}/cohorts": {
      "get": {
        "operationId": "getCohorts",
        "tags": ["Analysis"],
        "summary": "Get salary and population cohorts",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseSelector" },
          { "$ref": "#/components/parameters/EditionCountry" },
          { "$ref": "#/components/parameters/Role" },
          { "$ref": "#/components/parameters/Seniority" },
          { "$ref": "#/components/parameters/Country" },
          { "$ref": "#/components/parameters/City" },
          { "$ref": "#/components/parameters/Contract" },
          { "$ref": "#/components/parameters/Currency" },
          { "$ref": "#/components/parameters/Period" },
          { "$ref": "#/components/parameters/PayBasis" }
        ],
        "responses": {
          "200": { "description": "Cohort selection with sample counts and exclusions.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}/review": {
      "get": {
        "operationId": "getCountryReview",
        "tags": ["Country review"],
        "summary": "Get a compact country summary",
        "description": "JSON or CSV. A named-country vacancy may also appear in another country edition when the source ad names both locations; country totals can overlap.",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseSelector" },
          { "$ref": "#/components/parameters/EditionCountry" },
          { "$ref": "#/components/parameters/ReviewCountry" },
          { "$ref": "#/components/parameters/ReviewFormat" }
        ],
        "responses": {
          "200": { "description": "Country review in JSON or CSV.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } }, "text/csv": { "schema": { "type": "string" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}/translations": {
      "get": {
        "operationId": "getTranslations",
        "tags": ["Releases"],
        "summary": "Check available translations",
        "parameters": [{ "$ref": "#/components/parameters/ReleaseSelector" }],
        "responses": {
          "200": { "description": "Language availability and translated release files.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}/country-pay": {
      "get": {
        "operationId": "getCountryPayReference",
        "tags": ["Country review"],
        "summary": "Get a national annual-pay reference",
        "description": "Official employee pay and advertised job pay remain separate populations. This context does not replace the confirmed-pay role benchmark.",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseSelector" },
          { "$ref": "#/components/parameters/EditionCountry" },
          { "$ref": "#/components/parameters/RequiredCountry" }
        ],
        "responses": {
          "200": { "description": "National pay reference and its population notes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}/context": {
      "get": {
        "operationId": "getOfficialContext",
        "tags": ["Country review"],
        "summary": "Get official country context",
        "description": "Frozen references from official sources retain each source's own year, population and method. They do not alter Artificial Careers vacancy counts or salary eligibility.",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseSelector" },
          { "$ref": "#/components/parameters/EditionCountry" },
          { "$ref": "#/components/parameters/ContextCountry" }
        ],
        "responses": {
          "200": { "description": "Official context observations and source availability.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectResponse" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    },
    "/releases/{releaseSelector}/files/{filePath}": {
      "get": {
        "operationId": "downloadReleaseFile",
        "tags": ["Releases"],
        "summary": "Download a file from a release",
        "description": "Use a file name listed in that release's resources array. Encode path separators when needed. Published immutable resources include an ETag and long-lived cache policy.",
        "parameters": [
          { "$ref": "#/components/parameters/ReleaseSelector" },
          { "$ref": "#/components/parameters/FilePath" }
        ],
        "responses": {
          "200": { "description": "Release resource bytes. Content type depends on the file format.", "headers": { "ETag": { "description": "SHA-256 content hash in quotes.", "schema": { "type": "string" } }, "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" } }, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } }, "application/pdf": { "schema": { "type": "string", "format": "binary" } }, "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/json": { "schema": { "type": "string", "format": "binary" } } } },
          "404": { "$ref": "#/components/responses/NotFound" },
          "429": { "$ref": "#/components/responses/RateLimited" },
          "503": { "$ref": "#/components/responses/Unavailable" }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "ReleaseSelector": { "name": "releaseSelector", "in": "path", "required": true, "description": "Release ID, latest, current, YYYY or YYYY-MM. Country-qualified selectors work only when a separate country edition has been published.", "schema": { "type": "string", "example": "2026" } },
      "EditionCountry": { "name": "editionCountry", "in": "query", "required": false, "description": "Select a separately published global or country edition. A country filter on data inside a global release uses the country parameter; editionCountry does not create a country-specific release.", "schema": { "type": "string", "pattern": "^(global|[A-Z]{2})$", "example": "global" } },
      "ReleaseQuery": { "name": "release", "in": "query", "required": false, "description": "Frozen release selector. Defaults to latest.", "schema": { "type": "string", "default": "latest", "example": "2026" } },
      "Role": { "name": "role", "in": "query", "required": false, "description": "Occupation filter or benchmark occupation slug. Use all for no filter where supported.", "schema": { "type": "string", "default": "all", "example": "product_manager" } },
      "Seniority": { "name": "seniority", "in": "query", "required": false, "description": "Seniority group; use all for no filter where supported.", "schema": { "type": "string", "default": "all", "example": "senior" } },
      "Country": { "name": "country", "in": "query", "required": false, "description": "ISO 3166-1 alpha-2 code or all where supported.", "schema": { "type": "string", "default": "all", "pattern": "^(all|[A-Z]{2})$", "example": "FR" } },
      "RequiredCountry": { "name": "country", "in": "query", "required": true, "description": "ISO 3166-1 alpha-2 code.", "schema": { "type": "string", "pattern": "^[A-Z]{2}$", "example": "FR" } },
      "ContextCountry": { "name": "country", "in": "query", "required": false, "description": "ISO code, or all for the global reference bundle.", "schema": { "type": "string", "default": "all", "pattern": "^(all|[A-Z]{2})$", "example": "FR" } },
      "ReviewCountry": { "name": "country", "in": "query", "required": false, "description": "ISO code or all. Defaults to all.", "schema": { "type": "string", "default": "all", "pattern": "^(all|[A-Z]{2})$", "example": "FR" } },
      "ReviewFormat": { "name": "format", "in": "query", "required": false, "description": "Review output format.", "schema": { "type": "string", "enum": ["json", "csv"], "default": "json" } },
      "City": { "name": "city", "in": "query", "required": false, "description": "City slug or all. Used by exact-pay benchmark selections.", "schema": { "type": "string", "default": "all", "example": "paris" } },
      "Contract": { "name": "contract", "in": "query", "required": false, "description": "Contract group. Defaults to full_time.", "schema": { "type": "string", "default": "full_time", "example": "full_time" } },
      "Currency": { "name": "currency", "in": "query", "required": false, "description": "ISO 4217 currency code. Required for an exact-pay benchmark.", "schema": { "type": "string", "pattern": "^[A-Z]{3}$", "example": "EUR" } },
      "Period": { "name": "period", "in": "query", "required": false, "description": "Pay cadence. Annual API values use year.", "schema": { "type": "string", "default": "year", "example": "year" } },
      "PayBasis": { "name": "basis", "in": "query", "required": false, "description": "Pay basis. Defaults to base.", "schema": { "type": "string", "default": "base", "example": "base" } },
      "EmployerType": { "name": "employerType", "in": "query", "required": false, "description": "Employer classification filter.", "schema": { "type": "string", "default": "all", "example": "ai_specialist" } },
      "AiStatus": { "name": "aiStatus", "in": "query", "required": false, "description": "AI review cohort. outside_ai means not classified as AI in accepted reviews; it does not prove a job is non-AI.", "schema": { "type": "string", "enum": ["all", "reviewed_ai", "outside_ai"], "default": "all" } },
      "Tool": { "name": "tool", "in": "query", "required": false, "description": "Tool family ID from the release taxonomy.", "schema": { "type": "string", "example": "chatgpt_openai" } },
      "MentionContext": { "name": "context", "in": "query", "required": false, "description": "Mention context.", "schema": { "type": "string", "enum": ["required", "preferred", "workflow", "selling", "restriction", "incidental"] } },
      "FilePath": { "name": "filePath", "in": "path", "required": true, "description": "Resource name from the release manifest, such as report.pdf or figures/payroll-reference.csv. Encode slash characters as %2F.", "schema": { "type": "string", "example": "report.pdf" } }
    },
    "headers": {
      "RateLimitLimit": { "description": "Maximum requests allowed in the current 60-second window per client IP.", "schema": { "type": "integer", "example": 60 } },
      "RateLimitPolicy": { "description": "Fixed-window rate policy.", "schema": { "type": "string", "example": "60;w=60" } },
      "RetryAfter": { "description": "On HTTP 429, seconds until the current fixed window resets.", "schema": { "type": "integer", "example": 18 } }
    },
    "responses": {
      "BadRequest": { "description": "Invalid country code or query parameter.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "NotFound": { "description": "Release, country evidence or resource not found in this frozen edition.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
      "RateLimited": { "description": "Request limit exceeded. Wait for Retry-After before retrying.", "headers": { "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" }, "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" }, "Retry-After": { "$ref": "#/components/headers/RetryAfter" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "error": "Observatory API rate limit exceeded" } } } },
      "Unavailable": { "description": "Frozen release temporarily unavailable; retry later.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "error": "Observatory release temporarily unavailable", "retryable": true } } } }
    },
    "schemas": {
      "ReleaseIndex": { "type": "object", "required": ["schemaVersion", "releases"], "properties": { "schemaVersion": { "type": "string", "example": "1.0.0" }, "releases": { "type": "array", "items": { "$ref": "#/components/schemas/ReleaseSummary" } } }, "additionalProperties": true },
      "ReleaseSummary": { "type": "object", "required": ["id", "month", "generatedAt", "hash", "status"], "properties": { "id": { "type": "string", "example": "2026-annual-8dab22883582" }, "month": { "type": "string", "example": "2026-10" }, "periodKey": { "type": "string", "example": "2026" }, "periodicity": { "type": "string", "enum": ["monthly", "annual"] }, "generatedAt": { "type": "string", "format": "date-time" }, "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "status": { "type": "string", "example": "published" }, "countryISO2": { "type": "string", "pattern": "^[A-Z]{2}$" }, "jobs": { "type": "integer", "minimum": 0 }, "employers": { "type": "integer", "minimum": 0 } }, "additionalProperties": true },
      "ObjectResponse": { "type": "object", "additionalProperties": true },
      "Error": { "type": "object", "required": ["error"], "properties": { "error": { "type": "string" }, "retryable": { "type": "boolean" } }, "additionalProperties": true }
    }
  }
}
