{
  "openapi": "3.0.3",
  "info": {
    "title": "AskAniela Labeler and Search Intent API",
    "version": "0.3.22.122",
    "description": "Label pages and texts with IAB Content Taxonomy 3.1 and Google Content Categories v2, and get search intent reports for phrases in a chosen market.",
    "x-long-description": "Two APIs in one: the **Labeler** tells you what a page or a text is about, and **Search Intent** tells you what people\nexpect when they search for a phrase.\n\n## Labeler\n\n- Send a text, page HTML you already have, or a URL we fetch. You get categories from IAB Content Taxonomy 3.1\n  (`iab`) and/or Google Content Categories v2 (`google`).\n- Per taxonomy: the main category, the main top-level category and the best paths, each with `strength` 0-100.\n  Strength is a ranking within one answer, not a probability or a percentage.\n- `POST /v1/labels` answers in the same response. `POST /v1/labels/batch` takes up to 1000 items and runs in the\n  background (202): poll `GET /v1/labels/batch/{run_id}` or pass `webhook_url`.\n- `POST /v1/labels/batch/{run_id}/cancel` stops a batch: items not started yet are not run or charged.\n- `POST /v1/labels/estimate` is free and shows the price before you label anything.\n- You pay per check. Failed checks and failed taxonomies cost nothing.\n\n## Search Intent\n\n- Send a phrase and a market (`en-US`, `pl-PL`, ...). The report lists search intents with their share of the top\n  results, the content form that fits best, typical length, page elements, reader questions and related searches.\n- Reports run in the background: `POST /v1/intent` returns 202, then poll `GET /v1/intent/{report_id}` and honour\n  `Retry-After`. `?wait=` (up to 60 s) waits for the result in the same request.\n- `POST /v1/intent/batch` and `POST /v1/intent/batch/csv` order many phrases at once. Exports: HTML, PDF, Markdown\n  and CSV.\n- `POST /v1/intent/batches/{batch_id}/cancel` stops a batch: phrases not started yet are not run or charged.\n- Failed and cancelled reports are not charged.\n\n## Requests and errors\n\n- Authenticate with an API key: `Authorization: Bearer <key>`.\n- Paid `POST` routes accept `Idempotency-Key`: a retry with the same key and body does not charge twice.\n- Every error has the same shape: `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}`. `code` is stable, `message` is for\n  people. `429` and `503` come with `Retry-After`.\n- Every response has `X-Request-ID`. Send your own to correlate logs.\n"
  },
  "servers": [
    {
      "url": "https://api.askaniela.com",
      "description": "API"
    }
  ],
  "tags": [
    {
      "name": "labels",
      "description": "Page and text labels from IAB Content Taxonomy 3.1 and Google Content Categories v2."
    },
    {
      "name": "intent",
      "description": "Search intent reports for phrases in a chosen market."
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/v1/labels": {
      "post": {
        "tags": [
          "labels"
        ],
        "summary": "Label one page or text",
        "description": "Labels one page (`url`, fetched like a check) or a text with IAB Content Taxonomy 3.1 and/or Google Content Categories v2 categories. Answers at once: per taxonomy the main category and the best paths, each with `strength` 0-100 (classifier ranking, not a probability). Price per check: the page text size per taxonomy (a typical page costs about $0.06 per 1000 checks, a short one $0.015, the longest $0.225), plus a fetch fee for URLs and JavaScript rendering only when you ask for it; `charged_usd` shows the price of the check, split into `model_usd` (labeling), `fetch_usd` (page fetch) and `render_usd` (rendering); `document_tokens` is the size it was billed on. A check that fails is free (200 with `status: error`). Get a free estimate first with `POST /v1/labels/estimate`. `Idempotency-Key` (optional): once the first answer is stored, the same key with the same body and report language, from the same organization, project and API key or user, returns it again for 24 h without new work or charge (large answers as a reference with ids). After a 5xx, a timeout or `409 idempotency_in_progress` nothing may be stored yet: check your existing jobs, audits or reports first. Details: user guide, Retrying safely.",
        "operationId": "create_label_v1_labels_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id",
              "nullable": true
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx.",
              "title": "Idempotency-Key",
              "nullable": true
            },
            "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx."
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Project-Id",
              "nullable": true
            },
            "description": "Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelRequest"
              },
              "example": {
                "text": "Our sourdough uses only rye flour, water and salt. Feed the starter the night before baking...",
                "taxonomies": [
                  "iab",
                  "google"
                ],
                "ref": "post-1842"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelResult"
                },
                "example": {
                  "index": 0,
                  "ref": "post-1842",
                  "url": "https://example.com/blog/lisbon-in-three-days",
                  "variant": "url",
                  "status": "ok",
                  "error": null,
                  "error_code": null,
                  "rendered": false,
                  "low_content": false,
                  "labels": {
                    "iab": {
                      "taxonomy": "iab",
                      "taxonomy_name": "IAB Content Taxonomy 3.1",
                      "primary": {
                        "id": "659",
                        "name": "Europe Travel",
                        "strength": 71
                      },
                      "primary_l1": {
                        "id": "653",
                        "name": "Travel",
                        "strength": 95
                      },
                      "paths": [
                        {
                          "id": "659",
                          "path": "Travel > Travel Locations > Europe Travel",
                          "strength": 71
                        },
                        {
                          "id": "672",
                          "path": "Travel > Travel Type > City Trips",
                          "strength": 12
                        }
                      ],
                      "primary_path": [
                        {
                          "level": 1,
                          "id": "653",
                          "name": "Travel",
                          "strength": 95
                        },
                        {
                          "level": 2,
                          "id": "655",
                          "name": "Travel Locations",
                          "strength": 88
                        },
                        {
                          "level": 3,
                          "id": "659",
                          "name": "Europe Travel",
                          "strength": 85
                        }
                      ],
                      "primary_confident": {
                        "id": "659",
                        "name": "Europe Travel",
                        "strength": 85
                      }
                    }
                  },
                  "failed": [],
                  "charged_usd": 0.00156,
                  "model_usd": 6e-05,
                  "fetch_usd": 0.0015,
                  "render_usd": 0.0,
                  "document_tokens": 2000
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "400": {
            "description": "Error codes: `invalid_idempotency_key`, `invalid_url`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "402": {
            "description": "Error codes: `insufficient_balance`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "409": {
            "description": "Error codes: `idempotency_in_progress`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "422": {
            "description": "Error codes: `idempotency_mismatch`, `validation_error`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `quota_exceeded`, `labels_rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "503": {
            "description": "Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `labeling_unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "507": {
            "description": "Error codes: `idempotency_result_too_large`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        }
      }
    },
    "/v1/labels/batch": {
      "post": {
        "tags": [
          "labels"
        ],
        "summary": "Label pages in batch",
        "operationId": "create_label_batch_v1_labels_batch_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id",
              "nullable": true
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx.",
              "title": "Idempotency-Key",
              "nullable": true
            },
            "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx."
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Project-Id",
              "nullable": true
            },
            "description": "Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelBatchRequest"
              },
              "example": {
                "items": [
                  {
                    "url": "https://example.com/a",
                    "ref": "a"
                  },
                  {
                    "text": "Plain text of another article...",
                    "ref": "b"
                  }
                ],
                "taxonomies": [
                  "iab",
                  "google"
                ],
                "webhook_url": "https://example.com/hooks/labels"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelRun"
                },
                "example": {
                  "id": "lbl_4mq7d2kz9x1c",
                  "status": "queued",
                  "batch": true,
                  "project_id": "prj_r7buper7ekkwz5ak",
                  "taxonomies": [
                    "iab",
                    "google"
                  ],
                  "created_at": "2026-11-10T12:00:00Z",
                  "finished_at": null,
                  "total": 2,
                  "done": 0,
                  "errors": 0,
                  "cancelled": 0,
                  "price_usd": 0.0024,
                  "estimated_usd": 0.0018,
                  "charged_usd": null,
                  "model_usd": null,
                  "fetch_usd": null,
                  "render_usd": null,
                  "items": [],
                  "error": null
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "400": {
            "description": "Error codes: `invalid_idempotency_key`, `invalid_webhook_url`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "402": {
            "description": "Error codes: `insufficient_balance`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "409": {
            "description": "Error codes: `idempotency_in_progress`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "422": {
            "description": "Error codes: `idempotency_mismatch`, `validation_error`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `quota_exceeded`, `labels_rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "503": {
            "description": "Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `labeling_unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "507": {
            "description": "Error codes: `idempotency_result_too_large`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "Labels up to 1000 pages or texts in the background (202; same price per check as single calls). The response has `price_usd` (amount held: the maximum price of every check) and `estimated_usd` (typical price); you pay the actual price and the rest is returned. When finished, `charged_usd` is split into `model_usd`, `fetch_usd` and `render_usd`. Poll `GET /v1/labels/batch/{run_id}` or pass `webhook_url` (signed POST, event `labels.finished`). Failed items, taxonomies and renders that did not happen are refunded. An invalid item (empty, more than one of `url`/`html`/`text`, a URL that is not a public http(s) address, a field too long) does not reject the batch: it is kept at its `index` with `status: error`, an `error_code` and your `ref`, is not held or charged, and the other items run. `422` only for the request itself (not a list, more than 1000 items, unknown taxonomy). `Idempotency-Key` (optional): once the first answer is stored, the same key with the same body and report language, from the same organization, project and API key or user, returns it again for 24 h without new work or charge (large answers as a reference with ids). After a 5xx, a timeout or `409 idempotency_in_progress` nothing may be stored yet: check your existing jobs, audits or reports first. Details: user guide, Retrying safely."
      }
    },
    "/v1/labels/estimate": {
      "post": {
        "tags": [
          "labels"
        ],
        "summary": "Estimate label price",
        "description": "Free price estimate before you label: number of checks, taxonomies, `url` or `document`, optionally an average text length or up to 20 sample texts (not stored). Returns the estimated total and price per check (low, typical, high), each split into labeling (`model_*`), page fetch (`fetch_*`) and rendering (`render_*`) with the `rates` behind them, the amount that would be held, and the price per 1000 checks for short, typical and long pages.",
        "operationId": "estimate_labels_v1_labels_estimate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LabelEstimateRequest"
              },
              "example": {
                "checks": 1000,
                "taxonomies": [
                  "iab"
                ],
                "variant": "document"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelEstimate"
                },
                "example": {
                  "checks": 1000,
                  "estimated_usd": {
                    "low": 0.015,
                    "typical": 0.06,
                    "high": 0.225
                  },
                  "price_per_check_usd": {
                    "low": 1.5e-05,
                    "typical": 6e-05,
                    "high": 0.000225
                  },
                  "price_per_single_call_usd": {
                    "low": 1.5e-05,
                    "typical": 6e-05,
                    "high": 0.000225
                  },
                  "model_per_check_usd": {
                    "low": 1.5e-05,
                    "typical": 6e-05,
                    "high": 0.000225
                  },
                  "fetch_per_check_usd": 0.0,
                  "render_per_check_usd": 0.0,
                  "model_usd": {
                    "low": 0.015,
                    "typical": 0.06,
                    "high": 0.225
                  },
                  "fetch_usd": 0.0,
                  "render_usd": 0.0,
                  "rates": {
                    "model_per_1m_tokens_per_taxonomy": 0.03,
                    "fetch_per_url": 0.0015,
                    "render_per_url": 0.006
                  },
                  "hold_usd": 0.225,
                  "document_tokens_per_check": {
                    "low": 500,
                    "typical": 2000,
                    "high": 7500
                  },
                  "per_1000_checks": {
                    "1": [
                      {
                        "size": "short",
                        "document_tokens": 500,
                        "model": 0.015,
                        "fetch": 1.5,
                        "document": 0.015,
                        "url": 1.515
                      },
                      {
                        "size": "typical",
                        "document_tokens": 2000,
                        "model": 0.06,
                        "fetch": 1.5,
                        "document": 0.06,
                        "url": 1.56
                      },
                      {
                        "size": "max",
                        "document_tokens": 7500,
                        "model": 0.225,
                        "fetch": 1.5,
                        "document": 0.225,
                        "url": 1.725
                      }
                    ]
                  }
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "422": {
            "description": "Error codes: `validation_error`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `labels_rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/labels/batch/{run_id}": {
      "get": {
        "tags": [
          "labels"
        ],
        "summary": "Label batch",
        "operationId": "read_label_batch_v1_labels_batch__run_id__get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            },
            "description": "Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelRun"
                },
                "example": {
                  "id": "lbl_4mq7d2kz9x1c",
                  "status": "partial",
                  "batch": true,
                  "project_id": "prj_r7buper7ekkwz5ak",
                  "taxonomies": [
                    "iab",
                    "google"
                  ],
                  "created_at": "2026-11-10T12:00:00Z",
                  "finished_at": "2026-11-10T12:00:09Z",
                  "total": 3,
                  "done": 3,
                  "errors": 1,
                  "cancelled": 0,
                  "price_usd": 0.0024,
                  "estimated_usd": 0.0018,
                  "charged_usd": 0.00168,
                  "model_usd": 0.00018,
                  "fetch_usd": 0.0015,
                  "render_usd": 0.0,
                  "items": [
                    {
                      "index": 0,
                      "ref": "post-1842",
                      "url": "https://example.com/blog/lisbon-in-three-days",
                      "variant": "url",
                      "status": "ok",
                      "error": null,
                      "error_code": null,
                      "rendered": false,
                      "low_content": false,
                      "labels": {
                        "iab": {
                          "taxonomy": "iab",
                          "taxonomy_name": "IAB Content Taxonomy 3.1",
                          "primary": {
                            "id": "659",
                            "name": "Europe Travel",
                            "strength": 71
                          },
                          "primary_l1": {
                            "id": "653",
                            "name": "Travel",
                            "strength": 95
                          },
                          "paths": [
                            {
                              "id": "659",
                              "path": "Travel > Travel Locations > Europe Travel",
                              "strength": 71
                            },
                            {
                              "id": "672",
                              "path": "Travel > Travel Type > City Trips",
                              "strength": 12
                            }
                          ],
                          "primary_path": [
                            {
                              "level": 1,
                              "id": "653",
                              "name": "Travel",
                              "strength": 95
                            },
                            {
                              "level": 2,
                              "id": "655",
                              "name": "Travel Locations",
                              "strength": 88
                            },
                            {
                              "level": 3,
                              "id": "659",
                              "name": "Europe Travel",
                              "strength": 85
                            }
                          ],
                          "primary_confident": {
                            "id": "659",
                            "name": "Europe Travel",
                            "strength": 85
                          }
                        }
                      },
                      "failed": [],
                      "charged_usd": 0.00156,
                      "model_usd": 6e-05,
                      "fetch_usd": 0.0015,
                      "render_usd": 0.0,
                      "document_tokens": 2000
                    },
                    {
                      "index": 1,
                      "ref": "b",
                      "url": null,
                      "variant": "document",
                      "status": "ok",
                      "error": null,
                      "error_code": null,
                      "rendered": false,
                      "low_content": false,
                      "labels": {
                        "iab": {
                          "taxonomy": "iab",
                          "taxonomy_name": "IAB Content Taxonomy 3.1",
                          "primary": {
                            "id": "659",
                            "name": "Europe Travel",
                            "strength": 71
                          },
                          "primary_l1": {
                            "id": "653",
                            "name": "Travel",
                            "strength": 95
                          },
                          "paths": [
                            {
                              "id": "659",
                              "path": "Travel > Travel Locations > Europe Travel",
                              "strength": 71
                            },
                            {
                              "id": "672",
                              "path": "Travel > Travel Type > City Trips",
                              "strength": 12
                            }
                          ],
                          "primary_path": [
                            {
                              "level": 1,
                              "id": "653",
                              "name": "Travel",
                              "strength": 95
                            },
                            {
                              "level": 2,
                              "id": "655",
                              "name": "Travel Locations",
                              "strength": 88
                            },
                            {
                              "level": 3,
                              "id": "659",
                              "name": "Europe Travel",
                              "strength": 85
                            }
                          ],
                          "primary_confident": {
                            "id": "659",
                            "name": "Europe Travel",
                            "strength": 85
                          }
                        }
                      },
                      "failed": [],
                      "charged_usd": 0.00012,
                      "model_usd": 0.00012,
                      "fetch_usd": 0.0,
                      "render_usd": 0.0,
                      "document_tokens": 4000
                    },
                    {
                      "index": 2,
                      "ref": "c",
                      "url": null,
                      "variant": "document",
                      "status": "error",
                      "error": "Give exactly one of url, html or text",
                      "error_code": "missing_input",
                      "rendered": false,
                      "low_content": false,
                      "labels": {},
                      "failed": [],
                      "charged_usd": 0.0,
                      "model_usd": 0.0,
                      "fetch_usd": 0.0,
                      "render_usd": 0.0,
                      "document_tokens": 0
                    }
                  ],
                  "error": null
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "404": {
            "description": "Error codes: `label_batch_not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `labels_rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "Batch status and every item's labels. While queued or running the response has `Retry-After`."
      }
    },
    "/v1/labels/batch/{run_id}/results.csv": {
      "get": {
        "tags": [
          "labels"
        ],
        "summary": "Label batch CSV",
        "operationId": "label_batch_csv_v1_labels_batch__run_id__results_csv_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            },
            "description": "Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "404": {
            "description": "Error codes: `label_batch_not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "409": {
            "description": "Error codes: `label_batch_running`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `labels_rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "CSV of a finished batch: one row per item, main category and top 3 paths (`path|strength`) per taxonomy. Still running = 409 `label_batch_running`."
      }
    },
    "/v1/labels/batch/{run_id}/cancel": {
      "post": {
        "tags": [
          "labels"
        ],
        "summary": "Cancel a label batch",
        "description": "Cancels a batch: items that have not started become `cancelled`, are not run and not charged, and their held amount returns to your balance. Items already running finish and are charged as usual. While they finish the batch is `cancelling`, then `cancelled`. Safe to repeat: a second call or a finished batch returns the batch with `changed: false`.",
        "operationId": "cancel_label_batch_v1_labels_batch__run_id__cancel_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            },
            "description": "Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LabelCancelResult"
                },
                "example": {
                  "changed": true,
                  "run": {
                    "id": "lbl_4mq7d2kz9x1c",
                    "status": "cancelled",
                    "batch": true,
                    "project_id": "prj_r7buper7ekkwz5ak",
                    "taxonomies": [
                      "iab",
                      "google"
                    ],
                    "created_at": "2026-11-10T12:00:00Z",
                    "finished_at": "2026-11-10T12:00:05Z",
                    "total": 2,
                    "done": 1,
                    "errors": 0,
                    "cancelled": 1,
                    "price_usd": 0.0024,
                    "estimated_usd": 0.0018,
                    "charged_usd": 0.00156,
                    "model_usd": 6e-05,
                    "fetch_usd": 0.0015,
                    "render_usd": 0.0,
                    "items": [
                      {
                        "index": 0,
                        "ref": "post-1842",
                        "url": "https://example.com/blog/lisbon-in-three-days",
                        "variant": "url",
                        "status": "ok",
                        "error": null,
                        "error_code": null,
                        "rendered": false,
                        "low_content": false,
                        "labels": {
                          "iab": {
                            "taxonomy": "iab",
                            "taxonomy_name": "IAB Content Taxonomy 3.1",
                            "primary": {
                              "id": "659",
                              "name": "Europe Travel",
                              "strength": 71
                            },
                            "primary_l1": {
                              "id": "653",
                              "name": "Travel",
                              "strength": 95
                            },
                            "paths": [
                              {
                                "id": "659",
                                "path": "Travel > Travel Locations > Europe Travel",
                                "strength": 71
                              },
                              {
                                "id": "672",
                                "path": "Travel > Travel Type > City Trips",
                                "strength": 12
                              }
                            ],
                            "primary_path": [
                              {
                                "level": 1,
                                "id": "653",
                                "name": "Travel",
                                "strength": 95
                              },
                              {
                                "level": 2,
                                "id": "655",
                                "name": "Travel Locations",
                                "strength": 88
                              },
                              {
                                "level": 3,
                                "id": "659",
                                "name": "Europe Travel",
                                "strength": 85
                              }
                            ],
                            "primary_confident": {
                              "id": "659",
                              "name": "Europe Travel",
                              "strength": 85
                            }
                          }
                        },
                        "failed": [],
                        "charged_usd": 0.00156,
                        "model_usd": 6e-05,
                        "fetch_usd": 0.0015,
                        "render_usd": 0.0,
                        "document_tokens": 2000
                      },
                      {
                        "index": 1,
                        "ref": "b",
                        "url": null,
                        "variant": "document",
                        "status": "cancelled",
                        "error": null,
                        "error_code": null,
                        "rendered": false,
                        "low_content": false,
                        "labels": {},
                        "failed": [],
                        "charged_usd": 0.0,
                        "model_usd": 0.0,
                        "fetch_usd": 0.0,
                        "render_usd": 0.0,
                        "document_tokens": null
                      }
                    ],
                    "error": null
                  }
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`, `forbidden`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "404": {
            "description": "Error codes: `label_batch_not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `labels_rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        }
      }
    },
    "/v1/intent": {
      "post": {
        "tags": [
          "intent"
        ],
        "summary": "Order a search intent report",
        "description": "Orders a search intent report for a phrase and market (asynchronous, usually under a minute). Returns 202; poll `GET /v1/intent/{report_id}`. Price per phrase (pay-as-you-go list): basic $0.009, premium $0.075, compare $0.085; reused recent results are cheaper. Failed reports are not charged. `Idempotency-Key` (optional): once the first answer is stored, the same key with the same body and report language, from the same organization, project and API key or user, returns it again for 24 h without new work or charge (large answers as a reference with ids). After a 5xx, a timeout or `409 idempotency_in_progress` nothing may be stored yet: check your existing jobs, audits or reports first. Details: user guide, Retrying safely.",
        "operationId": "create_intent_v1_intent_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 60,
              "minimum": 0,
              "description": "Wait up to N seconds",
              "default": 0,
              "title": "Wait"
            },
            "description": "Wait up to N seconds"
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id",
              "nullable": true
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx.",
              "title": "Idempotency-Key",
              "nullable": true
            },
            "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx."
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Project-Id",
              "nullable": true
            },
            "description": "Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentRequest"
              },
              "example": {
                "query": "best running shoes",
                "market": "en-US",
                "tier": "basic"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentRead"
                },
                "example": {
                  "id": "itr_7f3k2m9q",
                  "status": "running",
                  "query": "best running shoes",
                  "market": "en-US",
                  "tier": "basic",
                  "created_at": "2026-10-21T12:00:00Z",
                  "price_usd": 0.05
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "400": {
            "description": "Error codes: `invalid_idempotency_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "402": {
            "description": "Error codes: `insufficient_balance`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "409": {
            "description": "Error codes: `idempotency_in_progress`, `own_key_required`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "422": {
            "description": "Error codes: `idempotency_mismatch`, `invalid_tier`, `invalid_request`, `tier_unavailable`, `compare_disabled`, `validation_error`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `quota_exceeded`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "503": {
            "description": "Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `serp_unavailable`, `start_uncertain`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "507": {
            "description": "Error codes: `idempotency_result_too_large`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "List search intent reports",
        "operationId": "intent_history_v1_intent_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            },
            "description": "Maximum number of items to return."
          },
          {
            "name": "batch_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Batch Id",
              "nullable": true
            },
            "description": "Only items of this batch (`batch_id` from the batch order)."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Q",
              "nullable": true
            },
            "description": "Only items whose phrase contains this text."
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id",
              "nullable": true
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Project-Id",
              "nullable": true
            },
            "description": "Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntentSummary"
                  },
                  "title": "Response Intent History V1 Intent Get"
                },
                "example": [
                  {
                    "id": "itr_7f3k2m9q",
                    "status": "done",
                    "query": "best running shoes",
                    "market": "en-US",
                    "device": "desktop",
                    "tier": "basic",
                    "project_id": "prj_r7buper7ekkwz5ak",
                    "batch_id": null,
                    "created_at": "2026-10-21T12:00:00Z",
                    "finished_at": "2026-10-21T12:01:40Z",
                    "error": null,
                    "cache": "miss",
                    "dominant_title": "Commercial investigation",
                    "dominant_share": 0.7,
                    "snapshot_at": "2026-10-21",
                    "report_lang": "en",
                    "queue_state": null,
                    "compare_url": null,
                    "price_usd": 0.05
                  }
                ]
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "Your search intent reports, newest first: status, phrase, market, main intent and price. Filter by `batch_id` (one batch) or `q` (phrase contains). Full report: `GET /v1/intent/{report_id}`."
      }
    },
    "/v1/intent/batch": {
      "post": {
        "tags": [
          "intent"
        ],
        "summary": "Order search intent reports in batch",
        "description": "Orders search intent reports for many phrases (asynchronous). Duplicates run once. Price per phrase (pay-as-you-go list): basic $0.009, premium $0.075, compare $0.085; reused recent results are cheaper. Failed reports are not charged. `Idempotency-Key` (optional): once the first answer is stored, the same key with the same body and report language, from the same organization, project and API key or user, returns it again for 24 h without new work or charge (large answers as a reference with ids). After a 5xx, a timeout or `409 idempotency_in_progress` nothing may be stored yet: check your existing jobs, audits or reports first. Details: user guide, Retrying safely.",
        "operationId": "create_intent_batch_v1_intent_batch_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id",
              "nullable": true
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx.",
              "title": "Idempotency-Key",
              "nullable": true
            },
            "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx."
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Project-Id",
              "nullable": true
            },
            "description": "Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentBatchRequest"
              },
              "example": {
                "items": [
                  {
                    "query": "best running shoes",
                    "market": "en-US"
                  },
                  {
                    "query": "trail running shoes",
                    "market": "en-US"
                  }
                ],
                "tier": "basic"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentBatchAccepted"
                },
                "example": {
                  "batch_id": "itb_2k9d…",
                  "items": [],
                  "skipped": 0,
                  "price_usd": 0.1
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "400": {
            "description": "Error codes: `invalid_idempotency_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "402": {
            "description": "Error codes: `insufficient_balance`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "409": {
            "description": "Error codes: `idempotency_in_progress`, `own_key_required`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "422": {
            "description": "Error codes: `idempotency_mismatch`, `invalid_tier`, `invalid_request`, `tier_unavailable`, `compare_disabled`, `validation_error`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `quota_exceeded`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "503": {
            "description": "Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `serp_unavailable`, `start_uncertain`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "507": {
            "description": "Error codes: `idempotency_result_too_large`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        }
      }
    },
    "/v1/intent/batch/csv": {
      "post": {
        "tags": [
          "intent"
        ],
        "summary": "Order search intent reports from CSV",
        "description": "Phrases from a CSV file: a `query` column (optional `market`, `device`), or phrase and market without a header. `Idempotency-Key` (optional): once the first answer is stored, the same key with the same body and report language, from the same organization, project and API key or user, returns it again for 24 h without new work or charge (large answers as a reference with ids). After a 5xx, a timeout or `409 idempotency_in_progress` nothing may be stored yet: check your existing jobs, audits or reports first. Details: user guide, Retrying safely.",
        "operationId": "create_intent_batch_csv_v1_intent_batch_csv_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id",
              "nullable": true
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx.",
              "title": "Idempotency-Key",
              "nullable": true
            },
            "description": "Optional. 1-255 printable ASCII characters (e.g. a UUID per order). Within 24 h the same key + same request returns the stored answer (`Idempotent-Replayed: true`); JSON bodies are compared after sorting keys and removing whitespace; a different body = 422 `idempotency_mismatch`; still running = 409 `idempotency_in_progress` + `Retry-After`. Not stored: 401/402/403/429 and 5xx."
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "title": "X-Project-Id",
              "nullable": true
            },
            "description": "Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/IntentBatchCsvForm"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentBatchAccepted"
                },
                "example": {
                  "batch_id": "itb_2k9d5x",
                  "items": [
                    {
                      "id": "itr_7f3k2m9q",
                      "status": "queued",
                      "query": "best running shoes",
                      "market": "en-US",
                      "device": "desktop",
                      "tier": "basic",
                      "project_id": "prj_r7buper7ekkwz5ak",
                      "batch_id": "itb_2k9d5x",
                      "created_at": "2026-10-21T12:00:00Z",
                      "finished_at": null,
                      "error": null,
                      "cache": null,
                      "dominant_title": null,
                      "dominant_share": null,
                      "snapshot_at": null,
                      "report_lang": "en",
                      "queue_state": null,
                      "compare_url": null,
                      "price_usd": 0.05
                    }
                  ],
                  "skipped": 0,
                  "price_usd": 0.05
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "400": {
            "description": "Error codes: `invalid_idempotency_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "402": {
            "description": "Error codes: `insufficient_balance`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "409": {
            "description": "Error codes: `idempotency_in_progress`, `own_key_required`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "422": {
            "description": "Error codes: `idempotency_mismatch`, `invalid_csv`, `invalid_tier`, `invalid_request`, `tier_unavailable`, `compare_disabled`, `validation_error`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`, `quota_exceeded`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "503": {
            "description": "Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `serp_unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "507": {
            "description": "Error codes: `idempotency_result_too_large`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        }
      }
    },
    "/v1/intent/{report_id}": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Search intent report",
        "operationId": "intent_report_v1_intent__report_id__get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            },
            "description": "Report id: `rep_…` for page reports, `itr_…` for search intent reports."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "json",
                "md"
              ],
              "type": "string",
              "description": "json (default): the report; md: markdown instructions for an AI agent (context, rules for safe work, steps, verification, report template) in the report language.",
              "default": "json",
              "title": "Format"
            },
            "description": "json (default): the report; md: markdown instructions for an AI agent (context, rules for safe work, steps, verification, report template) in the report language."
          }
        ],
        "responses": {
          "200": {
            "description": "The report (json) or instructions for an AI agent (format=md)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentRead"
                },
                "example": {
                  "id": "itr_7f3k2m9q",
                  "status": "done",
                  "query": "best running shoes",
                  "market": "en-US",
                  "tier": "basic",
                  "created_at": "2026-10-21T12:00:00Z",
                  "dominant_title": "Commercial investigation",
                  "dominant_share": 0.7,
                  "price_usd": 0.05
                }
              },
              "text/markdown": {}
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "404": {
            "description": "Error codes: `intent_not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "One search intent report: status and, when `done`, the full report. Poll while `queued` or `running`. Free."
      }
    },
    "/v1/intent/{report_id}/export.html": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Search intent report as HTML",
        "operationId": "intent_export_html_v1_intent__report_id__export_html_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            },
            "description": "Report id: `rep_…` for page reports, `itr_…` for search intent reports."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(en|pl)$",
              "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins.",
              "default": "en",
              "title": "Lang"
            },
            "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "Search intent report as one HTML file (styles inline, works offline), in the language chosen at order time."
      }
    },
    "/v1/intent/{report_id}/export.pdf": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Search intent report as PDF",
        "operationId": "intent_export_pdf_v1_intent__report_id__export_pdf_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            },
            "description": "Report id: `rep_…` for page reports, `itr_…` for search intent reports."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(en|pl)$",
              "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins.",
              "default": "en",
              "title": "Lang"
            },
            "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "Search intent report as a PDF file, in the language chosen at order time."
      }
    },
    "/v1/intent/{report_id}/export.md": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Search intent report as Markdown",
        "description": "Intent report as a Markdown file: the same sections as the client view, in the language chosen at order time.",
        "operationId": "intent_export_md_v1_intent__report_id__export_md_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            },
            "description": "Report id: `rep_…` for page reports, `itr_…` for search intent reports."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(en|pl)$",
              "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins.",
              "default": "en",
              "title": "Lang"
            },
            "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins."
          }
        ],
        "responses": {
          "200": {
            "description": "Intent report as Markdown (client view).",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        }
      }
    },
    "/v1/intent/{report_id}/export.csv": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Search intent report as CSV",
        "operationId": "intent_export_csv_v1_intent__report_id__export_csv_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            },
            "description": "Report id: `rep_…` for page reports, `itr_…` for search intent reports."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "Search intent report as CSV: one row per search intent with its share of results, coverage and best rank."
      }
    },
    "/v1/intent/batches/{batch_id}/export.csv": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Search intent batch as CSV",
        "operationId": "intent_batch_csv_v1_intent_batches__batch_id__export_csv_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Batch Id"
            },
            "description": "Intent batch id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        },
        "description": "CSV of every report in a batch from `POST /v1/intent/batch` or `POST /v1/intent/batch/csv`: one row per phrase and search intent. Unknown batch = 404 `intent_not_found`."
      }
    },
    "/v1/intent/batches/{batch_id}/cancel": {
      "post": {
        "tags": [
          "intent"
        ],
        "summary": "Cancel a search intent batch",
        "description": "Cancels a batch: phrases that have not started become `cancelled`, are not run and not charged, and their held amount returns to your balance. Phrases already running finish and are charged as usual. While they finish the batch is `cancelling`, then `cancelled`. Safe to repeat: a second call or a finished batch returns the batch with `changed: false`. Unknown batch = 404 `intent_not_found`.",
        "operationId": "cancel_intent_batch_route_v1_intent_batches__batch_id__cancel_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Batch Id"
            },
            "description": "Intent batch id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentBatchCancel"
                },
                "example": {
                  "changed": true,
                  "batch": {
                    "batch_id": "itb_2k9d5x",
                    "status": "cancelling",
                    "total": 3,
                    "done": 1,
                    "failed": 0,
                    "cancelled": 1,
                    "price_usd": 0.1,
                    "items": [
                      {
                        "id": "itr_7f3k2m9q",
                        "status": "done",
                        "query": "best running shoes",
                        "market": "en-US",
                        "device": "desktop",
                        "tier": "basic",
                        "project_id": "prj_r7buper7ekkwz5ak",
                        "batch_id": "itb_2k9d5x",
                        "created_at": "2026-10-21T12:00:00Z",
                        "finished_at": "2026-10-21T12:01:40Z",
                        "error": null,
                        "cache": "miss",
                        "dominant_title": "Commercial investigation",
                        "dominant_share": 0.7,
                        "snapshot_at": "2026-10-21",
                        "report_lang": "en",
                        "queue_state": null,
                        "compare_url": null,
                        "price_usd": 0.05
                      },
                      {
                        "id": "itr_9c2m4k1z",
                        "status": "running",
                        "query": "trail running shoes",
                        "market": "en-US",
                        "device": "desktop",
                        "tier": "basic",
                        "project_id": "prj_r7buper7ekkwz5ak",
                        "batch_id": "itb_2k9d5x",
                        "created_at": "2026-10-21T12:00:00Z",
                        "finished_at": null,
                        "error": null,
                        "cache": "miss",
                        "dominant_title": null,
                        "dominant_share": null,
                        "snapshot_at": null,
                        "report_lang": "en",
                        "queue_state": "running",
                        "compare_url": null,
                        "price_usd": 0.05
                      },
                      {
                        "id": "itr_3h8v6p2w",
                        "status": "cancelled",
                        "query": "running shoes for flat feet",
                        "market": "en-US",
                        "device": "desktop",
                        "tier": "basic",
                        "project_id": "prj_r7buper7ekkwz5ak",
                        "batch_id": "itb_2k9d5x",
                        "created_at": "2026-10-21T12:00:00Z",
                        "finished_at": "2026-10-21T12:00:30Z",
                        "error": null,
                        "cache": "miss",
                        "dominant_title": null,
                        "dominant_share": null,
                        "snapshot_at": null,
                        "report_lang": "en",
                        "queue_state": null,
                        "compare_url": null,
                        "price_usd": 0.0
                      }
                    ]
                  }
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error",
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "401": {
            "description": "Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "403": {
            "description": "Error codes: `insufficient_scope`, `forbidden`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "404": {
            "description": "Error codes: `intent_not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          },
          "429": {
            "description": "Error codes: `rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "X-Request-ID": {
                "$ref": "#/components/headers/X-Request-ID"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimit-Limit": {
        "description": "Requests per minute for this API key.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Remaining": {
        "description": "Requests left in the current window.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the window resets.",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying or polling.",
        "schema": {
          "type": "integer"
        }
      },
      "X-Request-ID": {
        "description": "Request id (send your own `[A-Za-z0-9._-]{1,128}` to correlate logs).",
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "gsj_live_<prefix>_<secret>",
        "description": "API key from Platform > API keys: `Authorization: Bearer gsj_live_…`. Scopes limit routes."
      }
    },
    "schemas": {
      "Advice": {
        "properties": {
          "element": {
            "type": "string",
            "title": "Element"
          },
          "reason": {
            "type": "string",
            "title": "Reason",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "element"
        ],
        "title": "Advice",
        "description": "Something to avoid on the page, with the reason."
      },
      "IntentBatchCsvForm": {
        "properties": {
          "file": {
            "type": "string",
            "title": "File",
            "description": "CSV: query[,market[,device]]",
            "format": "binary"
          },
          "market": {
            "type": "string",
            "title": "Market",
            "default": "en-US"
          },
          "tier": {
            "type": "string",
            "title": "Tier",
            "default": "basic"
          },
          "freshness": {
            "type": "string",
            "enum": [
              "auto",
              "fresh"
            ],
            "title": "Freshness",
            "default": "auto"
          },
          "max_age_days": {
            "type": "integer",
            "maximum": 7.0,
            "minimum": 0.0,
            "title": "Max Age Days",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "nullable": true
          },
          "report_lang": {
            "type": "string",
            "enum": [
              "en",
              "pl",
              null
            ],
            "title": "Report Lang",
            "description": "Report language: en | pl",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "IntentBatchCsvForm",
        "description": "CSV upload: one phrase per line, `query[,market[,device]]`."
      },
      "Category": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Category id in the taxonomy (IAB: unique id, Google: full path)"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "strength": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Strength",
            "description": "Classifier strength 0-100 (ranking, not a probability)"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "strength"
        ],
        "title": "Category",
        "description": "One category with its strength 0-100."
      },
      "CategoryLevel": {
        "properties": {
          "level": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Level",
            "description": "Level in the taxonomy, 1 = top level"
          },
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Category id in the taxonomy (IAB: unique id, Google: full path)"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "strength": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Strength",
            "description": "Conditional strength 0-100 of this level given its parent (ranking, not a probability). Not multiplied along the path"
          }
        },
        "type": "object",
        "required": [
          "level",
          "id",
          "name",
          "strength"
        ],
        "title": "CategoryLevel"
      },
      "ClientPage": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Url",
            "description": "Page address (http or https); its position comes from the search results when the address is there"
          },
          "html": {
            "type": "string",
            "maxLength": 2000000,
            "title": "Html",
            "description": "Page HTML, up to 2,000,000 characters",
            "nullable": true
          },
          "text": {
            "type": "string",
            "maxLength": 100000,
            "title": "Text",
            "description": "Main text of the page, up to 100,000 characters (Markdown headings and lists are read)",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "ClientPage",
        "description": "A top page you already have: URL and `html` or `text` (exactly one)."
      },
      "ClientSerp": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/ClientSerpResult"
            },
            "type": "array",
            "maxItems": 20,
            "minItems": 3,
            "title": "Results",
            "description": "Organic results, 3 to 20 (usually the top 10)"
          },
          "people_also_ask": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "People Also Ask",
            "description": "Questions from the People also ask box, up to 20"
          },
          "related_searches": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Related Searches",
            "description": "Related searches, up to 20"
          },
          "ai_overview": {
            "type": "string",
            "maxLength": 4000,
            "title": "Ai Overview",
            "description": "Text of the AI Overview, if the page had one",
            "default": ""
          },
          "item_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 30,
            "title": "Item Types",
            "description": "SERP features on the page, e.g. organic, people_also_ask, video, images"
          },
          "checked_at": {
            "type": "string",
            "format": "date",
            "title": "Checked At",
            "description": "When you collected these results (shown in the report as your date); empty = no date",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "ClientSerp",
        "description": "Your own search results for the phrase (usually the top 10 organic results), positions and URLs without repeats."
      },
      "ClientSerpResult": {
        "properties": {
          "position": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Position",
            "description": "Position in the results (1 = top)"
          },
          "url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Url",
            "description": "Result address (http or https). A Google redirect link (google.com/goto) is not an address: such a result counts without an address or domain"
          },
          "title": {
            "type": "string",
            "maxLength": 300,
            "title": "Title",
            "default": ""
          },
          "description": {
            "type": "string",
            "maxLength": 1000,
            "title": "Description",
            "description": "Snippet shown under the title",
            "default": ""
          },
          "type": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,39}$",
            "title": "Type",
            "description": "Result type, e.g. organic or featured_snippet",
            "default": "organic"
          }
        },
        "type": "object",
        "required": [
          "position",
          "url"
        ],
        "title": "ClientSerpResult",
        "description": "One organic result from your own search results."
      },
      "CloserLook": {
        "properties": {
          "pages": {
            "items": {
              "$ref": "#/components/schemas/PageFacts"
            },
            "type": "array",
            "title": "Pages",
            "default": []
          },
          "fetched": {
            "type": "integer",
            "title": "Fetched",
            "default": 0
          },
          "length_words": {
            "additionalProperties": {
              "type": "integer",
              "nullable": true
            },
            "type": "object",
            "title": "Length Words",
            "nullable": true
          },
          "elements": {
            "items": {
              "$ref": "#/components/schemas/ElementStat"
            },
            "type": "array",
            "title": "Elements",
            "default": []
          },
          "expectations": {
            "items": {
              "$ref": "#/components/schemas/Expectation"
            },
            "type": "array",
            "title": "Expectations",
            "default": []
          },
          "expectations_assessed": {
            "type": "boolean",
            "title": "Expectations Assessed",
            "default": true
          },
          "prompt_ver": {
            "type": "string",
            "title": "Prompt Ver",
            "default": ""
          },
          "unreadable": {
            "description": "Top results that gave no text to read, by kind (videos, login pages, PDF without text...). Present only when there are such results; we do not analyse video content, so those results count only by type and title",
            "anyOf": [
              {
                "$ref": "#/components/schemas/UnreadableSummary"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          }
        },
        "type": "object",
        "title": "CloserLook",
        "description": "Premium: the top pages of the results, their length, page elements and what searchers expect."
      },
      "CompareRow": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "yours": {
            "title": "Yours",
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "top_share": {
            "type": "number",
            "title": "Top Share",
            "nullable": true
          },
          "gap": {
            "type": "boolean",
            "title": "Gap",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "code"
        ],
        "title": "CompareRow",
        "description": "One feature compared between your page and the top pages."
      },
      "Comparison": {
        "properties": {
          "page": {
            "$ref": "#/components/schemas/PageFacts"
          },
          "length_band": {
            "type": "string",
            "enum": [
              "below",
              "within",
              "above",
              "unknown"
            ],
            "title": "Length Band",
            "default": "unknown"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/CompareRow"
            },
            "type": "array",
            "title": "Rows",
            "default": []
          },
          "unmet": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Unmet",
            "default": []
          },
          "suggestions": {
            "items": {
              "$ref": "#/components/schemas/Suggestion"
            },
            "type": "array",
            "title": "Suggestions",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "page"
        ],
        "title": "Comparison",
        "description": "Compare: your page against the top pages on the same features, with what to add."
      },
      "Demand": {
        "properties": {
          "volume": {
            "type": "integer",
            "title": "Volume",
            "nullable": true
          },
          "cpc": {
            "type": "number",
            "title": "Cpc",
            "nullable": true
          },
          "competition": {
            "type": "number",
            "title": "Competition",
            "nullable": true
          },
          "difficulty": {
            "type": "integer",
            "title": "Difficulty",
            "nullable": true
          },
          "months": {
            "type": "integer",
            "title": "Months",
            "default": 0
          },
          "peak_month": {
            "type": "integer",
            "title": "Peak Month",
            "nullable": true
          },
          "low_month": {
            "type": "integer",
            "title": "Low Month",
            "nullable": true
          },
          "seasonality_index": {
            "type": "number",
            "title": "Seasonality Index",
            "nullable": true
          },
          "yoy_change": {
            "type": "number",
            "title": "Yoy Change",
            "nullable": true
          }
        },
        "type": "object",
        "title": "Demand",
        "description": "Search demand for the phrase, when available."
      },
      "ElementShare": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "share": {
            "type": "number",
            "title": "Share"
          }
        },
        "type": "object",
        "required": [
          "code",
          "share"
        ],
        "title": "ElementShare",
        "description": "A page element and the share of top pages that have it."
      },
      "ElementStat": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "share": {
            "type": "number",
            "title": "Share"
          },
          "median": {
            "type": "number",
            "title": "Median",
            "default": 0.0
          }
        },
        "type": "object",
        "required": [
          "code",
          "share"
        ],
        "title": "ElementStat",
        "description": "A page element, the share of top pages that have it and the median count."
      },
      "ErrorBody": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code",
            "enum": [
              "account_not_verified",
              "addon_unavailable",
              "api_key_expired",
              "audit_busy",
              "audit_in_progress",
              "audit_not_found",
              "audit_not_recheckable",
              "audit_running",
              "audit_too_large",
              "bad_request",
              "batch_too_large",
              "beta_budget_reached",
              "billing_unavailable",
              "compare_disabled",
              "conflict",
              "consent_required",
              "context_rate_limited",
              "context_unavailable",
              "csrf_failed",
              "draft_project_mismatch",
              "email_unavailable",
              "empty_rules",
              "empty_selection",
              "evidence_refresh_limited",
              "export_unavailable",
              "fetch_failed",
              "fix_plan_not_purchased",
              "fix_plan_regenerate_too_soon",
              "fix_plan_unavailable",
              "forbidden",
              "gsc_empty",
              "gsc_forbidden",
              "gsc_not_found",
              "gsc_quota",
              "gsc_reauth_required",
              "gsc_unavailable",
              "idempotency_in_progress",
              "idempotency_mismatch",
              "idempotency_result_too_large",
              "idempotency_unavailable",
              "inference_failed",
              "insufficient_balance",
              "insufficient_scope",
              "intent_not_found",
              "internal_error",
              "invalid_api_key",
              "invalid_credentials",
              "invalid_csv",
              "invalid_cursor",
              "invalid_idempotency_key",
              "invalid_key_expiry",
              "invalid_password",
              "invalid_request",
              "invalid_scope",
              "invalid_target",
              "invalid_tier",
              "invalid_token",
              "invalid_url",
              "invalid_webhook_url",
              "ip_not_allowed",
              "item_too_large",
              "job_not_controllable",
              "job_not_found",
              "job_not_retryable",
              "job_too_large",
              "key_not_active",
              "label_batch_not_found",
              "label_batch_running",
              "labeling_unavailable",
              "labels_decide_not_enabled",
              "labels_rate_limited",
              "labels_raw_not_enabled",
              "maintenance",
              "method_not_allowed",
              "no_failed_pages",
              "no_rules_for_input",
              "not_a_draft",
              "not_found",
              "not_recheckable",
              "org_not_found",
              "org_suspended",
              "origin_not_allowed",
              "own_key_required",
              "page_check_running",
              "page_extras_not_found",
              "page_not_found",
              "page_not_recheckable",
              "payload_too_large",
              "pdf_unavailable",
              "preview_expired",
              "private_project",
              "profile_not_configured",
              "promo_invalid",
              "queue_unavailable",
              "quota_exceeded",
              "rate_limited",
              "rate_limiter_unavailable",
              "recheck_busy",
              "recheck_cooldown",
              "recheck_daily_limit",
              "recheck_input_required",
              "registration_failed",
              "report_not_found",
              "rule_disabled",
              "serp_unavailable",
              "share_active",
              "share_not_found",
              "sitemap_not_found",
              "spend_cap_reached",
              "start_uncertain",
              "tier_unavailable",
              "too_many_active_jobs",
              "topup_below_min",
              "topup_invalid_amount",
              "topup_over_limit",
              "unauthorized",
              "unavailable",
              "unknown_profile",
              "unknown_rule",
              "upgrade_unavailable",
              "validation_error",
              "webhooks_unavailable"
            ]
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "details": {
            "title": "Details",
            "anyOf": [
              {},
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          }
        },
        "type": "object",
        "required": [
          "code",
          "message",
          "request_id"
        ],
        "title": "ErrorBody",
        "description": "Error details: stable `code` and a `message` for people."
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "description": "The only error shape of every `/v1` response."
      },
      "Expectation": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text"
          },
          "met": {
            "type": "integer",
            "title": "Met",
            "default": 0
          },
          "assessed": {
            "type": "integer",
            "title": "Assessed",
            "default": 0
          },
          "coverage": {
            "type": "number",
            "title": "Coverage",
            "nullable": true
          },
          "aio_met": {
            "type": "integer",
            "title": "Aio Met",
            "description": "Pages cited by the AI Overview that meet it",
            "nullable": true
          },
          "aio_assessed": {
            "type": "integer",
            "title": "Aio Assessed",
            "description": "Pages cited by the AI Overview that were assessed",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "Expectation",
        "description": "What searchers expect, and whether the top pages meet it."
      },
      "IntentBatchAccepted": {
        "properties": {
          "batch_id": {
            "type": "string",
            "title": "Batch Id",
            "description": "Batch id."
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/IntentSummary"
            },
            "type": "array",
            "title": "Items",
            "description": "One entry per unique phrase; poll each with `GET /v1/intent/{report_id}`."
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "default": 0,
            "description": "Duplicates in the input."
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true,
            "description": "Total price in USD."
          }
        },
        "type": "object",
        "required": [
          "batch_id",
          "items",
          "price_usd"
        ],
        "title": "IntentBatchAccepted",
        "description": "Accepted batch: `batch_id` and the reports created for it."
      },
      "IntentBatchCancel": {
        "properties": {
          "batch": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IntentBatchState"
              }
            ],
            "description": "The batch after the cancel"
          },
          "changed": {
            "type": "boolean",
            "title": "Changed",
            "description": "True when this call cancelled phrases; false when there was nothing left to cancel"
          }
        },
        "type": "object",
        "required": [
          "batch",
          "changed"
        ],
        "title": "IntentBatchCancel",
        "description": "The batch after a cancel. `changed` is false when there was nothing left to cancel."
      },
      "IntentBatchRequest": {
        "properties": {
          "top_pages": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 3.0,
            "title": "Top Pages",
            "description": "How many pages from the top search results we fetch and read, 3 to 10. Empty = every organic result the search returned (up to 10). Pages cited by the AI Overview come on top (up to 12), the same pages in Intent and Gain & Gap. The price follows the number of pages read",
            "nullable": true
          },
          "include_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Include Domains",
            "description": "Read only pages from these domains (subdomains included), e.g. [\"example.com\"]. Up to 20. Fewer pages left = analysis and price for the pages left (also 1 or 2); none left = only the search results are charged"
          },
          "exclude_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Exclude Domains",
            "description": "Skip pages from these domains (subdomains included), e.g. forums, marketplaces or competitors. Lower results take their place. Up to 50. Fewer pages left = analysis and price for the pages left (also 1 or 2); none left = only the search results are charged"
          },
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "description": "basic: search intent from the results; premium: + Ani reads the top pages; compare: + your page (`compare_url`) next to them. Legacy `lite` = basic, `full` = premium",
            "default": "basic"
          },
          "freshness": {
            "type": "string",
            "enum": [
              "auto",
              "fresh"
            ],
            "title": "Freshness",
            "description": "auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price)",
            "default": "auto"
          },
          "max_age_days": {
            "type": "integer",
            "maximum": 7.0,
            "minimum": 0.0,
            "title": "Max Age Days",
            "description": "Oldest results reused with freshness=auto (default 3 days)",
            "nullable": true
          },
          "report_lang": {
            "type": "string",
            "enum": [
              "en",
              "pl",
              null
            ],
            "title": "Report Lang",
            "description": "Report language: en | pl; exports and share link. Empty = Accept-Language, else en",
            "nullable": true
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/IntentItem"
            },
            "type": "array",
            "minItems": 1,
            "title": "Items",
            "description": "Phrases; duplicates (phrase + market + device) run once"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "description": "Project id (`prj_…`); default project when omitted.",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "IntentBatchRequest",
        "description": "Many phrases in one order. Duplicates run once."
      },
      "IntentBatchState": {
        "properties": {
          "batch_id": {
            "type": "string",
            "title": "Batch Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "cancelling",
              "done",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "description": "queued | running | cancelling (cancelled, phrases already running are finishing) | done | failed (no phrase succeeded) | cancelled"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "done": {
            "type": "integer",
            "title": "Done",
            "description": "Phrases with a report",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "title": "Failed",
            "description": "Phrases that could not be analysed (not charged)",
            "default": 0
          },
          "cancelled": {
            "type": "integer",
            "title": "Cancelled",
            "description": "Phrases cancelled before they started: not run and not charged",
            "default": 0
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/IntentSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "batch_id",
          "status",
          "total",
          "items",
          "price_usd"
        ],
        "title": "IntentBatchState",
        "description": "A batch of search intent reports: status, counts and every phrase. `price_usd` is the amount held while it runs and the amount paid when it ends; cancelled phrases are 0."
      },
      "IntentItem": {
        "properties": {
          "market": {
            "type": "string",
            "maxLength": 10,
            "title": "Market",
            "description": "language-COUNTRY, e.g. en-US, pl-PL",
            "default": "en-US",
            "nullable": true
          },
          "location_code": {
            "type": "integer",
            "title": "Location Code",
            "description": "Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market`",
            "nullable": true
          },
          "language_code": {
            "type": "string",
            "maxLength": 8,
            "title": "Language Code",
            "description": "language_code from the supported markets list, e.g. pl; overrides the language of `market`",
            "nullable": true
          },
          "query": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Query",
            "description": "Search phrase"
          },
          "device": {
            "type": "string",
            "enum": [
              "desktop",
              "mobile"
            ],
            "title": "Device",
            "default": "desktop",
            "description": "`desktop` (default) or `mobile` results."
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "IntentItem",
        "description": "Phrase and market: `market` (`en-US`) or `location_code` with `language_code`."
      },
      "IntentRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Intent report id (`itr_…`)."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "description": "`queued`, `running`, `done`, `failed` or `cancelled` (batch phrase cancelled before it started, not charged)."
          },
          "query": {
            "type": "string",
            "title": "Query",
            "description": "Search phrase."
          },
          "market": {
            "type": "string",
            "title": "Market",
            "description": "Market (language-COUNTRY, e.g. `en-US`)."
          },
          "device": {
            "type": "string",
            "title": "Device",
            "default": "desktop",
            "description": "`desktop` or `mobile`."
          },
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "default": "basic",
            "description": "`basic`, `premium` or `compare`."
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "description": "Project id (`prj_…`).",
            "nullable": true
          },
          "batch_id": {
            "type": "string",
            "title": "Batch Id",
            "description": "Batch id when ordered with `POST /v1/intent/batch`.",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Ordered."
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "title": "Finished At",
            "description": "Finished.",
            "nullable": true
          },
          "error": {
            "type": "string",
            "enum": [
              "intent_failed",
              null
            ],
            "title": "Error",
            "description": "Why the report failed (`intent_failed`); null otherwise. Failed reports are not charged.",
            "nullable": true
          },
          "cache": {
            "type": "string",
            "enum": [
              "miss",
              "serp",
              "profile",
              null
            ],
            "title": "Cache",
            "description": "Reuse of recent search results: `miss` (new), `serp` (results reused), `profile` (whole report reused).",
            "nullable": true
          },
          "dominant_title": {
            "type": "string",
            "title": "Dominant Title",
            "description": "Name of the main search intent.",
            "nullable": true
          },
          "dominant_share": {
            "type": "number",
            "title": "Dominant Share",
            "description": "Share of results with the main intent (0-1).",
            "nullable": true
          },
          "snapshot_at": {
            "type": "string",
            "title": "Snapshot At",
            "description": "Date of the search results used.",
            "nullable": true
          },
          "report_lang": {
            "type": "string",
            "title": "Report Lang",
            "description": "Report language.",
            "nullable": true
          },
          "queue_state": {
            "type": "string",
            "enum": [
              "running",
              "delayed",
              null
            ],
            "title": "Queue State",
            "description": "Only while `status` is queued or running: `delayed` = no live background run for over 2 minutes (for example after an infrastructure restart); the phrase is picked up again automatically, poll less often (Retry-After 60).",
            "nullable": true
          },
          "compare_url": {
            "type": "string",
            "title": "Compare Url",
            "description": "Your page compared with the top results (tier `compare`).",
            "nullable": true
          },
          "report": {
            "description": "Full intent report when `status` is `done`.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntentReport"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true,
            "description": "Price charged in USD."
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "query",
          "market",
          "created_at",
          "price_usd"
        ],
        "title": "IntentRead",
        "description": "One search intent report: status and, when `done`, the full report."
      },
      "IntentReport": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query"
          },
          "market": {
            "type": "string",
            "title": "Market"
          },
          "device": {
            "type": "string",
            "title": "Device",
            "default": "desktop"
          },
          "snapshot_at": {
            "type": "string",
            "title": "Snapshot At"
          },
          "serp_source": {
            "type": "string",
            "enum": [
              "ours",
              "client"
            ],
            "title": "Serp Source",
            "default": "ours"
          },
          "pages_source": {
            "type": "string",
            "enum": [
              "ours",
              "client",
              null
            ],
            "title": "Pages Source",
            "nullable": true
          },
          "results_total": {
            "type": "integer",
            "title": "Results Total",
            "default": 0
          },
          "intents": {
            "items": {
              "$ref": "#/components/schemas/IntentRow"
            },
            "type": "array",
            "title": "Intents",
            "default": []
          },
          "dominant_intent_id": {
            "type": "string",
            "title": "Dominant Intent Id",
            "nullable": true
          },
          "dominant_title": {
            "type": "string",
            "title": "Dominant Title",
            "nullable": true
          },
          "dominant_share": {
            "type": "number",
            "title": "Dominant Share",
            "nullable": true
          },
          "recommended_form": {
            "type": "string",
            "title": "Recommended Form",
            "nullable": true
          },
          "expected_genre": {
            "type": "string",
            "title": "Expected Genre",
            "nullable": true
          },
          "article_fits": {
            "type": "boolean",
            "title": "Article Fits",
            "nullable": true
          },
          "article_fits_reason": {
            "type": "string",
            "title": "Article Fits Reason",
            "default": ""
          },
          "length_words": {
            "additionalProperties": {
              "type": "integer",
              "nullable": true
            },
            "type": "object",
            "title": "Length Words",
            "nullable": true
          },
          "length_sample": {
            "type": "integer",
            "title": "Length Sample",
            "default": 0
          },
          "elements": {
            "items": {
              "$ref": "#/components/schemas/ElementShare"
            },
            "type": "array",
            "title": "Elements",
            "default": []
          },
          "useful_elements": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Useful Elements",
            "default": []
          },
          "reader_questions": {
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "type": "array",
            "title": "Reader Questions",
            "default": []
          },
          "heading_themes": {
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "type": "array",
            "title": "Heading Themes",
            "default": []
          },
          "related_searches": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Related Searches",
            "default": []
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings",
            "default": []
          },
          "summary": {
            "type": "string",
            "title": "Summary",
            "default": ""
          },
          "labeler_version": {
            "type": "string",
            "title": "Labeler Version",
            "default": ""
          },
          "length_basis": {
            "type": "string",
            "title": "Length Basis",
            "default": ""
          },
          "traffic_known": {
            "type": "integer",
            "title": "Traffic Known",
            "default": 0
          },
          "dominant_by_traffic_id": {
            "type": "string",
            "title": "Dominant By Traffic Id",
            "nullable": true
          },
          "ai_overview": {
            "type": "string",
            "title": "Ai Overview",
            "default": ""
          },
          "ai_overview_note": {
            "type": "string",
            "title": "Ai Overview Note",
            "default": ""
          },
          "item_types": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Item Types",
            "default": []
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Domains",
            "default": []
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/ResultMap"
            },
            "type": "array",
            "title": "Results",
            "default": []
          },
          "page_types": {
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "type": "array",
            "title": "Page Types",
            "default": []
          },
          "avoid": {
            "items": {
              "$ref": "#/components/schemas/Advice"
            },
            "type": "array",
            "title": "Avoid",
            "default": []
          },
          "useful": {
            "items": {
              "$ref": "#/components/schemas/Advice"
            },
            "type": "array",
            "title": "Useful",
            "default": []
          },
          "demand": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Demand"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "closer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CloserLook"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "compare": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Comparison"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "page_scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PageScopeInfo"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "app_version": {
            "type": "string",
            "title": "App Version",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "query",
          "market",
          "snapshot_at"
        ],
        "title": "IntentReport",
        "description": "Search intent report for one phrase. `snapshot_at` is the date of the search results it is based on."
      },
      "IntentRequest": {
        "properties": {
          "market": {
            "type": "string",
            "maxLength": 10,
            "title": "Market",
            "description": "language-COUNTRY, e.g. en-US, pl-PL",
            "default": "en-US",
            "nullable": true
          },
          "location_code": {
            "type": "integer",
            "title": "Location Code",
            "description": "Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market`",
            "nullable": true
          },
          "language_code": {
            "type": "string",
            "maxLength": 8,
            "title": "Language Code",
            "description": "language_code from the supported markets list, e.g. pl; overrides the language of `market`",
            "nullable": true
          },
          "query": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Query",
            "description": "Search phrase"
          },
          "device": {
            "type": "string",
            "enum": [
              "desktop",
              "mobile"
            ],
            "title": "Device",
            "default": "desktop",
            "description": "`desktop` (default) or `mobile` results."
          },
          "top_pages": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 3.0,
            "title": "Top Pages",
            "description": "How many pages from the top search results we fetch and read, 3 to 10. Empty = every organic result the search returned (up to 10). Pages cited by the AI Overview come on top (up to 12), the same pages in Intent and Gain & Gap. The price follows the number of pages read",
            "nullable": true
          },
          "include_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Include Domains",
            "description": "Read only pages from these domains (subdomains included), e.g. [\"example.com\"]. Up to 20. Fewer pages left = analysis and price for the pages left (also 1 or 2); none left = only the search results are charged"
          },
          "exclude_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Exclude Domains",
            "description": "Skip pages from these domains (subdomains included), e.g. forums, marketplaces or competitors. Lower results take their place. Up to 50. Fewer pages left = analysis and price for the pages left (also 1 or 2); none left = only the search results are charged"
          },
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "description": "basic: search intent from the results; premium: + Ani reads the top pages; compare: + your page (`compare_url`) next to them. Legacy `lite` = basic, `full` = premium",
            "default": "basic"
          },
          "freshness": {
            "type": "string",
            "enum": [
              "auto",
              "fresh"
            ],
            "title": "Freshness",
            "description": "auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price)",
            "default": "auto"
          },
          "max_age_days": {
            "type": "integer",
            "maximum": 7.0,
            "minimum": 0.0,
            "title": "Max Age Days",
            "description": "Oldest results reused with freshness=auto (default 3 days)",
            "nullable": true
          },
          "report_lang": {
            "type": "string",
            "enum": [
              "en",
              "pl",
              null
            ],
            "title": "Report Lang",
            "description": "Report language: en | pl; exports and share link. Empty = Accept-Language, else en",
            "nullable": true
          },
          "serp": {
            "description": "Your own search results for the phrase instead of ours: no search results fee, nothing shared with other customers",
            "anyOf": [
              {
                "$ref": "#/components/schemas/ClientSerp"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "pages": {
            "items": {
              "$ref": "#/components/schemas/ClientPage"
            },
            "type": "array",
            "maxItems": 10,
            "minItems": 3,
            "title": "Pages",
            "description": "premium and compare: documents of the top pages (3 to 10) instead of fetching them: no page fetch fee",
            "nullable": true
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "description": "Project public id (prj_…); default project when omitted",
            "nullable": true
          },
          "compare_url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Compare Url",
            "description": "Your page (http/https), required with tier=compare and only there",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "IntentRequest",
        "description": "One phrase and market to report on."
      },
      "IntentRow": {
        "properties": {
          "intent_id": {
            "type": "string",
            "title": "Intent Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "form": {
            "type": "string",
            "title": "Form",
            "default": ""
          },
          "answer_share": {
            "type": "number",
            "title": "Answer Share",
            "default": 0.0
          },
          "coverage": {
            "type": "number",
            "title": "Coverage",
            "default": 0.0
          },
          "traffic_share": {
            "type": "number",
            "title": "Traffic Share",
            "nullable": true
          },
          "best_rank": {
            "type": "integer",
            "title": "Best Rank",
            "nullable": true
          },
          "searcher_goal": {
            "type": "string",
            "title": "Searcher Goal",
            "default": ""
          },
          "ranks": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Ranks",
            "default": []
          },
          "median_words": {
            "type": "integer",
            "title": "Median Words",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "intent_id",
          "title"
        ],
        "title": "IntentRow",
        "description": "One search intent: share of the top results, coverage and best rank."
      },
      "IntentSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Intent report id (`itr_…`)."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "description": "`queued`, `running`, `done`, `failed` or `cancelled` (batch phrase cancelled before it started, not charged)."
          },
          "query": {
            "type": "string",
            "title": "Query",
            "description": "Search phrase."
          },
          "market": {
            "type": "string",
            "title": "Market",
            "description": "Market (language-COUNTRY, e.g. `en-US`)."
          },
          "device": {
            "type": "string",
            "title": "Device",
            "default": "desktop",
            "description": "`desktop` or `mobile`."
          },
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "default": "basic",
            "description": "`basic`, `premium` or `compare`."
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "description": "Project id (`prj_…`).",
            "nullable": true
          },
          "batch_id": {
            "type": "string",
            "title": "Batch Id",
            "description": "Batch id when ordered with `POST /v1/intent/batch`.",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "Ordered."
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "title": "Finished At",
            "description": "Finished.",
            "nullable": true
          },
          "error": {
            "type": "string",
            "enum": [
              "intent_failed",
              null
            ],
            "title": "Error",
            "description": "Why the report failed (`intent_failed`); null otherwise. Failed reports are not charged.",
            "nullable": true
          },
          "cache": {
            "type": "string",
            "enum": [
              "miss",
              "serp",
              "profile",
              null
            ],
            "title": "Cache",
            "description": "Reuse of recent search results: `miss` (new), `serp` (results reused), `profile` (whole report reused).",
            "nullable": true
          },
          "dominant_title": {
            "type": "string",
            "title": "Dominant Title",
            "description": "Name of the main search intent.",
            "nullable": true
          },
          "dominant_share": {
            "type": "number",
            "title": "Dominant Share",
            "description": "Share of results with the main intent (0-1).",
            "nullable": true
          },
          "snapshot_at": {
            "type": "string",
            "title": "Snapshot At",
            "description": "Date of the search results used.",
            "nullable": true
          },
          "report_lang": {
            "type": "string",
            "title": "Report Lang",
            "description": "Report language.",
            "nullable": true
          },
          "queue_state": {
            "type": "string",
            "enum": [
              "running",
              "delayed",
              null
            ],
            "title": "Queue State",
            "description": "Only while `status` is queued or running: `delayed` = no live background run for over 2 minutes (for example after an infrastructure restart); the phrase is picked up again automatically, poll less often (Retry-After 60).",
            "nullable": true
          },
          "compare_url": {
            "type": "string",
            "title": "Compare Url",
            "description": "Your page compared with the top results (tier `compare`).",
            "nullable": true
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true,
            "description": "Price charged in USD."
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "query",
          "market",
          "created_at",
          "price_usd"
        ],
        "title": "IntentSummary",
        "description": "One report in the history list: status, phrase, market, main intent and price."
      },
      "LabelBatchRequest": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/LabelInput"
            },
            "type": "array",
            "maxItems": 1000,
            "minItems": 1,
            "title": "Items",
            "description": "Up to 1000 items. An invalid item (empty, more than one of url/html/text, bad URL, field too long) does not reject the batch: it comes back as an item with `status: error`, an `error_code` and its `index` and `ref`, and is not charged"
          },
          "taxonomies": {
            "items": {
              "type": "string",
              "enum": [
                "iab",
                "google"
              ]
            },
            "type": "array",
            "maxItems": 2,
            "minItems": 1,
            "title": "Taxonomies"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "nullable": true
          },
          "render_js": {
            "type": "boolean",
            "title": "Render Js",
            "description": "Default for items without their own render_js",
            "nullable": true
          },
          "webhook_url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Webhook Url",
            "description": "https URL notified (signed POST, event `labels.finished`) when the batch finishes",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "LabelBatchRequest",
        "description": "Up to 1000 items labeled in the background. Results by `GET` or a webhook. An invalid item does not reject the batch: it comes back with `status: error` and an `error_code`, not charged."
      },
      "LabelCancelResult": {
        "properties": {
          "run": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LabelRun"
              }
            ],
            "description": "The batch after the cancel"
          },
          "changed": {
            "type": "boolean",
            "title": "Changed",
            "description": "True when this call cancelled items; false when there was nothing left to cancel"
          }
        },
        "type": "object",
        "required": [
          "run",
          "changed"
        ],
        "title": "LabelCancelResult",
        "description": "The batch after a cancel. `changed` is false when there was nothing left to cancel."
      },
      "LabelEstimate": {
        "properties": {
          "checks": {
            "type": "integer",
            "title": "Checks"
          },
          "estimated_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceRange"
              }
            ],
            "description": "Estimated price (USD): exact per-check price × checks, the same for batches and single calls"
          },
          "price_per_check_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceRange"
              }
            ],
            "description": "Exact price per check in a batch (USD)"
          },
          "price_per_single_call_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceRange"
              }
            ],
            "description": "Price per single `POST /v1/labels` call (USD): equal to `price_per_check_usd`"
          },
          "model_per_check_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceRange"
              }
            ],
            "description": "Labeling part per check (USD): tokens × price per 1M tokens"
          },
          "fetch_per_check_usd": {
            "type": "number",
            "title": "Fetch Per Check Usd",
            "description": "Fetch part per check (USD), `url` only",
            "default": 0.0
          },
          "render_per_check_usd": {
            "type": "number",
            "title": "Render Per Check Usd",
            "description": "JavaScript rendering part per check (USD), `render_js` only",
            "default": 0.0
          },
          "model_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceRange"
              }
            ],
            "description": "Labeling part for all checks (USD)"
          },
          "fetch_usd": {
            "type": "number",
            "title": "Fetch Usd",
            "description": "Fetch part for all checks (USD)",
            "default": 0.0
          },
          "render_usd": {
            "type": "number",
            "title": "Render Usd",
            "description": "JavaScript rendering part for all checks (USD)",
            "default": 0.0
          },
          "rates": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LabelRates"
              }
            ],
            "description": "Rates behind the parts"
          },
          "hold_usd": {
            "type": "number",
            "title": "Hold Usd",
            "description": "Amount held when you start (maximum price), the unused part is returned"
          },
          "document_tokens_per_check": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PriceRange"
              }
            ],
            "description": "Secondary detail: estimated tokens per check"
          },
          "per_1000_checks": {
            "additionalProperties": {
              "items": {
                "$ref": "#/components/schemas/SizePrice"
              },
              "type": "array"
            },
            "type": "object",
            "title": "Per 1000 Checks",
            "description": "Price per 1000 checks by page size, keyed by number of taxonomies (`1`, `2`)"
          }
        },
        "type": "object",
        "required": [
          "checks",
          "estimated_usd",
          "price_per_check_usd",
          "price_per_single_call_usd",
          "model_per_check_usd",
          "model_usd",
          "rates",
          "hold_usd",
          "document_tokens_per_check",
          "per_1000_checks"
        ],
        "title": "LabelEstimate",
        "description": "Estimated total and price per check (low, typical, high), the amount that would be held, and the price per 1000 checks for short, typical and long pages."
      },
      "LabelEstimateRequest": {
        "properties": {
          "checks": {
            "type": "integer",
            "maximum": 1000000.0,
            "minimum": 1.0,
            "title": "Checks",
            "description": "Number of pages or texts to label"
          },
          "taxonomies": {
            "items": {
              "type": "string",
              "enum": [
                "iab",
                "google"
              ]
            },
            "type": "array",
            "maxItems": 2,
            "minItems": 1,
            "title": "Taxonomies"
          },
          "variant": {
            "type": "string",
            "enum": [
              "document",
              "url"
            ],
            "title": "Variant",
            "description": "`document` = you send text or html, `url` = we fetch",
            "default": "url"
          },
          "render_js": {
            "type": "boolean",
            "title": "Render Js",
            "description": "URL only: price with JavaScript rendering",
            "default": false
          },
          "avg_chars": {
            "type": "integer",
            "maximum": 50000.0,
            "minimum": 0.0,
            "title": "Avg Chars",
            "description": "Average text length in characters",
            "nullable": true
          },
          "samples": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Samples",
            "description": "Up to 20 sample texts (not stored)"
          }
        },
        "type": "object",
        "required": [
          "checks"
        ],
        "title": "LabelEstimateRequest",
        "description": "Free price estimate before you label. Without sample texts the estimate uses typical page sizes."
      },
      "LabelInput": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Url",
            "description": "Page address: we fetch it (+fetch price per check)",
            "nullable": true
          },
          "html": {
            "type": "string",
            "maxLength": 2000000,
            "title": "Html",
            "description": "Page HTML you already have (up to 2,000,000 characters): we extract the title and main content the same way as after a fetch, without fetching. Price as for text (no fetch price)",
            "nullable": true
          },
          "text": {
            "type": "string",
            "maxLength": 50000,
            "title": "Text",
            "description": "Plain text or Markdown (up to 50,000 characters), no fetch",
            "nullable": true
          },
          "source_url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Source Url",
            "description": "Only with html: the address the HTML comes from (http or https). We do not fetch it; it tells us whether the page is a home page and which links are internal. Without it we use the canonical address in the HTML, if any",
            "nullable": true
          },
          "ref": {
            "type": "string",
            "maxLength": 200,
            "title": "Ref",
            "description": "Your own id for this item, echoed back in results",
            "nullable": true
          },
          "render_js": {
            "type": "boolean",
            "title": "Render Js",
            "description": "Render JavaScript (URL only): true = render (+render price per check, charged only when rendered); false or empty = no rendering (default, regardless of the project setting). A page that blocks plain fetching fails without charge. Ignored for html and text.",
            "nullable": true
          }
        },
        "type": "object",
        "title": "LabelInput",
        "description": "One batch item. Give exactly one of `url` (we fetch it), `html` (page you already have, same extraction as after a fetch) or `text`. `ref` is your own id, returned unchanged."
      },
      "LabelRates": {
        "properties": {
          "model_per_1m_tokens_per_taxonomy": {
            "type": "number",
            "title": "Model Per 1M Tokens Per Taxonomy",
            "description": "Labeling: USD per 1M document tokens, per taxonomy"
          },
          "fetch_per_url": {
            "type": "number",
            "title": "Fetch Per Url",
            "description": "Page fetch: USD per URL we fetch"
          },
          "render_per_url": {
            "type": "number",
            "title": "Render Per Url",
            "description": "JavaScript rendering: USD per page rendered (only `render_js: true`)"
          }
        },
        "type": "object",
        "required": [
          "model_per_1m_tokens_per_taxonomy",
          "fetch_per_url",
          "render_per_url"
        ],
        "title": "LabelRates"
      },
      "LabelRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Url",
            "description": "Page address: we fetch it (+fetch price per check)",
            "nullable": true
          },
          "html": {
            "type": "string",
            "maxLength": 2000000,
            "title": "Html",
            "description": "Page HTML you already have (up to 2,000,000 characters): we extract the title and main content the same way as after a fetch, without fetching. Price as for text (no fetch price)",
            "nullable": true
          },
          "text": {
            "type": "string",
            "maxLength": 50000,
            "title": "Text",
            "description": "Plain text or Markdown (up to 50,000 characters), no fetch",
            "nullable": true
          },
          "source_url": {
            "type": "string",
            "maxLength": 2048,
            "title": "Source Url",
            "description": "Only with html: the address the HTML comes from (http or https). We do not fetch it; it tells us whether the page is a home page and which links are internal. Without it we use the canonical address in the HTML, if any",
            "nullable": true
          },
          "ref": {
            "type": "string",
            "maxLength": 200,
            "title": "Ref",
            "description": "Your own id for this item, echoed back in results",
            "nullable": true
          },
          "render_js": {
            "type": "boolean",
            "title": "Render Js",
            "description": "Render JavaScript (URL only): true = render (+render price per check, charged only when rendered); false or empty = no rendering (default, regardless of the project setting). A page that blocks plain fetching fails without charge. Ignored for html and text.",
            "nullable": true
          },
          "taxonomies": {
            "items": {
              "type": "string",
              "enum": [
                "iab",
                "google"
              ]
            },
            "type": "array",
            "maxItems": 2,
            "minItems": 1,
            "title": "Taxonomies"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "nullable": true
          }
        },
        "type": "object",
        "title": "LabelRequest",
        "description": "One page or text to label. Give exactly one of `url`, `html` or `text`."
      },
      "LabelResult": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index",
            "default": 0
          },
          "ref": {
            "type": "string",
            "title": "Ref",
            "nullable": true
          },
          "url": {
            "type": "string",
            "title": "Url",
            "nullable": true
          },
          "variant": {
            "type": "string",
            "enum": [
              "document",
              "url"
            ],
            "title": "Variant",
            "description": "Price variant: `document` (you sent text or html, no fetch) or `url` (we fetched the page)",
            "default": "url"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "ok",
              "partial",
              "error",
              "cancelled"
            ],
            "title": "Status",
            "default": "pending"
          },
          "error": {
            "type": "string",
            "title": "Error",
            "nullable": true
          },
          "error_code": {
            "type": "string",
            "title": "Error Code",
            "description": "Set only for a batch item rejected when the batch was accepted (`missing_input`, `multiple_inputs`, `invalid_url`, `field_too_long`, `invalid_source_url`, `invalid_item`): it was not run and not charged. Null for other results, including fetch and labeling errors",
            "nullable": true
          },
          "rendered": {
            "type": "boolean",
            "title": "Rendered",
            "default": false
          },
          "low_content": {
            "type": "boolean",
            "title": "Low Content",
            "description": "Less than about 600 characters of readable text: labels are less reliable (below 100 characters the item fails with no charge)",
            "default": false
          },
          "labels": {
            "additionalProperties": {
              "$ref": "#/components/schemas/TaxonomyLabels"
            },
            "type": "object",
            "title": "Labels"
          },
          "failed": {
            "items": {
              "type": "string",
              "enum": [
                "iab",
                "google"
              ]
            },
            "type": "array",
            "title": "Failed"
          },
          "charged_usd": {
            "type": "number",
            "title": "Charged Usd",
            "description": "Price of this check (USD); null until finished. Failed checks and taxonomies cost nothing. Exact price, the same in a batch and in `POST /v1/labels`; fractions of $0.0001 are carried to your next charge",
            "nullable": true
          },
          "model_usd": {
            "type": "number",
            "title": "Model Usd",
            "description": "Part of `charged_usd` for labeling: document tokens × the price per 1M tokens per taxonomy; null until finished",
            "nullable": true
          },
          "fetch_usd": {
            "type": "number",
            "title": "Fetch Usd",
            "description": "Part of `charged_usd` for fetching the page (`url` only); null until finished",
            "nullable": true
          },
          "render_usd": {
            "type": "number",
            "title": "Render Usd",
            "description": "Part of `charged_usd` for JavaScript rendering (only when the page was rendered); null until finished",
            "nullable": true
          },
          "document_tokens": {
            "type": "integer",
            "title": "Document Tokens",
            "description": "Secondary detail: document tokens billed for this check, summed over successful taxonomies; null until finished",
            "nullable": true
          },
          "run_id": {
            "type": "string",
            "title": "Run Id",
            "description": "Id of the run (`lbl_…`), returned by `POST /v1/labels`. Use it with `index` 0 to recheck the page or get the AI agent pack",
            "nullable": true
          }
        },
        "type": "object",
        "title": "LabelResult",
        "description": "Result of one item. `labels` has only taxonomies that answered; `failed` lists taxonomies without a result (not charged)."
      },
      "LabelRun": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "cancelling",
              "done",
              "partial",
              "failed",
              "cancelled"
            ],
            "title": "Status"
          },
          "batch": {
            "type": "boolean",
            "title": "Batch",
            "default": false
          },
          "project_id": {
            "type": "string",
            "title": "Project Id",
            "nullable": true
          },
          "taxonomies": {
            "items": {
              "type": "string",
              "enum": [
                "iab",
                "google"
              ]
            },
            "type": "array",
            "title": "Taxonomies"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "title": "Finished At",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "done": {
            "type": "integer",
            "title": "Done",
            "description": "Items finished with a result or an error (cancelled items not included)",
            "default": 0
          },
          "errors": {
            "type": "integer",
            "title": "Errors",
            "default": 0
          },
          "cancelled": {
            "type": "integer",
            "title": "Cancelled",
            "description": "Items cancelled before they started: not run and not charged",
            "default": 0
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "description": "Amount held for the batch (USD): the maximum price of every check",
            "default": 0.0
          },
          "estimated_usd": {
            "type": "number",
            "title": "Estimated Usd",
            "description": "Estimated price (USD) for typical page sizes; you pay the actual price, never more than `price_usd`",
            "nullable": true
          },
          "charged_usd": {
            "type": "number",
            "title": "Charged Usd",
            "description": "Price of the run (USD): exact sum of item prices. The balance moves in $0.0001 steps; fractions are carried to your next charge",
            "nullable": true
          },
          "model_usd": {
            "type": "number",
            "title": "Model Usd",
            "description": "Labeling part of `charged_usd` (sum of items)",
            "nullable": true
          },
          "fetch_usd": {
            "type": "number",
            "title": "Fetch Usd",
            "description": "Page fetch part of `charged_usd` (sum of items)",
            "nullable": true
          },
          "render_usd": {
            "type": "number",
            "title": "Render Usd",
            "description": "JavaScript rendering part of `charged_usd` (sum of items)",
            "nullable": true
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/LabelResult"
            },
            "type": "array",
            "title": "Items"
          },
          "error": {
            "type": "string",
            "title": "Error",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "taxonomies",
          "created_at",
          "total"
        ],
        "title": "LabelRun",
        "description": "A label run (`lbl_…`): a single call or a batch. `price_usd` is the amount held, `charged_usd` the amount paid; failed items, taxonomies and renders that did not happen are refunded."
      },
      "PageFacts": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "rank": {
            "type": "integer",
            "title": "Rank",
            "nullable": true
          },
          "aio_source": {
            "type": "boolean",
            "title": "Aio Source",
            "description": "A page cited by the AI Overview, outside the organic results. Present only when true; length, element shares and expectation coverage count only the ranking pages",
            "default": false
          },
          "domain": {
            "type": "string",
            "title": "Domain",
            "default": ""
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": ""
          },
          "ok": {
            "type": "boolean",
            "title": "Ok",
            "default": true
          },
          "error": {
            "type": "string",
            "title": "Error",
            "nullable": true
          },
          "unread": {
            "type": "string",
            "enum": [
              "pdf",
              "pdf_scan",
              "pdf_encrypted",
              "pdf_broken",
              "login",
              "js_shell",
              "too_short",
              null
            ],
            "title": "Unread",
            "description": "The page was fetched but gave almost no text to read: pdf (PDF file without readable text), pdf_scan (scanned PDF without a text layer), pdf_encrypted (password-protected PDF), pdf_broken (damaged PDF or read limit), login (login form), js_shell (page built by JavaScript), too_short (fewer than 50 words of main text). Present only when set; such a page does not count towards length, element shares or expectation coverage",
            "nullable": true
          },
          "words": {
            "type": "integer",
            "title": "Words",
            "nullable": true
          },
          "elements": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Elements",
            "default": {}
          },
          "outline": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Outline",
            "default": []
          },
          "text": {
            "type": "string",
            "title": "Text",
            "default": ""
          },
          "met": {
            "items": {
              "type": "integer",
              "nullable": true
            },
            "type": "array",
            "title": "Met",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "PageFacts",
        "description": "One page (a top page or yours). `ok: false` means it could not be fetched (`error` says why)."
      },
      "PageScopeInfo": {
        "properties": {
          "requested": {
            "type": "integer",
            "title": "Requested",
            "description": "Pages you asked for (10 = every organic result when you set only domains)"
          },
          "analyzed": {
            "type": "integer",
            "title": "Analyzed",
            "description": "Pages taken for the analysis: fewer than requested when the domain filter left fewer results"
          },
          "results": {
            "type": "integer",
            "title": "Results",
            "description": "Organic results with an address in the search results"
          },
          "filtered": {
            "type": "integer",
            "title": "Filtered",
            "description": "Results skipped by your domain filter",
            "default": 0
          },
          "include_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Include Domains",
            "default": []
          },
          "exclude_domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Exclude Domains",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "requested",
          "analyzed",
          "results"
        ],
        "title": "PageScopeInfo"
      },
      "PriceRange": {
        "properties": {
          "low": {
            "type": "number",
            "title": "Low"
          },
          "typical": {
            "type": "number",
            "title": "Typical"
          },
          "high": {
            "type": "number",
            "title": "High"
          }
        },
        "type": "object",
        "required": [
          "low",
          "typical",
          "high"
        ],
        "title": "PriceRange",
        "description": "Low, typical and high value."
      },
      "Question": {
        "properties": {
          "question": {
            "type": "string",
            "title": "Question"
          },
          "coverage": {
            "type": "number",
            "title": "Coverage",
            "default": 0.0
          },
          "source": {
            "type": "string",
            "title": "Source",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "question"
        ],
        "title": "Question",
        "description": "A reader question or heading topic, with the share of results that cover it."
      },
      "ResultMap": {
        "properties": {
          "result_id": {
            "type": "string",
            "title": "Result Id"
          },
          "rank": {
            "type": "integer",
            "title": "Rank",
            "nullable": true
          },
          "domain": {
            "type": "string",
            "title": "Domain",
            "default": ""
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": ""
          },
          "intent_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Intent Ids",
            "default": []
          },
          "page_type": {
            "type": "string",
            "title": "Page Type",
            "nullable": true
          }
        },
        "type": "object",
        "required": [
          "result_id"
        ],
        "title": "ResultMap",
        "description": "One organic result and the search intents it serves, with the page type."
      },
      "SizePrice": {
        "properties": {
          "size": {
            "type": "string",
            "enum": [
              "short",
              "typical",
              "max"
            ],
            "title": "Size"
          },
          "document_tokens": {
            "type": "integer",
            "title": "Document Tokens"
          },
          "model": {
            "type": "number",
            "title": "Model",
            "description": "Labeling part per 1000 checks (USD): document tokens × price per 1M tokens",
            "default": 0.0
          },
          "fetch": {
            "type": "number",
            "title": "Fetch",
            "description": "Fetch part per 1000 checks (USD), `url` only",
            "default": 0.0
          },
          "document": {
            "type": "number",
            "title": "Document",
            "description": "Price per 1000 checks, text you send (USD)"
          },
          "url": {
            "type": "number",
            "title": "Url",
            "description": "Price per 1000 checks, URL we fetch (USD)"
          }
        },
        "type": "object",
        "required": [
          "size",
          "document_tokens",
          "document",
          "url"
        ],
        "title": "SizePrice",
        "description": "Price per 1000 checks for one page size, for texts you send (`document`) and URLs we fetch (`url`)."
      },
      "Suggestion": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text"
          },
          "source": {
            "type": "string",
            "enum": [
              "model",
              "fallback"
            ],
            "title": "Source",
            "default": "model"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "Suggestion",
        "description": "A suggestion for your page."
      },
      "TaxonomyLabels": {
        "properties": {
          "taxonomy": {
            "type": "string",
            "enum": [
              "iab",
              "google"
            ],
            "title": "Taxonomy"
          },
          "taxonomy_name": {
            "type": "string",
            "title": "Taxonomy Name"
          },
          "primary": {
            "description": "Main category: the deepest category of the best path in the main top-level branch (older responses: the top-level category). Its `strength` is the strength of the whole path from the top level (product of the level choices), so it gets lower the deeper `primary` is; see `primary_path` for the strength of each level",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Category"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "primary_l1": {
            "description": "Main top-level category (the branch of `primary`)",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Category"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "paths": {
            "items": {
              "$ref": "#/components/schemas/CategoryPath"
            },
            "type": "array",
            "title": "Paths",
            "description": "Best paths, strongest first. IAB: only under the main top-level category and at most one secondary one; a secondary top-level category without a strong enough deeper path is listed alone, last"
          },
          "primary_path": {
            "items": {
              "$ref": "#/components/schemas/CategoryLevel"
            },
            "type": "array",
            "title": "Primary Path",
            "description": "Path of `primary` from the top level down, each level with its conditional strength (how sure the classifier is of this level given the level above). Empty for older results"
          },
          "primary_confident": {
            "description": "Deepest level of `primary_path` reached while every level so far has conditional strength at or above the taxonomy threshold (IAB 35, Google 25); `strength` = conditional strength of that level. Null when the top level is below the threshold or for older results",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Category"
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "taxonomy",
          "taxonomy_name"
        ],
        "title": "TaxonomyLabels",
        "description": "Labels from one taxonomy: main category, main top-level category and best paths."
      },
      "UnreadGroup": {
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "video",
              "audio",
              "login",
              "pdf",
              "js_only",
              "little_text",
              "not_fetched"
            ],
            "title": "Kind",
            "description": "video / audio = a video or audio site (we do not analyse video or audio content, neither the media nor a transcript); login = login form; pdf = PDF without readable text; js_only = content loads only with JavaScript; little_text = fewer than 50 words of main text (for example a shop listing); not_fetched = the page could not be fetched"
          },
          "count": {
            "type": "integer",
            "title": "Count",
            "description": "Number of top results of this kind"
          },
          "domains": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Domains",
            "description": "Their domains, in ranking order, without duplicates",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "kind",
          "count"
        ],
        "title": "UnreadGroup"
      },
      "UnreadableSummary": {
        "properties": {
          "top": {
            "type": "integer",
            "title": "Top",
            "description": "Top results (organic ranking) taken for reading"
          },
          "readable": {
            "type": "integer",
            "title": "Readable",
            "description": "Top results that gave text when fetched (fetch information; whether Ani analysed them is in `basis`)"
          },
          "basis": {
            "type": "string",
            "enum": [
              "results_and_pages",
              "results_only"
            ],
            "title": "Basis",
            "description": "What the intent assessment is based on: results_and_pages = the types and titles of the search results and the `readable` pages; results_only = only the types and titles of the search results (too few top results had text, so no page was analysed, also the `readable` ones)",
            "default": "results_and_pages"
          },
          "groups": {
            "items": {
              "$ref": "#/components/schemas/UnreadGroup"
            },
            "type": "array",
            "title": "Groups",
            "description": "Top results without text, by kind",
            "default": []
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "The same in one or two sentences (English)",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "top",
          "readable"
        ],
        "title": "UnreadableSummary"
      },
      "CategoryPath": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Id of the deepest category of the path"
          },
          "path": {
            "type": "string",
            "title": "Path",
            "description": "Names from the top level down, joined with ' > '"
          },
          "strength": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Strength",
            "description": "Strength of the whole path 0-100 (ranking, not a probability)"
          }
        },
        "type": "object",
        "required": [
          "id",
          "path",
          "strength"
        ],
        "title": "CategoryPath",
        "description": "A path from the top level down; `id` is the deepest category of the path."
      }
    }
  }
}
