# Dokumentacja API

Source: https://docs.askaniela.com/pl/reference/api/

Wszystkie endpointy REST API AskAniela z parametrami, treścią żądania, odpowiedziami i przykładami. Opisy endpointów są po angielsku. Adres bazowy `https://api.askaniela.com`, klucz w nagłówku `Authorization: Bearer gsj_...` ([Uwierzytelnianie](https://docs.askaniela.com/pl/guide/authentication.md)). Każda odpowiedź ma nagłówek `X-Request-ID`; błędy mają [wspólny format](https://docs.askaniela.com/pl/reference/errors.md). Ta sama treść jako czysty Markdown: `https://docs.askaniela.com/pl/reference/api.md`.

Do odczytu maszynowego: `https://docs.askaniela.com/reference/openapi.json` (OpenAPI 3.1); tylko Labeler i Search Intent w OpenAPI 3.0.3: `https://docs.askaniela.com/reference/openapi-partners.json`. Widok interaktywny (wymaga JavaScriptu): [eksplorator API](https://docs.askaniela.com/pl/reference/api-explorer.md).

## Spis treści {#contents}

- [judge](#tag-judge) (3 endpointów): Check one page or a small batch synchronously (paid).
- [jobs](#tag-jobs) (7 endpointów): Queued jobs for many pages (paid), status, results, webhooks.
- [audits](#tag-audits) (26 endpointów): Site audits: preview, estimate, order (paid), progress, exports.
- [reports](#tag-reports) (9 endpointów): Stored page reports, exports and fix plans.
- [intent](#tag-intent) (11 endpointów): Search intent reports for phrases (paid).
- [infogain](#tag-infogain) (2 endpointów): Gain & Gap: what your text adds beyond the search results and what it misses (paid).
- [query-pack](#tag-query-pack) (2 endpointów): Query Pack: Search Intent and Gain & Gap for one phrase at one price (paid).
- [labels](#tag-labels) (11 endpointów): Page and text labels from IAB Content Taxonomy 3.1 and Google Content Categories v2 (paid).
- [fix-plan](#tag-fix-plan) (14 endpointów): Fix plans for reports and audits.
- [api keys](#tag-api-keys) (8 endpointów): Create, list, rotate and revoke API keys.
- [usage](#tag-usage) (1 endpointów): Spending, balance and limits.
- [status](#tag-status) (2 endpointów): Service state.
- [public](#tag-public) (1 endpointów): No authentication.
- [upgrades](#tag-upgrades) (9 endpointów): Add categories to a report or audit, refresh evidence.
- [sharing](#tag-sharing) (15 endpointów): Public read-only share links.
- [projects](#tag-projects) (8 endpointów): Projects and members.
- [webhooks](#tag-webhooks) (7 endpointów): Organization webhooks.
- [feedback](#tag-feedback) (2 endpointów): Feedback on rules and reports.
- [auth](#tag-auth) (9 endpointów): Sign-in (browser session or JWT).
- [account](#tag-account) (20 endpointów): Your account and step-up.
- [users](#tag-users) (5 endpointów): Users (admin).
- [organizations](#tag-organizations) (23 endpointów): Organizations and members.
- [invites](#tag-invites) (3 endpointów): Beta invitations.
- [billing](#tag-billing) (6 endpointów): Balance top-ups by payment link, balance history and invoices.
- [addons](#tag-addons) (4 endpointów): Add a section (indexing, How to fix, visibility, missing audit types) to a finished report or audit (paid).
- [context](#tag-context) (2 endpointów): Page context: how well title, headings and meta match the content (paid).
- [indexing](#tag-indexing) (4 endpointów): Google indexing state of URLs or audit pages (paid).
- [search-console](#tag-search-console) (6 endpointów)
- [Schematy](#schemas)

## judge {#tag-judge}

Check one page or a small batch synchronously (paid).

- [`POST /v1/judge`](#post-v1-judge): Check one page
- [`GET /v1/rules`](#get-v1-rules): List rules
- [`POST /v1/judge/batch`](#post-v1-judge-batch): Check a small batch

### `POST /v1/judge` {#post-v1-judge}

**Check one page**

Checks one page synchronously against Google spam policies and quality guidelines and returns the report with `report_id`. Give `url`, `html` or `text`; `modes` picks audit types, `explain` adds quotes and fixes. Takes up to a few minutes; for many pages use `POST /v1/jobs`. Article before publishing (guest post, sponsored article): `text` with links as `[anchor](https://docs.askaniela.com/reference/address)`, `url` = article address or publisher's domain (context, not fetched), `rules: ["preset:guest-post"]`, `explain: true`; $0.03 per text. Price per checked page (pay-as-you-go list): spam $0.03, quality $0.03, helpful $0.015 (all three $0.065); fetching $0.0015, JavaScript rendering +$0.006. How to fix is a paid add-on ($0.10 per page that needs changes, pages without issues free; `POST .../fix-plan/order`). Plans are cheaper; failed pages and unscored checks are not charged. Exact prices: `GET /v1/tiers`. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [JudgeRequest](#schema-judgerequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `modes` | array of [Category-Input](#schema-category-input) or null |  | Audit modes: spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing. |
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `url` | string or null |  | Page address (http/https). Give at least one of `url`, `html` or `text`; with `html` the URL is kept as context and the page is not fetched. |
| `html` | string or null |  | Raw HTML of the page (no fetch, no fetch fee); wins over `url` as the content source. |
| `text` | string or null |  | Plain text of the page (no fetch; checks that need links or HTML are skipped). |
| `name` | string or null |  |  |
| `render_js` | string or null |  | Render JavaScript: true = always (+ render_js price, USD), false = never, auto = only after a block/empty shell (surcharge only when rendered); empty = project setting |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `query` | string or null |  | Target search phrase for the page (optional). Enables search intent checks; without it those checks are listed in `not_assessed`. |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |

Przykład:

```json
{
  "url": "https://example.com/best-vpn-2026",
  "modes": [
    "spam"
  ],
  "report_lang": "en"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JudgeResponse](#schema-judgeresponse) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `invalid_url`, `unknown_rule`, `rule_disabled` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `no_rules_for_input`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `502` | Error codes: `fetch_failed`, `inference_failed` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "url": "https://example.com/best-vpn-2026",
  "profile": {
    "prompt_ver": "p6"
  },
  "extraction_ok": true,
  "truncated": false,
  "violations": [
    {
      "rule_id": "SP-KWS",
      "rule_ver": 3,
      "layer": "spam",
      "kind": "violation",
      "policy": "Keyword stuffing",
      "detectability": "P",
      "ok": true,
      "signal": 91,
      "signal_level": "high",
      "near": false,
      "answer_type": "binary",
      "unsupported": false,
      "evidence": {
        "quotes": [
          {
            "text": "best vpn cheap vpn top vpn 2026",
            "verified": true
          }
        ],
        "supported": true,
        "fix": "Rewrite the intro in natural sentences and keep one mention of the phrase.",
        "fix_lang": "en"
      }
    }
  ],
  "quality_signals": [],
  "not_assessed": [],
  "report_lang": "en",
  "report_id": "rep_nqnhkjnnoj5yd2fg"
}
```

### `GET /v1/rules` {#get-v1-rules}

**List rules**

Lists the rules you can choose in `rules`: id, short name, group and audit type (`mode`). Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [RuleBrief](#schema-rulebrief) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
[
  {
    "id": "SP-KWS",
    "title": "Keyword stuffing",
    "title_pl": "Upychanie słów kluczowych",
    "layer": "spam",
    "mode": "spam"
  }
]
```

### `POST /v1/judge/batch` {#post-v1-judge-batch}

**Check a small batch**

Checks a small batch synchronously (up to the batch limit, default 10 pages). Larger batches: `POST /v1/jobs`. Errors are per item (`results[].error`) and do not stop the batch. Price per checked page (pay-as-you-go list): spam $0.03, quality $0.03, helpful $0.015 (all three $0.065); fetching $0.0015, JavaScript rendering +$0.006. How to fix is a paid add-on ($0.10 per page that needs changes, pages without issues free; `POST .../fix-plan/order`). Plans are cheaper; failed pages and unscored checks are not charged. Exact prices: `GET /v1/tiers`. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [BatchRequest](#schema-batchrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `modes` | array of [Category-Input](#schema-category-input) or null |  | Audit modes: spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing. |
| `items` | array of [IngestInput](#schema-ingestinput) | tak | Pages to check (each with `url`, `html` or `text`). At most the batch limit; larger lists: `POST /v1/jobs`. |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |

Przykład:

```json
{
  "items": [
    {
      "url": "https://example.com/best-vpn-2026"
    },
    {
      "text": "Plain text of a second page..."
    }
  ],
  "modes": [
    "spam"
  ]
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [BatchResponse](#schema-batchresponse) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `invalid_url`, `unknown_rule` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `413` | Error codes: `batch_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `no_rules_for_input`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "results": [
    {
      "index": 0,
      "report": {
        "url": "https://example.com/best-vpn-2026",
        "profile": {
          "prompt_ver": "p6"
        },
        "extraction_ok": true,
        "truncated": false,
        "violations": [
          {
            "rule_id": "SP-KWS",
            "rule_ver": 3,
            "layer": "spam",
            "kind": "violation",
            "policy": "Keyword stuffing",
            "detectability": "P",
            "ok": true,
            "signal": 91,
            "signal_level": "high",
            "near": false,
            "answer_type": "binary",
            "unsupported": false,
            "evidence": {
              "quotes": [
                {
                  "text": "best vpn cheap vpn top vpn 2026",
                  "verified": true
                }
              ],
              "supported": true,
              "fix": "Rewrite the intro in natural sentences and keep one mention of the phrase.",
              "fix_lang": "en"
            }
          }
        ],
        "quality_signals": [],
        "not_assessed": [],
        "report_lang": "en"
      }
    },
    {
      "index": 1,
      "error": "page_failed"
    }
  ]
}
```

## jobs {#tag-jobs}

Queued jobs for many pages (paid), status, results, webhooks.

- [`GET /v1/jobs`](#get-v1-jobs): Jobs
- [`POST /v1/jobs`](#post-v1-jobs): Queue a job
- [`GET /v1/jobs/{job_id}`](#get-v1-jobs-job-id): Job status
- [`GET /v1/jobs/{job_id}/results`](#get-v1-jobs-job-id-results): Job results
- [`POST /v1/jobs/{job_id}/pause`](#post-v1-jobs-job-id-pause): Pause a job
- [`POST /v1/jobs/{job_id}/resume`](#post-v1-jobs-job-id-resume): Resume a job
- [`POST /v1/jobs/{job_id}/cancel`](#post-v1-jobs-job-id-cancel): Cancel a job

### `GET /v1/jobs` {#get-v1-jobs}

**Jobs**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `limit` | query | integer |  | Maximum number of items to return. (default `50`; min 1; max 500) |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [JobRead](#schema-jobread) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/jobs` {#post-v1-jobs}

**Queue a job**

Queues many pages and returns 202 with `job_id` at once. Poll `GET /v1/jobs/{job_id}` (honour `Retry-After`) or pass `webhook_url` for a signed POST at the end. Price per checked page (pay-as-you-go list): spam $0.03, quality $0.03, helpful $0.015 (all three $0.065); fetching $0.0015, JavaScript rendering +$0.006. How to fix is a paid add-on ($0.10 per page that needs changes, pages without issues free; `POST .../fix-plan/order`). Plans are cheaper; failed pages and unscored checks are not charged. Exact prices: `GET /v1/tiers`. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [JobCreate](#schema-jobcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `modes` | array of [Category-Input](#schema-category-input) or null |  | Audit modes: spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing. |
| `items` | array of [IngestInput](#schema-ingestinput) | tak | Pages to check (`url`, `html` or `text`). (min items 1) |
| `targets` | object (map of object) or null |  | Optional target phrase per item: index -> `{query, market}`. |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `fix_plan` | boolean |  | Buy the site fix plan when the audit finishes (paid add-on: price per page that needs changes, no minimum, see pricing `fix_plan`); only with explain=true and confirmed findings. Not enough balance = no plan, the audit still finishes; you can buy it later with POST /v1/audits/{id}/fix-plan/order (default `false`) |
| `webhook_url` | string (uri) or null |  | We send a signed POST (HMAC-SHA256) here when the job ends. |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |

Przykład:

```json
{
  "items": [
    {
      "url": "https://example.com/best-vpn-2026"
    },
    {
      "url": "https://example.com/about"
    }
  ],
  "modes": [
    "spam",
    "quality"
  ],
  "webhook_url": "https://hooks.example.org/askaniela"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [JobAccepted](#schema-jobaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `invalid_webhook_url` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `413` | Error codes: `job_too_large`, `item_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `invalid_target`, `no_rules_for_input`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `too_many_active_jobs` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `queue_unavailable`, `webhooks_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "job_id": "job_3z6ml4smjfnyatur",
  "status": "queued"
}
```

### `GET /v1/jobs/{job_id}` {#get-v1-jobs-job-id}

**Job status**

Job status and progress. While queued or running the response has `Retry-After` (seconds, 15-300, from `progress.eta_seconds`).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `job_id` | path | string | tak | Job id (`job_…`) from `POST /v1/jobs`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JobRead](#schema-jobread) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `job_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "id": "job_3z6ml4smjfnyatur",
  "project_id": "prj_r7buper7ekkwz5ak",
  "status": "running",
  "total": 2,
  "done": 1,
  "failed": 0,
  "report_ids": [
    "rep_nqnhkjnnoj5yd2fg"
  ],
  "errors": [],
  "created_at": "2026-10-21T12:00:00Z"
}
```

### `GET /v1/jobs/{job_id}/results` {#get-v1-jobs-job-id-results}

**Job results**

Result of every item with its URL. Full report: `GET /v1/reports/{report_id}`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `job_id` | path | string | tak | Job id (`job_…`) from `POST /v1/jobs`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [JobResultItem](#schema-jobresultitem) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `job_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
[
  {
    "index": 0,
    "report_id": "rep_nqnhkjnnoj5yd2fg",
    "url": "https://example.com/best-vpn-2026",
    "rendered": false
  },
  {
    "index": 1,
    "error": "fetch_failed: HTTP 404",
    "url": "https://example.com/about"
  }
]
```

### `POST /v1/jobs/{job_id}/pause` {#post-v1-jobs-job-id-pause}

**Pause a job**

Pauses a job: pages in progress finish, new ones do not start. Repeating it is harmless (`changed: false`). Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `job_id` | path | string | tak | Job id (`job_…`) from `POST /v1/jobs`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JobControlResult](#schema-jobcontrolresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `job_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `job_not_controllable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `queue_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "job": {
    "id": "job_3z6ml4smjfnyatur",
    "project_id": "prj_r7buper7ekkwz5ak",
    "status": "paused",
    "total": 2,
    "done": 1,
    "failed": 0,
    "report_ids": [
      "rep_nqnhkjnnoj5yd2fg"
    ],
    "errors": [],
    "created_at": "2026-10-21T12:00:00Z"
  },
  "action": "pause",
  "changed": true
}
```

### `POST /v1/jobs/{job_id}/resume` {#post-v1-jobs-job-id-resume}

**Resume a job**

Resumes a paused job. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `job_id` | path | string | tak | Job id (`job_…`) from `POST /v1/jobs`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JobControlResult](#schema-jobcontrolresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `job_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `job_not_controllable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `queue_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "job": {
    "id": "job_3z6ml4smjfnyatur",
    "project_id": "prj_r7buper7ekkwz5ak",
    "status": "running",
    "total": 2,
    "done": 1,
    "failed": 0,
    "report_ids": [
      "rep_nqnhkjnnoj5yd2fg"
    ],
    "errors": [],
    "created_at": "2026-10-21T12:00:00Z"
  },
  "action": "resume",
  "changed": true
}
```

### `POST /v1/jobs/{job_id}/cancel` {#post-v1-jobs-job-id-cancel}

**Cancel a job**

Stops a job: checked pages stay, unchecked pages are refunded. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `job_id` | path | string | tak | Job id (`job_…`) from `POST /v1/jobs`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JobControlResult](#schema-jobcontrolresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `job_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `job_not_controllable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `queue_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "job": {
    "id": "job_3z6ml4smjfnyatur",
    "project_id": "prj_r7buper7ekkwz5ak",
    "status": "cancelled",
    "total": 2,
    "done": 1,
    "failed": 0,
    "report_ids": [
      "rep_nqnhkjnnoj5yd2fg"
    ],
    "errors": [],
    "created_at": "2026-10-21T12:00:00Z"
  },
  "action": "cancel",
  "changed": true
}
```

## audits {#tag-audits}

Site audits: preview, estimate, order (paid), progress, exports.

- [`POST /v1/audits/{audit_id}/pause`](#post-v1-audits-audit-id-pause): Pause audit
- [`POST /v1/audits/{audit_id}/resume`](#post-v1-audits-audit-id-resume): Resume audit
- [`POST /v1/audits/{audit_id}/cancel`](#post-v1-audits-audit-id-cancel): Cancel audit
- [`POST /v1/audits/{audit_id}/retry-failed`](#post-v1-audits-audit-id-retry-failed): Retry failed pages
- [`POST /v1/audits/{audit_id}/pages/{index}/recheck`](#post-v1-audits-audit-id-pages-index-recheck): Check my fixes (one page)
- [`POST /v1/audits/{audit_id}/pages/recheck`](#post-v1-audits-audit-id-pages-recheck): Check my fixes (many pages)
- [`POST /v1/reports/{report_id}/recheck`](#post-v1-reports-report-id-recheck): Check my fixes (page report)
- [`GET /v1/audits/{audit_id}/pages/{index}/revisions`](#get-v1-audits-audit-id-pages-index-revisions): Page revisions (before and after)
- [`POST /v1/audits/site/preview`](#post-v1-audits-site-preview): Preview a site audit
- [`POST /v1/audits/site/estimate`](#post-v1-audits-site-estimate): Estimate a site audit
- [`POST /v1/audits/site`](#post-v1-audits-site): Order a site audit
- [`GET /v1/audits`](#get-v1-audits): List audits
- [`GET /v1/audits/{audit_id}`](#get-v1-audits-audit-id): Site audit
- [`DELETE /v1/audits/{audit_id}`](#delete-v1-audits-audit-id): Remove Audit
- [`GET /v1/audits/{audit_id}/export.html`](#get-v1-audits-audit-id-export-html): Export Html
- [`GET /v1/audits/{audit_id}/export.pdf`](#get-v1-audits-audit-id-export-pdf): Export Pdf
- [`GET /v1/audits/{audit_id}/export.csv`](#get-v1-audits-audit-id-export-csv): Export Csv
- [`GET /v1/audits/{audit_id}/pruning`](#get-v1-audits-audit-id-pruning): Pruning
- [`GET /v1/audits/{audit_id}/pruning.csv`](#get-v1-audits-audit-id-pruning-csv): Pruning Export Csv
- [`GET /v1/audits/{audit_id}/links.csv`](#get-v1-audits-audit-id-links-csv): Link Graph Export Csv
- [`GET /v1/audits/{audit_id}/export.json`](#get-v1-audits-audit-id-export-json): Audit results as JSON
- [`GET /v1/audits/{audit_id}/export.zip`](#get-v1-audits-audit-id-export-zip): Export Zip
- [`PUT /v1/audits/{audit_id}/draft`](#put-v1-audits-audit-id-draft): Edit a draft site audit
- [`POST /v1/audits/{audit_id}/start`](#post-v1-audits-audit-id-start): Start a draft site audit
- [`POST /v1/audits/{audit_id}/archive`](#post-v1-audits-audit-id-archive): Archive Audit
- [`POST /v1/audits/{audit_id}/unarchive`](#post-v1-audits-audit-id-unarchive): Unarchive Audit

### `POST /v1/audits/{audit_id}/pause` {#post-v1-audits-audit-id-pause}

**Pause audit**

Pause: pages in flight finish, no new pages start; the time limit does not run while paused.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JobControlResult](#schema-jobcontrolresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/resume` {#post-v1-audits-audit-id-resume}

**Resume audit**

Resume a paused job; finished pages are skipped.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JobControlResult](#schema-jobcontrolresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/cancel` {#post-v1-audits-audit-id-cancel}

**Cancel audit**

Stop for good: finished pages stay in the report, unprocessed pages are refunded to the balance.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [JobControlResult](#schema-jobcontrolresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/retry-failed` {#post-v1-audits-audit-id-retry-failed}

**Retry failed pages**

Queue the same audit job again only for pages that failed to download (fetch provider HTTP 5xx or timeout; provider errors without a code or 4xx such as 429 are not retried) or whose page type could not be determined on our side (those are retried free of charge, `free_pages`). Results of successful pages are kept and not charged again; the hold covers only the retried pages and the unused part returns to the balance. Each page can be retried at most 2 times. No second webhook or e-mail is sent. The audit summary is recalculated when the job finishes; the FIX plan is not regenerated. 409 `job_not_retryable` while the job runs, before settlement, in private mode or when another retry won; 409 `audit_in_progress` while the audit is still running or its report parts are still being prepared; 409 `no_failed_pages` when there is nothing to retry; 409 `spend_cap_reached` when only pages stopped at the daily spend cap are left and the cap is still reached (no retry is used). While the cap is reached, those pages are skipped in a mixed retry. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `Idempotency-Key` | header | string or null |  | 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. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [RetryFailedResult](#schema-retryfailedresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `job_not_retryable`, `audit_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `queue_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/pages/{index}/recheck` {#post-v1-audits-audit-id-pages-index-recheck}

**Check my fixes (one page)**

Check one page of a finished audit again after you fixed it (Check my fixes). The page is downloaded again and checked with the audit's rules and engine; the result becomes a new revision of the page. The previous report is kept unchanged. The audit then shows the newest revision of each page: summary, exports and the share link use it; site-wide descriptions (topics, categories, link graph) stay from the audit date. Price: the first check of each page is free; each later check of the same page costs one page of this audit type at today's prices (`reserved_usd`; `next_check_free` and `next_check_usd` in the revisions response). A failed download returns the hold and does not use up the free check. Free checks follow the same limits. Up to 5 checks of your organization run at once; more checks are accepted too (202, `status: waiting`, `job_id` null) and start in order as earlier ones finish - no need to retry. A check waiting longer than 24 hours (for example while the audit is being recalculated) is dropped as `failed` and the hold is returned. Poll `GET /v1/audits/{id}/pages/{index}/revisions` or subscribe to the `audit.page_rechecked` webhook. To check many pages at once use `POST /v1/audits/{id}/pages/recheck`. 409 `audit_in_progress` while the audit or its report parts are still running; 409 `audit_not_recheckable` for batch, archived or Topicality-only audits; 409 `page_not_recheckable` for a page without a result (use `retry-failed`) or without a stored address; 409 `page_check_running` while this page is being checked or waits in the queue; 429 `recheck_cooldown`, `recheck_daily_limit` or `recheck_busy` (your organization's queue is full: 200 checks waiting). `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `index` | path | integer | tak | Page index in the audit job (`page_revisions[...].index`, job results `index`) (min 0; max 100000) |
| `Idempotency-Key` | header | string or null |  | 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. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [PageRecheckAccepted](#schema-pagerecheckaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found`, `page_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `audit_in_progress`, `audit_not_recheckable`, `page_check_running`, `page_not_recheckable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `recheck_busy`, `recheck_cooldown`, `recheck_daily_limit` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `queue_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/pages/recheck` {#post-v1-audits-audit-id-pages-recheck}

**Check my fixes (many pages)**

Check my fixes for many pages of one audit in one call. Each page is handled like `POST /v1/audits/{id}/pages/{index}/recheck` (same price, free first check, limits and queue): accepted pages are listed in `accepted` (`status` queued or waiting), refused pages in `refused` with the same error code the single-page endpoint would return (`recheck_cooldown`, `page_check_running`, `page_not_recheckable`, `page_not_found`, `recheck_daily_limit`, `recheck_busy`, `quota_exceeded`, `insufficient_balance`, ...). The response is 202 even when every page is refused. Audit-level problems (`audit_in_progress`, `audit_not_recheckable`, `queue_unavailable`) fail the whole call. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `Idempotency-Key` | header | string or null |  | 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. |

**Treść żądania** (`application/json`, wymagane): [PageRecheckBatch](#schema-pagerecheckbatch)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `indexes` | array of integer | tak | Page indexes in the audit job (`index` of job results, `page_revisions[...].index`); duplicates are ignored. Up to 200 pages (min items 1; max items 200) |

Przykład:

```json
{
  "indexes": [
    3,
    7,
    9
  ]
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [PageRecheckBatchAccepted](#schema-pagerecheckbatchaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `audit_in_progress`, `audit_not_recheckable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `queue_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "accepted": [
    {
      "revision_id": "rvs_q2m7c4tjd8xwkn3a",
      "audit_id": "aud_kikaf4hg6un5rylc",
      "index": 3,
      "rev": 1,
      "status": "queued",
      "job_id": "job_m4dbji57cb5i4ite",
      "reserved_usd": 0.0
    },
    {
      "revision_id": "rvs_h5p9w2lzr6yqbe1u",
      "audit_id": "aud_kikaf4hg6un5rylc",
      "index": 7,
      "rev": 2,
      "status": "waiting",
      "job_id": null,
      "reserved_usd": 0.04
    }
  ],
  "refused": [
    {
      "index": 9,
      "code": "recheck_cooldown",
      "message": "This page was checked a moment ago; try again later"
    }
  ],
  "reserved_usd": 0.04
}
```

### `POST /v1/reports/{report_id}/recheck` {#post-v1-reports-report-id-recheck}

**Check my fixes (page report)**

Check one page of a finished audit again after you fixed it (Check my fixes). The page is downloaded again and checked with the audit's rules and engine; the result becomes a new revision of the page. The previous report is kept unchanged. The audit then shows the newest revision of each page: summary, exports and the share link use it; site-wide descriptions (topics, categories, link graph) stay from the audit date. Price: the first check of each page is free; each later check of the same page costs one page of this audit type at today's prices (`reserved_usd`; `next_check_free` and `next_check_usd` in the revisions response). A failed download returns the hold and does not use up the free check. Free checks follow the same limits. Up to 5 checks of your organization run at once; more checks are accepted too (202, `status: waiting`, `job_id` null) and start in order as earlier ones finish - no need to retry. A check waiting longer than 24 hours (for example while the audit is being recalculated) is dropped as `failed` and the hold is returned. Poll `GET /v1/audits/{id}/pages/{index}/revisions` or subscribe to the `audit.page_rechecked` webhook. To check many pages at once use `POST /v1/audits/{id}/pages/recheck`. 409 `audit_in_progress` while the audit or its report parts are still running; 409 `audit_not_recheckable` for batch, archived or Topicality-only audits; 409 `page_not_recheckable` for a page without a result (use `retry-failed`) or without a stored address; 409 `page_check_running` while this page is being checked or waits in the queue; 429 `recheck_cooldown`, `recheck_daily_limit` or `recheck_busy` (your organization's queue is full: 200 checks waiting). The report must be a page of a site or job audit; other reports return 409 `not_recheckable`. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `Idempotency-Key` | header | string or null |  | 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. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [PageRecheckAccepted](#schema-pagerecheckaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `page_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `not_recheckable`, `audit_in_progress`, `audit_not_recheckable`, `page_check_running`, `page_not_recheckable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `recheck_busy`, `recheck_cooldown`, `recheck_daily_limit` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `queue_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/pages/{index}/revisions` {#get-v1-audits-audit-id-pages-index-revisions}

**Page revisions (before and after)**

Revisions of one audit page after Check my fixes, newest first, and the original result (revision 0) compared with the newest one: per rule with a finding before or after, signal strength 0-100 before and after and `fixed` / `still` / `new`. Signal strength is a ranking, not a probability. `version_changed` = the rules were evaluated with a newer rule version, so part of the difference may not come from your fix.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `index` | path | integer | tak | Page index in the audit job (`page_revisions[...].index`, job results `index`) (min 0; max 100000) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [PageRevisions](#schema-pagerevisions) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/site/preview` {#post-v1-audits-site-preview}

**Preview a site audit**

Step 1 of a site audit: reads the sitemap, `urls` or imported `items` and returns the number of URLs, URL patterns and `preview_id` (valid only for the same user or key and project). Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [SiteSource](#schema-sitesource)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site` | string or null |  | Domain or site URL; the sitemap is found via robots.txt or /sitemap.xml. |
| `sitemap_url` | string or null |  | Direct sitemap URL (also a sitemap index). |
| `sitemap_xml` | string or null |  | Pasted sitemap XML (urlset or sitemapindex). |
| `urls` | array of string or null |  | Your own list of URLs instead of a sitemap. |
| `items` | array of [PageItem](#schema-pageitem) or null |  | Imported pages: `url` and optional `html` (with HTML the page is not fetched). |
| `same_site` | boolean |  | URL list: keep only the host of the first URL (or `site`). (default `true`) |
| `distinct_slash` | boolean |  | Treat `/a` and `/a/` as different URLs (default: the same). (default `false`) |
| `subdomains` | array of string |  | Subdomains of the same registrable domain to include in discovery (links on the home page of each); other hosts are ignored (default `[]`; max items 20) |
| `preview_id` | string or null |  | Id from `POST /v1/audits/site/preview` (same user or key and project): skips discovery. |
| `gsc` | [GscPageSource](#schema-gscpagesource) or null |  | Pages from a Search Console property of the project, ordered by its figures; `site` (optional) limits a domain property to that host |

Przykład:

```json
{
  "site": "example.com"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [SitePreview](#schema-sitepreview) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `sitemap_not_found`, `invalid_scope`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "preview_id": "prv_5b0e…",
  "site": "example.com",
  "source": "sitemap",
  "sitemaps": [
    "https://example.com/sitemap.xml"
  ],
  "total": 412,
  "patterns": [
    {
      "pattern": "/blog/<slug>",
      "count": 380,
      "samples": [
        "https://example.com/blog/best-vpn-2026"
      ]
    }
  ]
}
```

### `POST /v1/audits/site/estimate` {#post-v1-audits-site-estimate}

**Estimate a site audit**

Step 2: for a selection (scope, pages, strategy, audit types, JavaScript) returns price in USD and time. Orders nothing. `pages` above the page limit of your plan returns 413 `audit_too_large`, the same as the start. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [SiteAuditCreate](#schema-siteauditcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site` | string or null |  | Domain or site URL; the sitemap is found via robots.txt or /sitemap.xml. |
| `sitemap_url` | string or null |  | Direct sitemap URL (also a sitemap index). |
| `sitemap_xml` | string or null |  | Pasted sitemap XML (urlset or sitemapindex). |
| `urls` | array of string or null |  | Your own list of URLs instead of a sitemap. |
| `items` | array of [PageItem](#schema-pageitem) or null |  | Imported pages: `url` and optional `html` (with HTML the page is not fetched). |
| `same_site` | boolean |  | URL list: keep only the host of the first URL (or `site`). (default `true`) |
| `distinct_slash` | boolean |  | Treat `/a` and `/a/` as different URLs (default: the same). (default `false`) |
| `subdomains` | array of string |  | Subdomains of the same registrable domain to include in discovery (links on the home page of each); other hosts are ignored (default `[]`; max items 20) |
| `preview_id` | string or null |  | Id from `POST /v1/audits/site/preview` (same user or key and project): skips discovery. |
| `gsc` | [GscPageSource](#schema-gscpagesource) or null |  | Pages from a Search Console property of the project, ordered by its figures; `site` (optional) limits a domain property to that host |
| `pages` | integer |  | Sample size (pages to check). The price is per checked page. (default `30`; min 1.0) |
| `strategy` | string |  | `groups` (default) = pages linked from the home page + newest (current year) + random archive; `all` = all selected URLs (up to `pages`); `newest` = by sitemap lastmod; `stratified` = spread evenly with `seed`; `newest+stratified` = newest first, then spread; `home+random` = home page + random pages. (default `"groups"`; pattern `^(groups|newest\+stratified|all|newest|stratified|home\+random)$`) |
| `group_shares` | [GroupShares](#schema-groupshares) or null |  | Strategy groups: shares of home/newest; archive = rest. Empty = 10% home, 25% newest |
| `seed` | integer or null |  | Sampling seed; empty = date of the order (same seed + same sitemap = same sample). |
| `scope` | [gspamjudge__features__audits__contracts__Scope](#schema-gspamjudge-features-audits-contracts-scope) or null |  | Which URLs may be sampled: URL patterns from the preview, glob rules, sections, date filter. |
| `preset` | string or null |  | Label of a ready selection in the app; the price comes from the actual rules. |
| `js` | boolean |  | Legacy: true = `render_js: on`. (default `false`) |
| `render_js` | string or null |  | Render JavaScript: on (+ render_js price per page, USD) \| off \| auto (surcharge only for rendered pages); empty = project setting |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `categories` | array of string or null |  | Audit types: `spam`, `quality`, `helpful`; empty = all three. Alias of `modes`. |
| `modes` | array of string or null |  | Audit modes: spam, quality, helpful; same as `categories` (alias, wins when both are given); empty or all three = everything |
| `topicality` | boolean |  | Site topical focus, content map and topic category: measured from at least 5 sampled pages with content, no extra charge (included in the site audit). Default true; send false to skip it (default `true`) |
| `judge` | boolean |  | Rule assessment: true = spam/quality/helpful rules as chosen in `modes`. false = Topicality only: pages are fetched and measured (topical focus, content map, categories, heading coherence, what to fix), no rule calls, priced per page as `topicality` (+ fetch). Requires topicality=true; `modes`, `rules`, `explain` and `fix_plan` are ignored (default `true`) |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `fix_plan` | boolean |  | Buy the site fix plan when the audit finishes (paid add-on: price per page that needs changes, no minimum, see pricing `fix_plan`); only with explain=true and confirmed findings. Not enough balance = no plan, the audit still finishes; you can buy it later with POST /v1/audits/{id}/fix-plan/order (default `false`) |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |
| `notify_email` | boolean |  | E-mail the user who started the audit when it finishes; ignored for API keys (default `false`) |
| `visibility` | [VisibilityOrder](#schema-visibilityorder) or null |  | Add-on: Google visibility of the domain (keyword counts in TOP3/10/50, 12-month trend, strongest keywords, keywords outside the site topic) for one market, or for up to 5 markets with `markets` (multilingual domain); flat price per domain and market, charged only for markets with data |
| `start` | boolean |  | Draft: false = save the configuration as a draft audit (status `draft`) without discovering pages, charging or queueing; start it later with POST /v1/audits/{audit_id}/start (default `true`) |

Przykład:

```json
{
  "site": "example.com",
  "pages": 30,
  "modes": [
    "spam"
  ]
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [Estimate](#schema-estimate) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `413` | Error codes: `audit_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `preview_expired`, `empty_rules`, `empty_selection`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "selected": 30,
  "pages": 30,
  "seconds": 540,
  "cost_usd": 1.2,
  "cost_per_page_usd": 0.04,
  "fetch_usd": 0.0,
  "addons_usd": 0.0
}
```

### `POST /v1/audits/site` {#post-v1-audits-site}

**Order a site audit**

Step 3: orders a site audit (paid). The service picks the sample from the sitemap (default `strategy: groups`: the home page, pages linked from it, newest pages of the current year and a random archive; repeatable with `seed`) and queues a job. Returns 202 with `audit_id`; poll `GET /v1/audits/{audit_id}` (minutes to an hour, depending on size). Get the price first with `estimate`. Price per checked page (pay-as-you-go list): spam $0.03, quality $0.03, helpful $0.015 (all three $0.065); fetching $0.0015, JavaScript rendering +$0.006. How to fix is a paid add-on ($0.10 per page that needs changes, pages without issues free; `POST .../fix-plan/order`). Plans are cheaper; failed pages and unscored checks are not charged. Exact prices: `GET /v1/tiers`. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [SiteAuditCreate](#schema-siteauditcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site` | string or null |  | Domain or site URL; the sitemap is found via robots.txt or /sitemap.xml. |
| `sitemap_url` | string or null |  | Direct sitemap URL (also a sitemap index). |
| `sitemap_xml` | string or null |  | Pasted sitemap XML (urlset or sitemapindex). |
| `urls` | array of string or null |  | Your own list of URLs instead of a sitemap. |
| `items` | array of [PageItem](#schema-pageitem) or null |  | Imported pages: `url` and optional `html` (with HTML the page is not fetched). |
| `same_site` | boolean |  | URL list: keep only the host of the first URL (or `site`). (default `true`) |
| `distinct_slash` | boolean |  | Treat `/a` and `/a/` as different URLs (default: the same). (default `false`) |
| `subdomains` | array of string |  | Subdomains of the same registrable domain to include in discovery (links on the home page of each); other hosts are ignored (default `[]`; max items 20) |
| `preview_id` | string or null |  | Id from `POST /v1/audits/site/preview` (same user or key and project): skips discovery. |
| `gsc` | [GscPageSource](#schema-gscpagesource) or null |  | Pages from a Search Console property of the project, ordered by its figures; `site` (optional) limits a domain property to that host |
| `pages` | integer |  | Sample size (pages to check). The price is per checked page. (default `30`; min 1.0) |
| `strategy` | string |  | `groups` (default) = pages linked from the home page + newest (current year) + random archive; `all` = all selected URLs (up to `pages`); `newest` = by sitemap lastmod; `stratified` = spread evenly with `seed`; `newest+stratified` = newest first, then spread; `home+random` = home page + random pages. (default `"groups"`; pattern `^(groups|newest\+stratified|all|newest|stratified|home\+random)$`) |
| `group_shares` | [GroupShares](#schema-groupshares) or null |  | Strategy groups: shares of home/newest; archive = rest. Empty = 10% home, 25% newest |
| `seed` | integer or null |  | Sampling seed; empty = date of the order (same seed + same sitemap = same sample). |
| `scope` | [gspamjudge__features__audits__contracts__Scope](#schema-gspamjudge-features-audits-contracts-scope) or null |  | Which URLs may be sampled: URL patterns from the preview, glob rules, sections, date filter. |
| `preset` | string or null |  | Label of a ready selection in the app; the price comes from the actual rules. |
| `js` | boolean |  | Legacy: true = `render_js: on`. (default `false`) |
| `render_js` | string or null |  | Render JavaScript: on (+ render_js price per page, USD) \| off \| auto (surcharge only for rendered pages); empty = project setting |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `categories` | array of string or null |  | Audit types: `spam`, `quality`, `helpful`; empty = all three. Alias of `modes`. |
| `modes` | array of string or null |  | Audit modes: spam, quality, helpful; same as `categories` (alias, wins when both are given); empty or all three = everything |
| `topicality` | boolean |  | Site topical focus, content map and topic category: measured from at least 5 sampled pages with content, no extra charge (included in the site audit). Default true; send false to skip it (default `true`) |
| `judge` | boolean |  | Rule assessment: true = spam/quality/helpful rules as chosen in `modes`. false = Topicality only: pages are fetched and measured (topical focus, content map, categories, heading coherence, what to fix), no rule calls, priced per page as `topicality` (+ fetch). Requires topicality=true; `modes`, `rules`, `explain` and `fix_plan` are ignored (default `true`) |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `fix_plan` | boolean |  | Buy the site fix plan when the audit finishes (paid add-on: price per page that needs changes, no minimum, see pricing `fix_plan`); only with explain=true and confirmed findings. Not enough balance = no plan, the audit still finishes; you can buy it later with POST /v1/audits/{id}/fix-plan/order (default `false`) |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |
| `notify_email` | boolean |  | E-mail the user who started the audit when it finishes; ignored for API keys (default `false`) |
| `visibility` | [VisibilityOrder](#schema-visibilityorder) or null |  | Add-on: Google visibility of the domain (keyword counts in TOP3/10/50, 12-month trend, strongest keywords, keywords outside the site topic) for one market, or for up to 5 markets with `markets` (multilingual domain); flat price per domain and market, charged only for markets with data |
| `start` | boolean |  | Draft: false = save the configuration as a draft audit (status `draft`) without discovering pages, charging or queueing; start it later with POST /v1/audits/{audit_id}/start (default `true`) |

Przykład:

```json
{
  "site": "example.com",
  "pages": 30,
  "modes": [
    "spam",
    "quality"
  ],
  "report_lang": "en"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [AuditAccepted](#schema-auditaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `201` | Draft saved (`start: false`): nothing charged or queued | `application/json` [AuditAccepted](#schema-auditaccepted) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `413` | Error codes: `audit_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `empty_rules`, `sitemap_not_found`, `empty_selection`, `preview_expired`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `too_many_active_jobs` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "audit_id": "aud_kikaf4hg6un5rylc",
  "job_id": "job_m4dbji57cb5i4ite",
  "pages": 30,
  "patterns": 4
}
```

### `GET /v1/audits` {#get-v1-audits}

**List audits**

Lists audits you can see (site audits, jobs, batches), newest first, with progress and a short result. Default `view=summary`: one light item per audit (status, progress counters, `brief`, `pages`, `report_count`) without the page list, report ids and site parts; `view=full` returns full audit objects (large for big audits). One audit: `GET /v1/audits/{audit_id}`; its reports: `GET /v1/reports?audit_id=`. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `limit` | query | integer |  | Maximum number of items to return. (default `50`; min 1; max 500) |
| `archived` | query | boolean |  | true = only archived audits; default = active only (default `false`) |
| `view` | query | string |  | summary (default): one light item per audit, without the page list, report ids and site parts; full: the same object as GET /v1/audits/{id} without `summary`. (default `"summary"`; pattern `^(summary|full)$`) |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [AuditListItem](#schema-auditlistitem) or array of [AuditRead](#schema-auditread) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
[
  {
    "id": "aud_kikaf4hg6un5rylc",
    "project_id": "prj_r7buper7ekkwz5ak",
    "kind": "site",
    "title": "example.com",
    "created_at": "2026-10-21T12:00:00Z",
    "status": "done",
    "progress": {
      "status": "done",
      "total": 30,
      "done": 30,
      "failed": 0,
      "errors": []
    },
    "site": "example.com",
    "source": "sitemap",
    "pages": 30,
    "report_count": 30
  }
]
```

### `GET /v1/audits/{audit_id}` {#get-v1-audits-audit-id}

**Site audit**

Progress, `brief` and the site report: risk per policy, URL patterns, worst pages. While running the response has `Retry-After` (seconds, 15-300). The audit is ready when `status` is `done` and `completeness` is null or `complete` (`incomplete` = finished without the parts in `completeness.missing`); with `status: done` and `completeness.state: finishing` the summary and add-ons are still computed and the response also has `Retry-After`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `lang` | query | string or null |  | Report language override (en \| pl). Omitted = the audit's language (`report_lang`). Rule titles, fixes, scale labels and texts written by code follow it; page quotes stay verbatim. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [AuditWithCopyright](#schema-auditwithcopyright) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "id": "aud_kikaf4hg6un5rylc",
  "project_id": "prj_r7buper7ekkwz5ak",
  "kind": "site",
  "title": "example.com",
  "created_at": "2026-10-21T12:00:00Z",
  "status": "running",
  "progress": {
    "status": "running",
    "total": 30,
    "done": 12,
    "failed": 0
  },
  "report_ids": [
    "rep_nqnhkjnnoj5yd2fg"
  ],
  "eta_seconds": 420
}
```

### `DELETE /v1/audits/{audit_id}` {#delete-v1-audits-audit-id}

**Remove Audit**

Deletes the audit for good, with its page reports and share links. Organization owner or admin; an audit still running = 409 `audit_running`. Signed-in user only (session or JWT): API keys are refused here.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DeleteResult](#schema-deleteresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `audit_busy`, `audit_running` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/export.html` {#get-v1-audits-audit-id-export-html}

**Export Html**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `lang` | query | string or null |  | Report language override (en \| pl). Omitted = the audit's language (`report_lang`). Rule titles, fixes, scale labels and texts written by code follow it; page quotes stay verbatim. |
| `detail` | query | string |  | findings (default): only pages/rules at or above the threshold; full: all tables and pages. (default `"findings"`; pattern `^(findings|full)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `text/html` string |
| `4XX` | Client Error | `text/html` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `text/html` [ErrorResponse](#schema-errorresponse) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |

### `GET /v1/audits/{audit_id}/export.pdf` {#get-v1-audits-audit-id-export-pdf}

**Export Pdf**

PDF of the audit. Ready = file; being prepared = 202 + `Retry-After` (JSON `{"status": "pending"}`; a browser gets a self-refreshing page).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `lang` | query | string or null |  | Report language override (en \| pl). Omitted = the audit's language (`report_lang`). Rule titles, fixes, scale labels and texts written by code follow it; page quotes stay verbatim. |
| `detail` | query | string |  | findings (default): only pages/rules at or above the threshold; full: all tables and pages. (default `"findings"`; pattern `^(findings|full)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `202` | Being prepared in the background; poll `url` again after `Retry-After` seconds | `application/json` [Pending](#schema-pending) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `pdf_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "status": "pending",
  "retry_after_s": 15,
  "url": "/v1/audits/aud_kikaf4hg6un5rylc/export.pdf?lang=en&detail=findings",
  "retry_after": 15
}
```

### `GET /v1/audits/{audit_id}/export.csv` {#get-v1-audits-audit-id-export-csv}

**Export Csv**

CSV. `findings` (default): one row per finding on pages with problems, rule `title` and `summary` in `lang`; `full`: one row per page.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `detail` | query | string |  | findings (default): only pages/rules at or above the threshold; full: all tables and pages. (default `"findings"`; pattern `^(findings|full)$`) |
| `lang` | query | string or null |  | Report language override (en \| pl). Omitted = the audit's language (`report_lang`). Rule titles, fixes, scale labels and texts written by code follow it; page quotes stay verbatim. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |

### `GET /v1/audits/{audit_id}/pruning` {#get-v1-audits-audit-id-pruning}

**Pruning**

Content pruning for a finished site audit: one recommendation per checked page (keep, improve, merge with
a 301 to `target`, remove or noindex, review) with reason codes built from the audit's findings, page type,
Google index check, TOP10 phrases and topic groups. `missing` lists data sources the audit does not have
(fewer sources = less certain recommendations). No penalty prediction.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `lang` | query | string |  | Language of the output: `en` or `pl`. (default `"en"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [PruningReport](#schema-pruningreport) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/pruning.csv` {#get-v1-audits-audit-id-pruning-csv}

**Pruning Export Csv**

Content pruning as CSV: one row per page with the recommendation, method, target and reasons in `lang`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `lang` | query | string |  | Language of the output: `en` or `pl`. (default `"en"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |

### `GET /v1/audits/{audit_id}/links.csv` {#get-v1-audits-audit-id-links-csv}

**Link Graph Export Csv**

Internal link graph edges of a finished site audit as CSV: source page, target address, anchor, rel and
target status from the audit's own fetches. Links come from the main content only (site navigation, footer and
sidebar removed). 404 `not_found` while the audit runs or when it has fewer than 2 pages with link data.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |

### `GET /v1/audits/{audit_id}/export.json` {#get-v1-audits-audit-id-export-json}

**Audit results as JSON**

Whole audit as JSON (`AuditExport`, `schema_version`): summary and every checked page with confirmed findings, quotes and fixes. Large audit: first call 202 + `Retry-After`, the file is built in the background and cached.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `lang` | query | string or null |  | Report language override (en \| pl). Omitted = the audit's language (`report_lang`). Rule titles, fixes, scale labels and texts written by code follow it; page quotes stay verbatim. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Audit export (see `schema_version`) | `application/json` [AuditExport](#schema-auditexport) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `202` | Being prepared in the background; poll `url` again after `Retry-After` seconds | `application/json` [Pending](#schema-pending) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `export_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "status": "pending",
  "retry_after_s": 15,
  "url": "/v1/audits/aud_kikaf4hg6un5rylc/export.json?lang=en",
  "retry_after": 15
}
```

### `GET /v1/audits/{audit_id}/export.zip` {#get-v1-audits-audit-id-export-zip}

**Export Zip**

Markdown in a ZIP: `index.md`, `pages/<n>-<slug>.md` per page and `audit.json` (same schema as export.json). 202 + `Retry-After` like export.json.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `lang` | query | string or null |  | Report language override (en \| pl). Omitted = the audit's language (`report_lang`). Rule titles, fixes, scale labels and texts written by code follow it; page quotes stay verbatim. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Markdown ZIP | `application/json` any; `application/zip` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `202` | Being prepared in the background; poll `url` again after `Retry-After` seconds | `application/json` [Pending](#schema-pending) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `export_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "status": "pending",
  "retry_after_s": 15,
  "url": "/v1/audits/aud_kikaf4hg6un5rylc/export.zip?lang=en",
  "retry_after": 15
}
```

### `PUT /v1/audits/{audit_id}/draft` {#put-v1-audits-audit-id-draft}

**Edit a draft site audit**

Changes a draft site audit: the whole configuration as in `POST /v1/audits/site` (`start` and `project_id` are ignored). Free. A started audit = 409 `not_a_draft`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Treść żądania** (`application/json`, wymagane): [SiteAuditCreate](#schema-siteauditcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site` | string or null |  | Domain or site URL; the sitemap is found via robots.txt or /sitemap.xml. |
| `sitemap_url` | string or null |  | Direct sitemap URL (also a sitemap index). |
| `sitemap_xml` | string or null |  | Pasted sitemap XML (urlset or sitemapindex). |
| `urls` | array of string or null |  | Your own list of URLs instead of a sitemap. |
| `items` | array of [PageItem](#schema-pageitem) or null |  | Imported pages: `url` and optional `html` (with HTML the page is not fetched). |
| `same_site` | boolean |  | URL list: keep only the host of the first URL (or `site`). (default `true`) |
| `distinct_slash` | boolean |  | Treat `/a` and `/a/` as different URLs (default: the same). (default `false`) |
| `subdomains` | array of string |  | Subdomains of the same registrable domain to include in discovery (links on the home page of each); other hosts are ignored (default `[]`; max items 20) |
| `preview_id` | string or null |  | Id from `POST /v1/audits/site/preview` (same user or key and project): skips discovery. |
| `gsc` | [GscPageSource](#schema-gscpagesource) or null |  | Pages from a Search Console property of the project, ordered by its figures; `site` (optional) limits a domain property to that host |
| `pages` | integer |  | Sample size (pages to check). The price is per checked page. (default `30`; min 1.0) |
| `strategy` | string |  | `groups` (default) = pages linked from the home page + newest (current year) + random archive; `all` = all selected URLs (up to `pages`); `newest` = by sitemap lastmod; `stratified` = spread evenly with `seed`; `newest+stratified` = newest first, then spread; `home+random` = home page + random pages. (default `"groups"`; pattern `^(groups|newest\+stratified|all|newest|stratified|home\+random)$`) |
| `group_shares` | [GroupShares](#schema-groupshares) or null |  | Strategy groups: shares of home/newest; archive = rest. Empty = 10% home, 25% newest |
| `seed` | integer or null |  | Sampling seed; empty = date of the order (same seed + same sitemap = same sample). |
| `scope` | [gspamjudge__features__audits__contracts__Scope](#schema-gspamjudge-features-audits-contracts-scope) or null |  | Which URLs may be sampled: URL patterns from the preview, glob rules, sections, date filter. |
| `preset` | string or null |  | Label of a ready selection in the app; the price comes from the actual rules. |
| `js` | boolean |  | Legacy: true = `render_js: on`. (default `false`) |
| `render_js` | string or null |  | Render JavaScript: on (+ render_js price per page, USD) \| off \| auto (surcharge only for rendered pages); empty = project setting |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `categories` | array of string or null |  | Audit types: `spam`, `quality`, `helpful`; empty = all three. Alias of `modes`. |
| `modes` | array of string or null |  | Audit modes: spam, quality, helpful; same as `categories` (alias, wins when both are given); empty or all three = everything |
| `topicality` | boolean |  | Site topical focus, content map and topic category: measured from at least 5 sampled pages with content, no extra charge (included in the site audit). Default true; send false to skip it (default `true`) |
| `judge` | boolean |  | Rule assessment: true = spam/quality/helpful rules as chosen in `modes`. false = Topicality only: pages are fetched and measured (topical focus, content map, categories, heading coherence, what to fix), no rule calls, priced per page as `topicality` (+ fetch). Requires topicality=true; `modes`, `rules`, `explain` and `fix_plan` are ignored (default `true`) |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `fix_plan` | boolean |  | Buy the site fix plan when the audit finishes (paid add-on: price per page that needs changes, no minimum, see pricing `fix_plan`); only with explain=true and confirmed findings. Not enough balance = no plan, the audit still finishes; you can buy it later with POST /v1/audits/{id}/fix-plan/order (default `false`) |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |
| `notify_email` | boolean |  | E-mail the user who started the audit when it finishes; ignored for API keys (default `false`) |
| `visibility` | [VisibilityOrder](#schema-visibilityorder) or null |  | Add-on: Google visibility of the domain (keyword counts in TOP3/10/50, 12-month trend, strongest keywords, keywords outside the site topic) for one market, or for up to 5 markets with `markets` (multilingual domain); flat price per domain and market, charged only for markets with data |
| `start` | boolean |  | Draft: false = save the configuration as a draft audit (status `draft`) without discovering pages, charging or queueing; start it later with POST /v1/audits/{audit_id}/start (default `true`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [AuditAccepted](#schema-auditaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/start` {#post-v1-audits-audit-id-start}

**Start a draft site audit**

Starts a draft site audit the same way as `POST /v1/audits/site`: fresh page discovery, price, balance and limit checks, hold and queue. The `audit_id` stays the same. Already started = 409 `not_a_draft`. Remove a draft with `POST /v1/audits/{audit_id}/archive`. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `Idempotency-Key` | header | string or null |  | 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. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [AuditAccepted](#schema-auditaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `not_a_draft` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `413` | Error codes: `audit_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `empty_rules`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `too_many_active_jobs` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/archive` {#post-v1-audits-audit-id-archive}

**Archive Audit**

Archives the audit and its page reports: hidden from default lists, share links keep working.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ArchiveResult](#schema-archiveresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `audit_busy`, `audit_running` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/unarchive` {#post-v1-audits-audit-id-unarchive}

**Unarchive Audit**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ArchiveResult](#schema-archiveresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `audit_busy` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

## reports {#tag-reports}

Stored page reports, exports and fix plans.

- [`GET /v1/reports`](#get-v1-reports): List reports
- [`GET /v1/reports/{report_id}`](#get-v1-reports-report-id): Page report
- [`DELETE /v1/reports/{report_id}`](#delete-v1-reports-report-id): Remove Report
- [`GET /v1/reports/{report_id}/signals`](#get-v1-reports-report-id-signals): Report Signals
- [`POST /v1/reports/{report_id}/archive`](#post-v1-reports-report-id-archive): Archive Report
- [`POST /v1/reports/{report_id}/unarchive`](#post-v1-reports-report-id-unarchive): Unarchive Report
- [`GET /v1/reports/{report_id}/page-extras`](#get-v1-reports-report-id-page-extras): Report Page Extras
- [`GET /v1/reports/{report_id}/export.html`](#get-v1-reports-report-id-export-html): Export Html
- [`GET /v1/reports/{report_id}/export.pdf`](#get-v1-reports-report-id-export-pdf): Export Pdf

### `GET /v1/reports` {#get-v1-reports}

**List reports**

Lists stored page reports you can see, newest first (`?url=`, `?limit=`, `?audit_id=`). The body is a plain array; when more reports match, the `X-Next-Cursor` header carries the cursor for the next page (`?cursor=`) and `Link` the full next URL. No header = last page.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `limit` | query | integer |  | Maximum number of items to return. (default `50`; min 1; max 500) |
| `url` | query | string or null |  | Only items for this URL. |
| `archived` | query | boolean |  | true = only archived reports; default = active only (default `false`) |
| `cursor` | query | string or null |  | Next page: the `X-Next-Cursor` value from the previous response |
| `audit_id` | query | string or null |  | Only reports of this audit (`aud_…`) |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ReportSummary](#schema-reportsummary) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
[
  {
    "id": "rep_nqnhkjnnoj5yd2fg",
    "created_at": "2026-10-21T12:34:20Z",
    "url": "https://example.com/best-vpn-2026",
    "host": "example.com",
    "prompt_ver": "p6",
    "project_id": "prj_r7buper7ekkwz5ak"
  }
]
```

### `GET /v1/reports/{report_id}` {#get-v1-reports-report-id}

**Page report**

One stored page report (customer view: confirmed findings only). Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ReportWithCopyright](#schema-reportwithcopyright) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "id": "rep_nqnhkjnnoj5yd2fg",
  "created_at": "2026-10-21T12:34:20Z",
  "url": "https://example.com/best-vpn-2026",
  "host": "example.com",
  "prompt_ver": "p6",
  "project_id": "prj_r7buper7ekkwz5ak",
  "report": {
    "url": "https://example.com/best-vpn-2026",
    "profile": {
      "prompt_ver": "p6"
    },
    "extraction_ok": true,
    "truncated": false,
    "violations": [
      {
        "rule_id": "SP-KWS",
        "rule_ver": 3,
        "layer": "spam",
        "kind": "violation",
        "policy": "Keyword stuffing",
        "detectability": "P",
        "ok": true,
        "signal": 91,
        "signal_level": "high",
        "near": false,
        "answer_type": "binary",
        "unsupported": false,
        "evidence": {
          "quotes": [
            {
              "text": "best vpn cheap vpn top vpn 2026",
              "verified": true
            }
          ],
          "supported": true,
          "fix": "Rewrite the intro in natural sentences and keep one mention of the phrase.",
          "fix_lang": "en"
        }
      }
    ],
    "quality_signals": [],
    "not_assessed": [],
    "report_lang": "en"
  }
}
```

### `DELETE /v1/reports/{report_id}` {#delete-v1-reports-report-id}

**Remove Report**

Deletes the report for good (with its content snapshot and share links). Organization owner or admin (signed-in user). Signed-in user only (session or JWT): API keys are refused here.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DeleteResult](#schema-deleteresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/reports/{report_id}/signals` {#get-v1-reports-report-id-signals}

**Report Signals**

Signal strength 0-100 for every rule of a page report, also without a finding. `hit` = confirmed finding; `near` = no finding, but the signal is in the range where the method is less certain (not a finding). Not a percentage. Customer view: unconfirmed findings are left out, as in `GET /v1/reports/{report_id}`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [RuleStrength](#schema-rulestrength) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/reports/{report_id}/archive` {#post-v1-reports-report-id-archive}

**Archive Report**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ArchiveResult](#schema-archiveresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/reports/{report_id}/unarchive` {#post-v1-reports-report-id-unarchive}

**Unarchive Report**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ArchiveResult](#schema-archiveresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/reports/{report_id}/page-extras` {#get-v1-reports-report-id-page-extras}

**Report Page Extras**

Page category (IAB 3.1 and Google, signal strength 0-100) and the page core content vector ordered with this
page check. Each part has `status` pending | running | done | error; poll until done.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [PageExtras](#schema-pageextras) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/reports/{report_id}/export.html` {#get-v1-reports-report-id-export-html}

**Export Html**

Self-contained HTML: inline CSS, no external resources (works offline).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `lang` | query | string |  | Fallback language (en \| pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins. (default `"en"`; pattern `^(en|pl)$`) |
| `detail` | query | string |  | findings (default): only rules at or above the threshold; full: all rules. (default `"findings"`; pattern `^(findings|full)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `text/html` string |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/reports/{report_id}/export.pdf` {#get-v1-reports-report-id-export-pdf}

**Export Pdf**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `lang` | query | string |  | Fallback language (en \| pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins. (default `"en"`; pattern `^(en|pl)$`) |
| `detail` | query | string |  | findings (default): only rules at or above the threshold; full: all rules. (default `"findings"`; pattern `^(findings|full)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## intent {#tag-intent}

Search intent reports for phrases (paid).

- [`GET /v1/intent/{report_id}/export.html`](#get-v1-intent-report-id-export-html): Search intent report as HTML
- [`GET /v1/intent/{report_id}/export.pdf`](#get-v1-intent-report-id-export-pdf): Search intent report as PDF
- [`GET /v1/intent/{report_id}/export.md`](#get-v1-intent-report-id-export-md): Search intent report as Markdown
- [`GET /v1/intent/{report_id}/export.csv`](#get-v1-intent-report-id-export-csv): Search intent report as CSV
- [`GET /v1/intent/batches/{batch_id}/export.csv`](#get-v1-intent-batches-batch-id-export-csv): Search intent batch as CSV
- [`GET /v1/intent`](#get-v1-intent): List search intent reports
- [`POST /v1/intent`](#post-v1-intent): Order a search intent report
- [`POST /v1/intent/batch`](#post-v1-intent-batch): Order search intent reports in batch
- [`POST /v1/intent/batch/csv`](#post-v1-intent-batch-csv): Order search intent reports from CSV
- [`POST /v1/intent/batches/{batch_id}/cancel`](#post-v1-intent-batches-batch-id-cancel): Cancel a search intent batch
- [`GET /v1/intent/{report_id}`](#get-v1-intent-report-id): Search intent report

### `GET /v1/intent/{report_id}/export.html` {#get-v1-intent-report-id-export-html}

**Search intent report as HTML**

Search intent report as one HTML file (styles inline, works offline), in the language chosen at order time.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `lang` | query | string |  | Fallback language (en \| pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins. (default `"en"`; pattern `^(en|pl)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `text/html` string |
| `4XX` | Client Error | `text/html` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `text/html` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/intent/{report_id}/export.pdf` {#get-v1-intent-report-id-export-pdf}

**Search intent report as PDF**

Search intent report as a PDF file, in the language chosen at order time.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `lang` | query | string |  | Fallback language (en \| pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins. (default `"en"`; pattern `^(en|pl)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/pdf` string (binary) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/intent/{report_id}/export.md` {#get-v1-intent-report-id-export-md}

**Search intent report as Markdown**

Intent report as a Markdown file: the same sections as the client view, in the language chosen at order time.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `lang` | query | string |  | Fallback language (en \| pl) only for reports without a stored `report_lang` (older reports); the language chosen at order time always wins. (default `"en"`; pattern `^(en|pl)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Intent report as Markdown (client view). | `text/markdown` string |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/intent/{report_id}/export.csv` {#get-v1-intent-report-id-export-csv}

**Search intent report as CSV**

Search intent report as CSV: one row per search intent with its share of results, coverage and best rank.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `text/csv` string |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/intent/batches/{batch_id}/export.csv` {#get-v1-intent-batches-batch-id-export-csv}

**Search intent batch as CSV**

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`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `batch_id` | path | string | tak | Intent batch id. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `text/csv` string |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/intent` {#get-v1-intent}

**List search intent reports**

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}`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `limit` | query | integer |  | Maximum number of items to return. (default `50`; min 1; max 500) |
| `batch_id` | query | string or null |  | Only items of this batch (`batch_id` from the batch order). |
| `q` | query | string or null |  | Only items whose phrase contains this text. |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [IntentSummary](#schema-intentsummary) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
[
  {
    "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
  }
]
```

### `POST /v1/intent` {#post-v1-intent}

**Order a search intent report**

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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `wait` | query | integer |  | Wait up to N seconds (default `0`; min 0; max 60) |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [IntentRequest](#schema-intentrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | language-COUNTRY, e.g. en-US, pl-PL (default `"en-US"`) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `query` | string | tak | Search phrase (min length 1; max length 200) |
| `device` | string |  | `desktop` (default) or `mobile` results. (one of `"desktop"`, `"mobile"`; default `"desktop"`) |
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `tier` | string |  | 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 (one of `"basic"`, `"premium"`, `"compare"`; default `"basic"`) |
| `freshness` | string |  | auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price) (one of `"auto"`, `"fresh"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Oldest results reused with freshness=auto (default 3 days) |
| `report_lang` | string or null |  | Report language: en \| pl; exports and share link. Empty = Accept-Language, else en |
| `serp` | [ClientSerp](#schema-clientserp) or null |  | Your own search results for the phrase instead of ours: no search results fee, nothing shared with other customers |
| `pages` | array of [ClientPage](#schema-clientpage) or null |  | premium and compare: documents of the top pages (3 to 10) instead of fetching them: no page fetch fee |
| `project_id` | string or null |  | Project public id (prj_…); default project when omitted |
| `compare_url` | string or null |  | Your page (http/https), required with tier=compare and only there |

Przykład:

```json
{
  "query": "best running shoes",
  "market": "en-US",
  "tier": "basic"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [IntentRead](#schema-intentread) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `own_key_required` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `invalid_tier`, `invalid_request`, `tier_unavailable`, `compare_disabled`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `serp_unavailable`, `start_uncertain` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "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
}
```

### `POST /v1/intent/batch` {#post-v1-intent-batch}

**Order search intent reports in batch**

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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [IntentBatchRequest](#schema-intentbatchrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `tier` | string |  | 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 (one of `"basic"`, `"premium"`, `"compare"`; default `"basic"`) |
| `freshness` | string |  | auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price) (one of `"auto"`, `"fresh"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Oldest results reused with freshness=auto (default 3 days) |
| `report_lang` | string or null |  | Report language: en \| pl; exports and share link. Empty = Accept-Language, else en |
| `items` | array of [IntentItem](#schema-intentitem) | tak | Phrases; duplicates (phrase + market + device) run once (min items 1) |
| `project_id` | string or null |  | Project id (`prj_…`); default project when omitted. |

Przykład:

```json
{
  "items": [
    {
      "query": "best running shoes",
      "market": "en-US"
    },
    {
      "query": "trail running shoes",
      "market": "en-US"
    }
  ],
  "tier": "basic"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [IntentBatchAccepted](#schema-intentbatchaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `own_key_required` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `invalid_tier`, `invalid_request`, `tier_unavailable`, `compare_disabled`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `serp_unavailable`, `start_uncertain` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "batch_id": "itb_2k9d…",
  "items": [],
  "skipped": 0,
  "price_usd": 0.1
}
```

### `POST /v1/intent/batch/csv` {#post-v1-intent-batch-csv}

**Order search intent reports from CSV**

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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`multipart/form-data`, wymagane): [Body_create_intent_batch_csv_v1_intent_batch_csv_post](#schema-body-create-intent-batch-csv-v1-intent-batch-csv-post)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `file` | string | tak | CSV: query[,market[,device]] |
| `market` | string |  | default `"en-US"` |
| `tier` | string |  | default `"basic"` |
| `freshness` | string |  | one of `"auto"`, `"fresh"`; default `"auto"` |
| `max_age_days` | integer or null |  |  |
| `project_id` | string or null |  |  |
| `report_lang` | string or null |  | Report language: en \| pl |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [IntentBatchAccepted](#schema-intentbatchaccepted) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `own_key_required` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `invalid_csv`, `invalid_tier`, `invalid_request`, `tier_unavailable`, `compare_disabled`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `serp_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "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
}
```

### `POST /v1/intent/batches/{batch_id}/cancel` {#post-v1-intent-batches-batch-id-cancel}

**Cancel a search intent batch**

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`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `batch_id` | path | string | tak | Intent batch id. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [IntentBatchCancel](#schema-intentbatchcancel) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `forbidden` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `intent_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "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
      }
    ]
  }
}
```

### `GET /v1/intent/{report_id}` {#get-v1-intent-report-id}

**Search intent report**

One search intent report: status and, when `done`, the full report. Poll while `queued` or `running`. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `format` | query | string |  | json (default): the report; md: markdown instructions for an AI agent (context, rules for safe work, steps, verification, report template) in the report language. (one of `"json"`, `"md"`; default `"json"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | The report (json) or instructions for an AI agent (format=md) | `application/json` [IntentRead](#schema-intentread); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `intent_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "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
}
```

## infogain {#tag-infogain}

Gain & Gap: what your text adds beyond the search results and what it misses (paid).

- [`POST /v1/infogain`](#post-v1-infogain): Create Infogain
- [`GET /v1/infogain/{report_id}`](#get-v1-infogain-report-id): Read Infogain

### `POST /v1/infogain` {#post-v1-infogain}

**Create Infogain**

Gain & Gap for one phrase and your page (`url`) or text (`text`): what your text adds beyond the search
results (top organic pages, AI Overview and the pages it cites), what it misses and where other pages say
something different, with a fix plan. Charged per report when it has a result; a failed report or one without
any comparison is refunded. Rendering JavaScript of your page is charged separately, only when it was rendered.
Search results up to `max_age_days` old are reused when available. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `wait` | query | integer |  | Wait up to N seconds (default `0`; min 0; max 60) |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [InfoGainRequest](#schema-infogainrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `query` | string | tak | Search phrase the text should answer (min length 1; max length 200) |
| `market` | string |  | language-COUNTRY, e.g. pl-PL, en-US (default `"en-US"`; max length 8; pattern `^[a-zA-Z]{2,3}([-_][a-zA-Z0-9]{2,4})?[-_][a-zA-Z]{2}$`) |
| `device` | string |  | one of `"desktop"`, `"mobile"`; default `"desktop"` |
| `url` | string or null |  | Your page: we fetch it and cut menus, footers and consent windows before the analysis. With `text`, used only as context (your domain in AI Overview sources) |
| `text` | string or null |  | Your text (Markdown or plain); no length limit beyond the request size |
| `title` | string |  | default `""`; max length 300 |
| `report_lang` | string or null |  | Report language; default from Accept-Language |
| `render_js` | string |  | Render JavaScript of your page (`url` only): `render_js` price only when the page was rendered (one of `"on"`, `"auto"`, `"off"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Reuse search results up to N days old (default 3); 0 = always new results |
| `webhook_url` | string or null |  | POST `infogain.finished` (signed like job webhooks) when the report is ready or failed |
| `project_id` | string or null |  | Project public id (prj_…); default from X-Project-Id or the key |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [InfoGainRun](#schema-infogainrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/infogain/{report_id}` {#get-v1-infogain-report-id}

**Read Infogain**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `format` | query | string |  | json (default): the report; md: markdown instructions for an AI agent (context, rules for safe work, steps, verification, report template) in the report language. (one of `"json"`, `"md"`; default `"json"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | The report (json) or instructions for an AI agent (format=md) | `application/json` [InfoGainRun](#schema-infogainrun); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

## query-pack {#tag-query-pack}

Query Pack: Search Intent and Gain & Gap for one phrase at one price (paid).

- [`POST /v1/query-pack`](#post-v1-query-pack): Create Query Pack
- [`GET /v1/query-pack/{pack_id}`](#get-v1-query-pack-pack-id): Read Query Pack

### `POST /v1/query-pack` {#post-v1-query-pack}

**Create Query Pack**

Query Pack for one phrase: the Intent report (search intent and what searchers expect; with `url` also how your
page compares with the top results) and the Gain & Gap report on the same search results, bought once. Without
`url` and `text` (phrase only) the Gain & Gap part is a brief for a new page (`mode` `brief`: what the top
results cover, which questions they leave unanswered and which sections a new page should have) at a lower price.
One price for the pack, charged after both parts: a part without a result is not charged, a pack without any result
is refunded in full. Rendering JavaScript of your page is charged separately, only when it was rendered. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `wait` | query | integer |  | Wait up to N seconds (default `0`; min 0; max 60) |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [QueryPackRequest](#schema-querypackrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `query` | string | tak | Search phrase the text should answer (min length 1; max length 200) |
| `market` | string |  | language-COUNTRY, e.g. pl-PL, en-US (default `"en-US"`; max length 8; pattern `^[a-zA-Z]{2,3}([-_][a-zA-Z0-9]{2,4})?[-_][a-zA-Z]{2}$`) |
| `device` | string |  | one of `"desktop"`, `"mobile"`; default `"desktop"` |
| `url` | string or null |  | Your page: we fetch it and cut menus, footers and consent windows before the analysis. With `text`, used only as context (your domain in AI Overview sources) |
| `text` | string or null |  | Your text (Markdown or plain); no length limit beyond the request size |
| `title` | string |  | default `""`; max length 300 |
| `report_lang` | string or null |  | Report language; default from Accept-Language |
| `render_js` | string |  | Render JavaScript of your page (`url` only): `render_js` price only when the page was rendered (one of `"on"`, `"auto"`, `"off"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Reuse search results up to N days old (default 3); 0 = always new results |
| `webhook_url` | string or null |  | POST `infogain.finished` (signed like job webhooks) when the report is ready or failed |
| `project_id` | string or null |  | Project public id (prj_…); default from X-Project-Id or the key |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [QueryPackRun](#schema-querypackrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/query-pack/{pack_id}` {#get-v1-query-pack-pack-id}

**Read Query Pack**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `pack_id` | path | string | tak |  |
| `format` | query | string |  | json (default): the report; md: markdown instructions for an AI agent (context, rules for safe work, steps, verification, report template) in the report language. (one of `"json"`, `"md"`; default `"json"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | The report (json) or instructions for an AI agent (format=md) | `application/json` [QueryPackRun](#schema-querypackrun); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

## labels {#tag-labels}

Page and text labels from IAB Content Taxonomy 3.1 and Google Content Categories v2 (paid).

- [`POST /v1/labels`](#post-v1-labels): Label one page or text
- [`POST /v1/labels/batch`](#post-v1-labels-batch): Label pages in batch
- [`POST /v1/labels/estimate`](#post-v1-labels-estimate): Estimate label price
- [`GET /v1/labels/batch/{run_id}`](#get-v1-labels-batch-run-id): Label batch
- [`POST /v1/labels/batch/{run_id}/cancel`](#post-v1-labels-batch-run-id-cancel): Cancel a label batch
- [`GET /v1/labels/batch/{run_id}/results.csv`](#get-v1-labels-batch-run-id-results-csv): Label batch CSV
- [`POST /v1/labels/raw`](#post-v1-labels-raw): Raw taxonomy model output for a text
- [`POST /v1/labels/decide`](#post-v1-labels-decide): Ask the decision model your own questions
- [`POST /v1/labels/{run_id}/items/{index}/recheck`](#post-v1-labels-run-id-items-index-recheck): Recheck Item
- [`GET /v1/labels/{run_id}/items/{index}/revisions`](#get-v1-labels-run-id-items-index-revisions): Item Revisions
- [`GET /v1/labels/{run_id}/items/{index}/agent.md`](#get-v1-labels-run-id-items-index-agent-md): Item Agent Pack

### `POST /v1/labels` {#post-v1-labels}

**Label one page or text**

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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [LabelRequest](#schema-labelrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null |  | Page address: we fetch it (+fetch price per check) |
| `html` | string or null |  | 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) |
| `text` | string or null |  | Plain text or Markdown (up to 50,000 characters), no fetch |
| `source_url` | string or null |  | 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 |
| `ref` | string or null |  | Your own id for this item, echoed back in results |
| `render_js` | boolean or null |  | 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. |
| `taxonomies` | array of string |  | min items 1; max items 2 |
| `project_id` | string or null |  |  |

Przykład:

```json
{
  "text": "Our sourdough uses only rye flour, water and salt. Feed the starter the night before baking...",
  "taxonomies": [
    "iab",
    "google"
  ],
  "ref": "post-1842"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [LabelResult](#schema-labelresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `invalid_url` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `labeling_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "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
}
```

### `POST /v1/labels/batch` {#post-v1-labels-batch}

**Label pages in batch**

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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [LabelBatchRequest](#schema-labelbatchrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `items` | array of [LabelInput](#schema-labelinput) | tak | 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 (min items 1; max items 1000) |
| `taxonomies` | array of string |  | min items 1; max items 2 |
| `project_id` | string or null |  |  |
| `render_js` | boolean or null |  | Default for items without their own render_js |
| `webhook_url` | string or null |  | https URL notified (signed POST, event `labels.finished`) when the batch finishes |

Przykład:

```json
{
  "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"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [LabelRun](#schema-labelrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `invalid_webhook_url` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `labeling_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "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
}
```

### `POST /v1/labels/estimate` {#post-v1-labels-estimate}

**Estimate label price**

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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [LabelEstimateRequest](#schema-labelestimaterequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `checks` | integer | tak | Number of pages or texts to label (min 1.0; max 1000000.0) |
| `taxonomies` | array of string |  | min items 1; max items 2 |
| `variant` | string |  | `document` = you send text or html, `url` = we fetch (one of `"document"`, `"url"`; default `"url"`) |
| `render_js` | boolean |  | URL only: price with JavaScript rendering (default `false`) |
| `avg_chars` | integer or null |  | Average text length in characters |
| `samples` | array of string |  | Up to 20 sample texts (not stored) (max items 20) |

Przykład:

```json
{
  "checks": 1000,
  "taxonomies": [
    "iab"
  ],
  "variant": "document"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [LabelEstimate](#schema-labelestimate) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "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
      }
    ]
  }
}
```

### `GET /v1/labels/batch/{run_id}` {#get-v1-labels-batch-run-id}

**Label batch**

Batch status and every item's labels. While queued or running the response has `Retry-After`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `run_id` | path | string | tak | Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [LabelRun](#schema-labelrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `label_batch_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "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
}
```

### `POST /v1/labels/batch/{run_id}/cancel` {#post-v1-labels-batch-run-id-cancel}

**Cancel a label batch**

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`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `run_id` | path | string | tak | Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [LabelCancelResult](#schema-labelcancelresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `forbidden` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `label_batch_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "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
  }
}
```

### `GET /v1/labels/batch/{run_id}/results.csv` {#get-v1-labels-batch-run-id-results-csv}

**Label batch CSV**

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`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `run_id` | path | string | tak | Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `text/csv` string |
| `4XX` | Client Error | `text/plain` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `text/plain` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `label_batch_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `label_batch_running` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/labels/raw` {#post-v1-labels-raw}

**Raw taxonomy model output for a text**

Sends your text as is to the taxonomy model and returns its raw output per taxonomy: the main node, `primary_conditional` (probability of each level given its parent), `primary_l1_probs` (top level), `paths` with `confidence`, `accepted` nodes and the full level distributions in `dists`. No URL fetching, no HTML extraction and no stored run: you send the final text. `taxonomy`: `iab`, `google` or `both` (default). Numbers are model scores, not calibrated probabilities; the shape belongs to the model and may gain fields. The model reads at most the first 7,500 tokens (`truncated: true` when the text was longer). Text: 100 to 50,000 characters (shorter or longer = 422). A taxonomy the model did not answer is listed in `failed`; no answer at all = 503 `labeling_unavailable`. Not charged for now; available to selected partners on request (other organizations get 403 `labels_raw_not_enabled`). Scope `labels:write`, same per-minute limits as `POST /v1/labels`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [RawLabelRequest](#schema-rawlabelrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak | Plain text or Markdown to classify, as is (up to 50,000 characters, at least 100 non-blank). No fetching, no HTML extraction (max length 50000) |
| `taxonomy` | string |  | iab = IAB Content Taxonomy 3.1, google = Google Content Categories v2, both = one call per taxonomy (one of `"iab"`, `"google"`, `"both"`; default `"both"`) |
| `ref` | string or null |  | Your own id for this text, echoed back |

Przykład:

```json
{
  "text": "How to choose a tennis racket as a beginner? Weight, head size and balance matter most. A lighter racket with a bigger head forgives mistakes...",
  "taxonomy": "iab",
  "ref": "post-1842"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [RawLabelResult](#schema-rawlabelresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `labels_raw_not_enabled` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `labeling_unavailable`, `spend_cap_reached`, `beta_budget_reached` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "results": {
    "iab": {
      "taxonomy": "iab",
      "primary": "539",
      "primary_path": "Sports > Tennis",
      "primary_confidence": 0.1295,
      "primary_conditional": [
        {
          "node": "483",
          "level": 1,
          "p": 0.988
        },
        {
          "node": "539",
          "level": 2,
          "p": 0.4244
        }
      ],
      "primary_l1": "483",
      "primary_l1_probs": {
        "483": 0.988,
        "223": 0.0041,
        "473": 0.0034
      },
      "paths": [
        {
          "node": "473",
          "path": "Shopping",
          "confidence": 0.2204
        },
        {
          "node": "539",
          "path": "Sports > Tennis",
          "confidence": 0.1295
        },
        {
          "node": "551",
          "path": "Sports > Sports Equipment",
          "confidence": 0.1236
        }
      ],
      "accepted": [
        "483",
        "473",
        "223",
        "539",
        "551"
      ],
      "dists": [
        {
          "level": 1,
          "parent": null,
          "choice": {
            "483": 0.3051,
            "473": 0.2204,
            "223": 0.2009
          }
        },
        {
          "level": 2,
          "parent": "483",
          "choice": {
            "539": 0.4244,
            "551": 0.4052,
            "none_of_these": 0.0157
          }
        }
      ],
      "questions": 8,
      "truncated": false,
      "document_tokens_read": 79,
      "document_tokens_sent": 79
    }
  },
  "failed": [],
  "document_tokens_read": 79,
  "truncated": false,
  "ref": "post-1842"
}
```

### `POST /v1/labels/decide` {#post-v1-labels-decide}

**Ask the decision model your own questions**

Sends your text as is to the decision model with your own questions and returns the model's probabilities. Three modes: `yes_no` returns `yes` (probability of yes), `choice` takes 2-20 distinct `options` and returns `pick` and `probs` per option, `score` returns `score` (expected level, 1 = lowest), `dist` (probability per level) and `levels`; send your own 2-10 `levels` (lowest first) or get the default 1-10 scale. One question: `question` + `mode` (+ `options` or `levels`), the answer comes back under the key `answer`. Several questions about the same text: `questions` with 1-20 entries keyed by your own names; the text is read once. Numbers are model scores, not calibrated probabilities. The model reads at most the first 7,500 tokens of the text (`truncated: true` when it was longer); `document_tokens_read` and `input_tokens` (text once plus every question) come back with the answers. Text up to 50,000 characters. A question the model cannot take (too long with its options) = 422 `validation_error`; no answer = 503 `labeling_unavailable`. Not charged for now; available to selected partners on request (other organizations get 403 `labels_decide_not_enabled`). Scope `labels:write`, same per-minute limits as `POST /v1/labels` (each question counts as one item).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [DecideRequest](#schema-deciderequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak | Plain text or Markdown, as is (up to 50,000 characters). No fetching, no HTML extraction (min length 1; max length 50000) |
| `mode` | string or null |  | Single question: the mode (use with `question`) |
| `question` | string or null |  | Single question: your question |
| `options` | array of string or null |  | Single question, mode choice: 2-20 distinct options |
| `levels` | array of string or null |  | Single question, mode score: 2-10 levels, lowest first |
| `questions` | object (map of [DecideQuestion](#schema-decidequestion)) or null |  | Several questions about the same text, keyed by your own names (1-20); answers come back under the same keys |
| `ref` | string or null |  | Your own id for this text, echoed back |

Przykład:

```json
{
  "text": "How to choose a tennis racket as a beginner? Weight, head size and balance matter most. A lighter racket with a bigger head forgives mistakes and helps you learn faster. Our shop offers free delivery on all rackets over 50 EUR.",
  "ref": "post-1842",
  "questions": {
    "sells": {
      "mode": "yes_no",
      "question": "Does this page sell products?"
    },
    "topic": {
      "mode": "choice",
      "question": "What is the main topic of the text?",
      "options": [
        "Sports",
        "Food",
        "Finance",
        "Travel"
      ]
    },
    "expertise": {
      "mode": "score",
      "question": "How much expertise does the author show?",
      "levels": [
        "none",
        "some",
        "expert"
      ]
    }
  }
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DecideResult](#schema-decideresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `labels_decide_not_enabled` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `labeling_unavailable`, `spend_cap_reached`, `beta_budget_reached` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "answers": {
    "sells": {
      "mode": "yes_no",
      "yes": 0.7042
    },
    "topic": {
      "mode": "choice",
      "pick": "Sports",
      "probs": {
        "Sports": 0.9999,
        "Food": 2e-05,
        "Finance": 2e-05,
        "Travel": 2e-05
      }
    },
    "expertise": {
      "mode": "score",
      "pick": "none",
      "score": 1.33,
      "dist": [
        0.81,
        0.05,
        0.14
      ],
      "levels": [
        "none",
        "some",
        "expert"
      ]
    }
  },
  "document_tokens_read": 50,
  "truncated": false,
  "input_tokens": 98,
  "ref": "post-1842"
}
```

### `POST /v1/labels/{run_id}/items/{index}/recheck` {#post-v1-labels-run-id-items-index-recheck}

**Recheck Item**

Check one page of a label run again after your changes. An empty body fetches the item's URL again; send `html`
or `text` to check a new version (e.g. a draft). The previous result stays as revision 0. The answer comes in this
response with a before/after comparison. A failed check (e.g. the page did not load) returns 200 with
`revision.status: failed`, costs nothing and the previous result stays current. The first recheck of each page is
free, later ones cost the normal price per check. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `run_id` | path | string | tak | Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`. |
| `index` | path | integer | tak |  |
| `Idempotency-Key` | header | string or null |  | 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. |

**Treść żądania** (`application/json`): [LabelRecheckRequest](#schema-labelrecheckrequest) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [LabelRecheck](#schema-labelrecheck) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `recheck_input_required` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `page_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `page_check_running`, `page_not_recheckable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `recheck_cooldown`, `recheck_daily_limit`, `labels_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `labeling_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/labels/{run_id}/items/{index}/revisions` {#get-v1-labels-run-id-items-index-revisions}

**Item Revisions**

All checks of one page (revision 0 = the first check) and a comparison of the first with the latest. Free.
`iab` and `google` = your intended categories for the comparison.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `run_id` | path | string | tak | Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`. |
| `index` | path | integer | tak |  |
| `iab` | query | string or null |  | Intended IAB category id |
| `google` | query | string or null |  | Intended Google category (full path) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [LabelRevisions](#schema-labelrevisions) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/labels/{run_id}/items/{index}/agent.md` {#get-v1-labels-run-id-items-index-agent-md}

**Item Agent Pack**

Instructions for an AI agent (Markdown) built from the latest result of the page: what the classifier shows,
topics that compete with your intended category, steps to make the main topic clear, rules for safe work and how
to verify with a recheck. Free, no new check.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `run_id` | path | string | tak | Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`. |
| `index` | path | integer | tak |  |
| `iab` | query | string or null |  | Intended IAB category id |
| `google` | query | string or null |  | Intended Google category (full path) |
| `lang` | query | string or null |  | Language of the pack (default: Accept-Language) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Instructions for an AI agent (Markdown). | `application/json` any; `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

## fix-plan {#tag-fix-plan}

Fix plans for reports and audits.

- [`GET /v1/reports/{report_id}/fix-plan`](#get-v1-reports-report-id-fix-plan): Page fix plan
- [`POST /v1/reports/{report_id}/fix-plan`](#post-v1-reports-report-id-fix-plan): Regenerate a page fix plan
- [`GET /v1/audits/{audit_id}/fix-plan`](#get-v1-audits-audit-id-fix-plan): Site fix plan
- [`POST /v1/audits/{audit_id}/fix-plan`](#post-v1-audits-audit-id-fix-plan): Regenerate a site fix plan
- [`POST /v1/reports/{report_id}/fix-plan/order`](#post-v1-reports-report-id-fix-plan-order): Report Fix Order
- [`POST /v1/audits/{audit_id}/fix-plan/order`](#post-v1-audits-audit-id-fix-plan-order): Audit Fix Order
- [`GET /v1/reports/{report_id}/fix-effort`](#get-v1-reports-report-id-fix-effort): Report Fix Effort
- [`GET /v1/audits/{audit_id}/fix-effort`](#get-v1-audits-audit-id-fix-effort): Audit Fix Effort
- [`GET /v1/reports/{report_id}/fix-plan/versions`](#get-v1-reports-report-id-fix-plan-versions): Page fix plan versions
- [`GET /v1/reports/{report_id}/fix-plan/versions/{n}`](#get-v1-reports-report-id-fix-plan-versions-n): One page fix plan version
- [`GET /v1/reports/{report_id}/fix-plan/versions/{n}/diff`](#get-v1-reports-report-id-fix-plan-versions-n-diff): Compare a page fix plan version with the previous one
- [`GET /v1/audits/{audit_id}/fix-plan/versions`](#get-v1-audits-audit-id-fix-plan-versions): Site fix plan versions
- [`GET /v1/audits/{audit_id}/fix-plan/versions/{n}`](#get-v1-audits-audit-id-fix-plan-versions-n): One site fix plan version
- [`GET /v1/audits/{audit_id}/fix-plan/versions/{n}/diff`](#get-v1-audits-audit-id-fix-plan-versions-n-diff): Compare a site fix plan version with the previous one

### `GET /v1/reports/{report_id}/fix-plan` {#get-v1-reports-report-id-fix-plan}

**Page fix plan**

Fix plan for the page: confirmed findings only; the report language wins. Paid add-on: 402 `fix_plan_not_purchased` (with the price) until bought via `.../fix-plan/order`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `format` | query | string |  | json (default): FixPlan; md: markdown for an AI agent (domain, actions, evidence, acceptance criteria). (one of `"json"`, `"md"`; default `"json"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | FixPlan (json) or markdown (format=md) | `application/json` [FixPlan](#schema-fixplan); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `202` | Plan is being generated in the background; poll after Retry-After seconds | `application/json` [FixPlanState](#schema-fixplanstate) |
| `402` | Error codes: `fix_plan_not_purchased` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `fix_plan_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "status": "generating",
  "source_kind": "report",
  "source_id": "rep_nqnhkjnnoj5yd2fg",
  "lang": "en",
  "retry_after": 5
}
```

### `POST /v1/reports/{report_id}/fix-plan` {#post-v1-reports-report-id-fix-plan}

**Regenerate a page fix plan**

With `regenerate=true` (organization owner or admin; API keys need the `jobs` scope): generates a new plan for the current findings and plan version. 202 + `Retry-After` while it is generated (the previous plan stays available via GET), 200 when the plan is already up to date (no cost), 429 `fix_plan_regenerate_too_soon` + `Retry-After` within 10 minutes of the last attempt for this report and language. Without `regenerate` it works like GET.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `regenerate` | query | boolean |  | true: generate a new plan for the current findings and the current plan version (owner/admin of the organization). The previous plan stays available until the new one is ready. At most once per 10 minutes per report/audit (429 + Retry-After). (default `false`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | FixPlan (json) or markdown (format=md) | `application/json` [FixPlan](#schema-fixplan); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `202` | New plan is being generated; poll GET after Retry-After seconds | `application/json` [FixPlanState](#schema-fixplanstate) |
| `402` | `fix_plan_not_purchased`: buy the plan first (POST .../fix-plan/order); details carry the price |  |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `forbidden` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `fix_plan_regenerate_too_soon` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `fix_plan_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "source_kind": "report",
  "source_id": "rep_nqnhkjnnoj5yd2fg",
  "domain": "example.com",
  "lang": "en",
  "generated_at": "2026-10-21T12:40:00Z",
  "summary": "Start with the keyword-stuffed intro.",
  "actions": [
    {
      "n": 1,
      "rule_ids": [
        "SP-KWS"
      ],
      "title": "Rewrite the intro",
      "text": "Rewrite the first paragraph in natural sentences.",
      "signal": 91,
      "pages": [
        "https://example.com/best-vpn-2026"
      ]
    }
  ],
  "cost_usd": 0.0
}
```

### `GET /v1/audits/{audit_id}/fix-plan` {#get-v1-audits-audit-id-fix-plan}

**Site fix plan**

Fix plan for the site: rules -> audit pages with confirmed findings. Paid add-on: 402 `fix_plan_not_purchased` (with the price) until bought via `.../fix-plan/order`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `format` | query | string |  | json (default): FixPlan; md: markdown for an AI agent (domain, actions, evidence, acceptance criteria). (one of `"json"`, `"md"`; default `"json"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | FixPlan (json) or markdown (format=md) | `application/json` [FixPlan](#schema-fixplan); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `202` | Plan is being generated in the background; poll after Retry-After seconds | `application/json` [FixPlanState](#schema-fixplanstate) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |
| `402` | Error codes: `fix_plan_not_purchased` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `fix_plan_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "status": "generating",
  "source_kind": "audit",
  "source_id": "aud_kikaf4hg6un5rylc",
  "lang": "en",
  "retry_after": 5
}
```

### `POST /v1/audits/{audit_id}/fix-plan` {#post-v1-audits-audit-id-fix-plan}

**Regenerate a site fix plan**

With `regenerate=true` (organization owner or admin; API keys need the `jobs` scope): generates a new site plan, e.g. after pages were added. 202 + `Retry-After` while it is generated (the previous plan stays available via GET), 200 when the plan is already up to date (no cost), 429 `fix_plan_regenerate_too_soon` + `Retry-After` within 10 minutes of the last attempt for this audit and language. Without `regenerate` it works like GET.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `regenerate` | query | boolean |  | true: generate a new plan for the current findings and the current plan version (owner/admin of the organization). The previous plan stays available until the new one is ready. At most once per 10 minutes per report/audit (429 + Retry-After). (default `false`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | FixPlan (json) or markdown (format=md) | `application/json` [FixPlan](#schema-fixplan); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `202` | New plan is being generated; poll GET after Retry-After seconds | `application/json` [FixPlanState](#schema-fixplanstate) |
| `409` | `audit_in_progress`: pages are still being checked or parts of the report are still being prepared; retry after `Retry-After` seconds |  |
| `402` | `fix_plan_not_purchased`: buy the plan first (POST .../fix-plan/order); details carry the price |  |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `forbidden` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `fix_plan_regenerate_too_soon` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `fix_plan_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "status": "generating",
  "source_kind": "audit",
  "source_id": "aud_kikaf4hg6un5rylc",
  "lang": "en",
  "retry_after": 5
}
```

### `POST /v1/reports/{report_id}/fix-plan/order` {#post-v1-reports-report-id-fix-plan-order}

**Report Fix Order**

Buys the fix plan for an existing page report ($0.10 when the page needs changes) without re-checking it. Reserved now, charged when the plan is ready, refunded if it fails; already bought = no charge. Then poll `GET .../fix-plan`. 402 `insufficient_balance` when the balance cannot cover it. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `Idempotency-Key` | header | string or null |  | 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. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Ordered or already in progress; poll the offers | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `200` | Already done (nothing charged) | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `addon_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/fix-plan/order` {#post-v1-audits-audit-id-fix-plan-order}

**Audit Fix Order**

Buys the site fix plan for a finished audit ($0.10 per page that needs changes, exact price in `GET .../fix-effort`) without re-checking it. Reserved now, charged when ready, refunded on failure; already bought = no charge. Then poll `GET .../fix-plan`. 402 `insufficient_balance`, 409 while the audit runs. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `Idempotency-Key` | header | string or null |  | 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. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Ordered or already in progress; poll the offers | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `200` | Already done (nothing charged) | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `409` | Error codes: `idempotency_in_progress`, `addon_unavailable`, `audit_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/reports/{report_id}/fix-effort` {#get-v1-reports-report-id-fix-effort}

**Report Fix Effort**

Estimated work to fix the page (pages by kind of change, hours as a range) and the price of the fix plan. Counted by code from confirmed findings; an estimate, not a quote. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FixEffortRead](#schema-fixeffortread) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/fix-effort` {#get-v1-audits-audit-id-fix-effort}

**Audit Fix Effort**

Estimated work to fix the site: pages that need a small fix, a rewrite or removal/merge (from content pruning), hours as a range, and the price of the fix plan. An estimate, not a quote. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FixEffortRead](#schema-fixeffortread) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `audit_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/reports/{report_id}/fix-plan/versions` {#get-v1-reports-report-id-fix-plan-versions}

**Page fix plan versions**

Saved fix plan versions of a page report, newest first (date, number of actions, plan version). Read only, no cost.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FixPlanVersions](#schema-fixplanversions) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/reports/{report_id}/fix-plan/versions/{n}` {#get-v1-reports-report-id-fix-plan-versions-n}

**One page fix plan version**

One saved fix plan version of a page report, as it was generated.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `n` | path | integer | tak | Version number from the versions list (1 = oldest ready plan) (min 1) |
| `format` | query | string |  | json (default): FixPlan as saved; md: markdown for an AI agent. (one of `"json"`, `"md"`; default `"json"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | FixPlan (json) or markdown (format=md) | `application/json` [FixPlan](#schema-fixplan); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/reports/{report_id}/fix-plan/versions/{n}/diff` {#get-v1-reports-report-id-fix-plan-versions-n-diff}

**Compare a page fix plan version with the previous one**

Version n compared with version n-1: actions added, removed and signal strength change (0-100) per action.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `n` | path | integer | tak | Version number from the versions list (1 = oldest ready plan) (min 1) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FixPlanDiff](#schema-fixplandiff) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/fix-plan/versions` {#get-v1-audits-audit-id-fix-plan-versions}

**Site fix plan versions**

Saved fix plan versions of a site audit, newest first (date, number of actions, plan version). Read only, no cost.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FixPlanVersions](#schema-fixplanversions) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/fix-plan/versions/{n}` {#get-v1-audits-audit-id-fix-plan-versions-n}

**One site fix plan version**

One saved fix plan version of a site audit, as it was generated.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `n` | path | integer | tak | Version number from the versions list (1 = oldest ready plan) (min 1) |
| `format` | query | string |  | json (default): FixPlan as saved; md: markdown for an AI agent. (one of `"json"`, `"md"`; default `"json"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | FixPlan (json) or markdown (format=md) | `application/json` [FixPlan](#schema-fixplan); `text/markdown` any |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/fix-plan/versions/{n}/diff` {#get-v1-audits-audit-id-fix-plan-versions-n-diff}

**Compare a site fix plan version with the previous one**

Version n compared with version n-1: actions added, removed and signal strength change (0-100) per action.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `n` | path | integer | tak | Version number from the versions list (1 = oldest ready plan) (min 1) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FixPlanDiff](#schema-fixplandiff) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

## api keys {#tag-api-keys}

Create, list, rotate and revoke API keys.

- [`GET /v1/projects/{project_id}/keys`](#get-v1-projects-project-id-keys): List Project Keys
- [`POST /v1/projects/{project_id}/keys`](#post-v1-projects-project-id-keys): Create Project Key
- [`DELETE /v1/projects/{project_id}/keys/{key_id}`](#delete-v1-projects-project-id-keys-key-id): Revoke Project Key
- [`GET /v1/keys`](#get-v1-keys): List API keys
- [`POST /v1/keys`](#post-v1-keys): Create an API key
- [`POST /v1/keys/{key_id}/rotate`](#post-v1-keys-key-id-rotate): Rotate Key
- [`DELETE /v1/keys/{key_id}`](#delete-v1-keys-key-id): Revoke Key
- [`POST /v1/keys/leaks`](#post-v1-keys-leaks): Report Leak

### `GET /v1/projects/{project_id}/keys` {#get-v1-projects-project-id-keys}

**List Project Keys**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ApiKeyRead](#schema-apikeyread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/projects/{project_id}/keys` {#post-v1-projects-project-id-keys}

**Create Project Key**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Treść żądania** (`application/json`, wymagane): [ApiKeyCreate](#schema-apikeycreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 100 |
| `scopes` | array of [gspamjudge__features__apikeys__contracts__Scope](#schema-gspamjudge-features-apikeys-contracts-scope) |  | min items 1 |
| `rate_limit` | integer or null |  | Requests per minute; None = server default |
| `owner_type` | [OwnerType](#schema-ownertype) |  | project \| user \| org (POST /v1/keys) (default `"project"`) |
| `project_id` | string or null |  | Project public id (prj_…) for owner_type=project on POST /v1/keys |
| `expires_at` | string (date-time) or null |  | Expiry (UTC); default now + 90 days, max 1 year |
| `expires_in_days` | integer or null |  | Alternative to expires_at (panel form) |
| `never_expires` | boolean |  | Organization keys only, organization owner/admin only (default `false`) |
| `allowed_ips` | array of string |  | IPv4/IPv6 addresses or CIDR ranges; empty = any address (max items 50) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ApiKeyCreated](#schema-apikeycreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/projects/{project_id}/keys/{key_id}` {#delete-v1-projects-project-id-keys-key-id}

**Revoke Project Key**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |
| `key_id` | path | string | tak | API key id (`key_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/keys` {#get-v1-keys}

**List API keys**

Lists API keys you manage (no secrets).

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ApiKeyRead](#schema-apikeyread) |

`200` `application/json`

Przykład:

```json
[
  {
    "id": "key_8c2f0a1b9d3e",
    "owner_type": "user",
    "project_id": null,
    "name": "my-agent",
    "prefix": "8c2f0a1b9d3e",
    "display": "gsj_live_8c2f…",
    "scopes": [
      "judge",
      "reports:read",
      "jobs"
    ],
    "rate_limit": 60,
    "created_at": "2026-10-21T10:00:00Z",
    "expires_at": "2027-01-19T10:00:00Z"
  }
]
```

### `POST /v1/keys` {#post-v1-keys}

**Create an API key**

Creates a user or organization API key. The secret `key` is shown only in this response.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [ApiKeyCreate](#schema-apikeycreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 100 |
| `scopes` | array of [gspamjudge__features__apikeys__contracts__Scope](#schema-gspamjudge-features-apikeys-contracts-scope) |  | min items 1 |
| `rate_limit` | integer or null |  | Requests per minute; None = server default |
| `owner_type` | [OwnerType](#schema-ownertype) |  | project \| user \| org (POST /v1/keys) (default `"project"`) |
| `project_id` | string or null |  | Project public id (prj_…) for owner_type=project on POST /v1/keys |
| `expires_at` | string (date-time) or null |  | Expiry (UTC); default now + 90 days, max 1 year |
| `expires_in_days` | integer or null |  | Alternative to expires_at (panel form) |
| `never_expires` | boolean |  | Organization keys only, organization owner/admin only (default `false`) |
| `allowed_ips` | array of string |  | IPv4/IPv6 addresses or CIDR ranges; empty = any address (max items 50) |

Przykład:

```json
{
  "name": "my-agent",
  "scopes": [
    "judge",
    "reports:read",
    "jobs"
  ],
  "expires_in_days": 90
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ApiKeyCreated](#schema-apikeycreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

`201` `application/json`

Przykład:

```json
{
  "id": "key_8c2f0a1b9d3e",
  "owner_type": "user",
  "project_id": null,
  "name": "my-agent",
  "prefix": "8c2f0a1b9d3e",
  "display": "gsj_live_8c2f…",
  "scopes": [
    "judge",
    "reports:read",
    "jobs"
  ],
  "rate_limit": 60,
  "created_at": "2026-10-21T10:00:00Z",
  "key": "gsj_live_8c2f0a1b9d3e_..."
}
```

### `POST /v1/keys/{key_id}/rotate` {#post-v1-keys-key-id-rotate}

**Rotate Key**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `key_id` | path | string | tak | API key id (`key_…`). |

**Treść żądania** (`application/json`): [ApiKeyRotate](#schema-apikeyrotate) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ApiKeyCreated](#schema-apikeycreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/keys/{key_id}` {#delete-v1-keys-key-id}

**Revoke Key**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `key_id` | path | string | tak | API key id (`key_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/keys/leaks` {#post-v1-keys-leaks}

**Report Leak**

Report leaked API keys (for secret scanners, no authentication). The answer does not depend on matches.

Uwierzytelnianie: brak

**Treść żądania** (`application/json`, wymagane): [LeakReport](#schema-leakreport)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `keys` | array of string | tak | min items 1; max items 100 |
| `source_url` | string or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [LeakAccepted](#schema-leakaccepted) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## usage {#tag-usage}

Spending, balance and limits.

- [`GET /v1/usage`](#get-v1-usage): Usage and limits

### `GET /v1/usage` {#get-v1-usage}

**Usage and limits**

Spending and limits. Project: `?project_id=` or `X-Project-ID`; an API key uses its project; otherwise the user's default project.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UsageRead](#schema-usageread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "unit": "usd",
  "balance": {
    "balance_usd": 18.42,
    "overdraft_usd": 5.0
  },
  "exempt": false
}
```

## status {#tag-status}

Service state.

- [`GET /v1/status`](#get-v1-status): Service status
- [`GET /health`](#get-health): Health

### `GET /v1/status` {#get-v1-status}

**Service status**

Service state: `level` up|warming|busy|degraded, message (EN/PL by `Accept-Language` or `?lang=`), estimated cold start `eta_s`, active notices. `scope` = module (judge, audit, intent, api).

Uwierzytelnianie: brak

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `scope` | query | string or null |  | Module: `judge`, `audit`, `intent` or `api`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [PublicStatus](#schema-publicstatus) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "level": "up",
  "label": "Up",
  "message": "All systems up.",
  "eta_s": null,
  "notices": []
}
```

### `GET /health` {#get-health}

**Health**

Uwierzytelnianie: brak

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` object |

## public {#tag-public}

No authentication.

- [`POST /v1/public/leads`](#post-v1-public-leads): Create Lead

### `POST /v1/public/leads` {#post-v1-public-leads}

**Create Lead**

Uwierzytelnianie: brak

**Treść żądania** (`application/json`, wymagane): [LeadCreate](#schema-leadcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `type` | string | tak | one of `"beta"`, `"sales"` |
| `email` | string (email) | tak |  |
| `name` | string or null |  |  |
| `company` | string or null |  |  |
| `message` | string or null |  |  |
| `website` | string or null |  |  |
| `role` | string or null |  |  |
| `locale` | string |  | one of `"en"`, `"pl"`; default `"en"` |
| `consent` | boolean | tak | Consent to store your e-mail (privacy policy); must be true. |
| `hp` | string or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [LeadAccepted](#schema-leadaccepted) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## upgrades {#tag-upgrades}

Add categories to a report or audit, refresh evidence.

- [`GET /v1/tiers`](#get-v1-tiers): Prices
- [`POST /v1/reports/{report_id}/upgrade/estimate`](#post-v1-reports-report-id-upgrade-estimate): Estimate a report upgrade
- [`POST /v1/reports/{report_id}/upgrade`](#post-v1-reports-report-id-upgrade): Upgrade a report
- [`POST /v1/audits/{audit_id}/upgrade/estimate`](#post-v1-audits-audit-id-upgrade-estimate): Estimate an audit upgrade
- [`GET /v1/audits/{audit_id}/upgrade`](#get-v1-audits-audit-id-upgrade): Audit Upgrade Status
- [`POST /v1/audits/{audit_id}/upgrade`](#post-v1-audits-audit-id-upgrade): Upgrade an audit
- [`POST /v1/reports/{report_id}/evidence/refresh`](#post-v1-reports-report-id-evidence-refresh): Report Evidence Refresh
- [`GET /v1/audits/{audit_id}/evidence/refresh`](#get-v1-audits-audit-id-evidence-refresh): Audit Evidence Refresh Status
- [`POST /v1/audits/{audit_id}/evidence/refresh`](#post-v1-audits-audit-id-evidence-refresh): Audit Evidence Refresh

### `GET /v1/tiers` {#get-v1-tiers}

**Prices**

Audit types, check scopes and search intent tiers with prices in USD. Free.

Uwierzytelnianie: brak

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [TierTable](#schema-tiertable) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "audit_types": [
    {
      "id": "spam",
      "name": "Spam audit",
      "name_pl": "Audyt spamu",
      "summary": "Google spam policies - 0/1 rules for spam signals on the page.",
      "summary_pl": "Polityki spamu Google - reguły 0/1 dla sygnałów spamu na stronie.",
      "price_usd": 0.03
    }
  ],
  "page": [
    {
      "id": "lite",
      "name": "Quick check",
      "name_pl": "Szybkie sprawdzenie",
      "rules": "quick",
      "steps": [],
      "extra": null,
      "summary": "The most common signals for each selected audit type (spam, helpful, quality); 0/1 rules from preset audit-quick.",
      "summary_pl": "Najczęstsze sygnały każdego wybranego rodzaju audytu (spam, helpful, quality); reguły 0/1 z presetu audit-quick.",
      "price_usd": 0.02
    }
  ],
  "intent": [
    {
      "id": "basic",
      "name": "Ani's quick look",
      "name_pl": "Ani zerknie",
      "label": "Basic",
      "summary": "Ani checks what people really want from this phrase and which form of content fits best.",
      "summary_pl": "Ani sprawdza, czego ludzie naprawdę szukają pod tą frazą i jaka forma treści pasuje najlepiej.",
      "includes": [
        "serp_intents",
        "form"
      ],
      "available": true,
      "price_usd": 0.009
    }
  ]
}
```

### `POST /v1/reports/{report_id}/upgrade/estimate` {#post-v1-reports-report-id-upgrade-estimate}

**Estimate a report upgrade**

Price and time of an upgrade without running it (USD = target price - already paid + fetch + intent add-on).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`, wymagane): [UpgradeRequest](#schema-upgraderequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `tier` | string or null |  | Target scope for all categories: `lite`, `basic` or `premium`. |
| `categories` | array of string or null |  | Audit types to add: `spam`, `quality`, `helpful`. |
| `query` | string or null |  | Target phrase to add search intent checks. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UpgradeEstimate](#schema-upgradeestimate) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "report_id": "rep_nqnhkjnnoj5yd2fg",
  "current": {
    "report_id": "rep_nqnhkjnnoj5yd2fg",
    "levels": {
      "spam": "basic"
    },
    "tier": null,
    "paid_usd": 0.03
  },
  "target": {
    "spam": "basic",
    "quality": "basic"
  },
  "available": true,
  "rules_missing": 12,
  "evidence_hits": 0,
  "refetch": false,
  "seconds": 40,
  "cost_usd": 0.03,
  "steps_usd": {
    "rules": 0.03
  }
}
```

### `POST /v1/reports/{report_id}/upgrade` {#post-v1-reports-report-id-upgrade}

**Upgrade a report**

Adds audit types or scope to one report: only missing checks run, same `rep_` id. Paid; get the price first with `upgrade/estimate`. 409 `upgrade_unavailable`, 429 when funds are missing.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`, wymagane): [UpgradeRequest](#schema-upgraderequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `tier` | string or null |  | Target scope for all categories: `lite`, `basic` or `premium`. |
| `categories` | array of string or null |  | Audit types to add: `spam`, `quality`, `helpful`. |
| `query` | string or null |  | Target phrase to add search intent checks. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UpgradeResult](#schema-upgraderesult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `upgrade_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "estimate": {
    "report_id": "rep_nqnhkjnnoj5yd2fg",
    "current": {
      "report_id": "rep_nqnhkjnnoj5yd2fg",
      "levels": {
        "spam": "basic"
      },
      "tier": null,
      "paid_usd": 0.03
    },
    "target": {
      "spam": "basic",
      "quality": "basic"
    },
    "available": true,
    "rules_missing": 12,
    "evidence_hits": 0,
    "refetch": false,
    "seconds": 40,
    "cost_usd": 0.03,
    "steps_usd": {
      "rules": 0.03
    }
  },
  "state": {
    "report_id": "rep_nqnhkjnnoj5yd2fg",
    "levels": {
      "spam": "basic",
      "quality": "basic"
    },
    "tier": null,
    "paid_usd": 0.06
  },
  "failed_steps": [],
  "charged_usd": 0.03,
  "refunded_usd": 0.0
}
```

### `POST /v1/audits/{audit_id}/upgrade/estimate` {#post-v1-audits-audit-id-upgrade-estimate}

**Estimate an audit upgrade**

Price and time of adding audit types or scope to audit pages, without running it. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Treść żądania** (`application/json`, wymagane): [AuditUpgradeRequest](#schema-auditupgraderequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `tier` | string or null |  | Target scope for all categories: `lite`, `basic` or `premium`. |
| `categories` | array of string or null |  | Audit types to add: `spam`, `quality`, `helpful`. |
| `query` | string or null |  | Target phrase to add search intent checks. |
| `page_ids` | array of string or null |  | Page report ids (`rep_…`) to upgrade; empty = all pages. |
| `flagged` | boolean |  | Only pages with a spam or quality finding at medium or above. (default `false`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [AuditUpgradeEstimate](#schema-auditupgradeestimate) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

`200` `application/json`

Przykład:

```json
{
  "audit_id": "aud_kikaf4hg6un5rylc",
  "pages": 30,
  "unavailable": 0,
  "seconds": 600,
  "items": [],
  "cost_usd": 0.9
}
```

### `GET /v1/audits/{audit_id}/upgrade` {#get-v1-audits-audit-id-upgrade}

**Audit Upgrade Status**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UpgradeRun](#schema-upgraderun) or null |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/upgrade` {#post-v1-audits-audit-id-upgrade}

**Upgrade an audit**

Adds audit types or scope to audit pages in the background (all, `page_ids` or `flagged`). Paid: one reservation for the whole upgrade, failed pages are refunded. Get the price first with `upgrade/estimate`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Treść żądania** (`application/json`, wymagane): [AuditUpgradeRequest](#schema-auditupgraderequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `tier` | string or null |  | Target scope for all categories: `lite`, `basic` or `premium`. |
| `categories` | array of string or null |  | Audit types to add: `spam`, `quality`, `helpful`. |
| `query` | string or null |  | Target phrase to add search intent checks. |
| `page_ids` | array of string or null |  | Page report ids (`rep_…`) to upgrade; empty = all pages. |
| `flagged` | boolean |  | Only pages with a spam or quality finding at medium or above. (default `false`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [UpgradeRun](#schema-upgraderun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `upgrade_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached` | `application/json` [ErrorResponse](#schema-errorresponse) |

`202` `application/json`

Przykład:

```json
{
  "id": "upg_4m2k9x7q",
  "audit_id": "aud_kikaf4hg6un5rylc",
  "status": "running",
  "total": 30,
  "done": 0,
  "failed": 0,
  "created_at": "2026-10-21T13:00:00Z",
  "reserved_usd": 0.9,
  "refunded_usd": 0.0
}
```

### `POST /v1/reports/{report_id}/evidence/refresh` {#post-v1-reports-report-id-evidence-refresh}

**Report Evidence Refresh**

New quotes and fixes for findings with evidence (current evidence prompt, fix language from `lang` or the request). No new scoring, on the stored content snapshot, free. 409 `upgrade_unavailable`. Limit: one refresh per evidence version and at least 24 h between refreshes; otherwise 429 `evidence_refresh_limited` + `Retry-After`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`): [EvidenceRefreshRequest](#schema-evidencerefreshrequest) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [EvidenceRefreshResult](#schema-evidencerefreshresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `upgrade_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `evidence_refresh_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/evidence/refresh` {#get-v1-audits-audit-id-evidence-refresh}

**Audit Evidence Refresh Status**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UpgradeRun](#schema-upgraderun) or null |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/evidence/refresh` {#post-v1-audits-audit-id-evidence-refresh}

**Audit Evidence Refresh**

New quotes and fixes for all audit pages in the background, free. Progress: `GET .../evidence/refresh`. Limit per audit: one refresh per evidence version and at least 24 h between refreshes (429 `evidence_refresh_limited` + `Retry-After`).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Treść żądania** (`application/json`): [EvidenceRefreshRequest](#schema-evidencerefreshrequest) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [UpgradeRun](#schema-upgraderun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `upgrade_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `evidence_refresh_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

## sharing {#tag-sharing}

Public read-only share links.

- [`GET /v1/reports/{report_id}/shares`](#get-v1-reports-report-id-shares): Report Shares
- [`POST /v1/reports/{report_id}/shares`](#post-v1-reports-report-id-shares): Share Report
- [`DELETE /v1/reports/{report_id}/shares/{share_id}`](#delete-v1-reports-report-id-shares-share-id): Revoke Report Share
- [`GET /v1/audits/{audit_id}/shares`](#get-v1-audits-audit-id-shares): Audit Shares
- [`POST /v1/audits/{audit_id}/shares`](#post-v1-audits-audit-id-shares): Share Audit
- [`DELETE /v1/audits/{audit_id}/shares/{share_id}`](#delete-v1-audits-audit-id-shares-share-id): Revoke Audit Share
- [`GET /v1/share-links`](#get-v1-share-links): Share Links
- [`PATCH /v1/share-links/{share_id}`](#patch-v1-share-links-share-id): Share Password
- [`DELETE /v1/share-links/{share_id}`](#delete-v1-share-links-share-id): Revoke Link
- [`GET /v1/intent/{report_id}/shares`](#get-v1-intent-report-id-shares): Intent Shares
- [`POST /v1/intent/{report_id}/shares`](#post-v1-intent-report-id-shares): Share Intent
- [`DELETE /v1/intent/{report_id}/shares/{share_id}`](#delete-v1-intent-report-id-shares-share-id): Revoke Intent Share
- [`GET /v1/infogain/{report_id}/shares`](#get-v1-infogain-report-id-shares): Infogain Shares
- [`POST /v1/infogain/{report_id}/shares`](#post-v1-infogain-report-id-shares): Share Infogain
- [`DELETE /v1/infogain/{report_id}/shares/{share_id}`](#delete-v1-infogain-report-id-shares-share-id): Revoke Infogain Share

### `GET /v1/reports/{report_id}/shares` {#get-v1-reports-report-id-shares}

**Report Shares**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ShareRead](#schema-shareread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/reports/{report_id}/shares` {#post-v1-reports-report-id-shares}

**Share Report**

Public read-only link to a report. The `link` (token) is shown once; only its SHA-256 is stored.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`): [ShareCreate](#schema-sharecreate) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ShareCreated](#schema-sharecreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/reports/{report_id}/shares/{share_id}` {#delete-v1-reports-report-id-shares-share-id}

**Revoke Report Share**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `share_id` | path | string | tak | Share link id. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/audits/{audit_id}/shares` {#get-v1-audits-audit-id-shares}

**Audit Shares**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ShareRead](#schema-shareread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/audits/{audit_id}/shares` {#post-v1-audits-audit-id-shares}

**Share Audit**

Public read-only link to a site audit (findings only). 409 `audit_in_progress` while the audit is still running
or its report parts are being prepared.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Treść żądania** (`application/json`): [ShareCreate](#schema-sharecreate) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ShareCreated](#schema-sharecreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/audits/{audit_id}/shares/{share_id}` {#delete-v1-audits-audit-id-shares-share-id}

**Revoke Audit Share**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `share_id` | path | string | tak | Share link id. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/share-links` {#get-v1-share-links}

**Share Links**

All share links in the selected project (X-Project-ID / ?project_id) or in all visible projects of the
current organization. `link` is filled for members who can write (not viewers, not API keys).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `limit` | query | integer |  | Maximum number of items to return. (default `200`; min 1; max 500) |
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ShareRead](#schema-shareread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PATCH /v1/share-links/{share_id}` {#patch-v1-share-links-share-id}

**Share Password**

Set, change (`password`) or remove (`null`) the link password. Existing unlock cookies stop working.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `share_id` | path | string | tak | Share link id. |

**Treść żądania** (`application/json`, wymagane): [SharePassword](#schema-sharepassword)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `password` | string or null | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ShareRead](#schema-shareread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/share-links/{share_id}` {#delete-v1-share-links-share-id}

**Revoke Link**

Revokes an active link; with `?purge=true` deletes a revoked link from the list for good.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `share_id` | path | string | tak | Share link id. |
| `purge` | query | boolean |  | Permanently delete a revoked link entry (409 `share_active` if it is still active) (default `false`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/intent/{report_id}/shares` {#get-v1-intent-report-id-shares}

**Intent Shares**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ShareRead](#schema-shareread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/intent/{report_id}/shares` {#post-v1-intent-report-id-shares}

**Share Intent**

Public read-only link to a search intent report.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`): [ShareCreate](#schema-sharecreate) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ShareCreated](#schema-sharecreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/intent/{report_id}/shares/{share_id}` {#delete-v1-intent-report-id-shares-share-id}

**Revoke Intent Share**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `share_id` | path | string | tak | Share link id. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/infogain/{report_id}/shares` {#get-v1-infogain-report-id-shares}

**Infogain Shares**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ShareRead](#schema-shareread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/infogain/{report_id}/shares` {#post-v1-infogain-report-id-shares}

**Share Infogain**

Public read-only link to a finished Gain & Gap report. For a Query Pack the link shows the whole pack
(Gain & Gap and the Intent part). 403 `private_project` in a private project.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`): [ShareCreate](#schema-sharecreate) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ShareCreated](#schema-sharecreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/infogain/{report_id}/shares/{share_id}` {#delete-v1-infogain-report-id-shares-share-id}

**Revoke Infogain Share**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |
| `share_id` | path | string | tak | Share link id. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## projects {#tag-projects}

Projects and members.

- [`GET /v1/projects`](#get-v1-projects): List Projects
- [`POST /v1/projects`](#post-v1-projects): Create Project
- [`GET /v1/projects/{project_id}`](#get-v1-projects-project-id): Get Project
- [`PATCH /v1/projects/{project_id}`](#patch-v1-projects-project-id): Rename Project
- [`DELETE /v1/projects/{project_id}`](#delete-v1-projects-project-id): Delete Project
- [`GET /v1/projects/{project_id}/members`](#get-v1-projects-project-id-members): List Members
- [`POST /v1/projects/{project_id}/members`](#post-v1-projects-project-id-members): Add Member
- [`DELETE /v1/projects/{project_id}/members/{user_id}`](#delete-v1-projects-project-id-members-user-id): Remove Member

### `GET /v1/projects` {#get-v1-projects}

**List Projects**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [ProjectRead](#schema-projectread) |

### `POST /v1/projects` {#post-v1-projects}

**Create Project**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [ProjectCreate](#schema-projectcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 200 |
| `restricted` | boolean |  | default `false` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [ProjectRead](#schema-projectread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/projects/{project_id}` {#get-v1-projects-project-id}

**Get Project**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ProjectRead](#schema-projectread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PATCH /v1/projects/{project_id}` {#patch-v1-projects-project-id}

**Rename Project**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Treść żądania** (`application/json`, wymagane): [ProjectUpdate](#schema-projectupdate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string or null |  |  |
| `restricted` | boolean or null |  |  |
| `private_mode` | boolean or null |  | Private mode: full URLs, page content, evidence and paste names are stored encrypted; public links show only the host. |
| `render_js_default` | string or null |  | Default JavaScript rendering: off \| on (+ render_js price per page, USD) \| auto (render after a block/empty shell, surcharge only when rendered) |
| `sitemap_url` | string or null |  | Sitemap or sitemap index URL used by default in the website audit wizard (http or https, public host); empty string clears it |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ProjectRead](#schema-projectread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/projects/{project_id}` {#delete-v1-projects-project-id}

**Delete Project**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/projects/{project_id}/members` {#get-v1-projects-project-id-members}

**List Members**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [MemberRead](#schema-memberread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/projects/{project_id}/members` {#post-v1-projects-project-id-members}

**Add Member**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Treść żądania** (`application/json`, wymagane): [MemberAdd](#schema-memberadd)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `role` | [ProjectRole](#schema-projectrole) |  | default `"member"` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [MemberRead](#schema-memberread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/projects/{project_id}/members/{user_id}` {#delete-v1-projects-project-id-members-user-id}

**Remove Member**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |
| `user_id` | path | string (uuid) | tak | User id (UUID). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## webhooks {#tag-webhooks}

Organization webhooks.

- [`GET /v1/webhooks`](#get-v1-webhooks): List Endpoints
- [`POST /v1/webhooks`](#post-v1-webhooks): Create Endpoint
- [`DELETE /v1/webhooks/{endpoint_id}`](#delete-v1-webhooks-endpoint-id): Delete Endpoint
- [`GET /v1/webhooks/{endpoint_id}/secret`](#get-v1-webhooks-endpoint-id-secret): Get Secret
- [`POST /v1/webhooks/{endpoint_id}/test`](#post-v1-webhooks-endpoint-id-test): Send Test
- [`GET /v1/webhooks/{endpoint_id}/deliveries`](#get-v1-webhooks-endpoint-id-deliveries): Deliveries
- [`POST /v1/webhooks/deliveries/{delivery_id}/redeliver`](#post-v1-webhooks-deliveries-delivery-id-redeliver): Redeliver

### `GET /v1/webhooks` {#get-v1-webhooks}

**List Endpoints**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [EndpointRead](#schema-endpointread) |

### `POST /v1/webhooks` {#post-v1-webhooks}

**Create Endpoint**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [EndpointCreate](#schema-endpointcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string (uri) | tak | https only (http and private addresses only in dev) (min length 1) |
| `project_id` | string or null |  | Project public id (prj_…); None = all projects of the org |
| `events` | array of [Event](#schema-event) |  | min items 1 |
| `description` | string or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [EndpointRead](#schema-endpointread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/webhooks/{endpoint_id}` {#delete-v1-webhooks-endpoint-id}

**Delete Endpoint**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `endpoint_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/webhooks/{endpoint_id}/secret` {#get-v1-webhooks-endpoint-id-secret}

**Get Secret**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `endpoint_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [EndpointSecret](#schema-endpointsecret) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/webhooks/{endpoint_id}/test` {#post-v1-webhooks-endpoint-id-test}

**Send Test**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `endpoint_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DeliveryRead](#schema-deliveryread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/webhooks/{endpoint_id}/deliveries` {#get-v1-webhooks-endpoint-id-deliveries}

**Deliveries**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `endpoint_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [DeliveryRead](#schema-deliveryread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/webhooks/deliveries/{delivery_id}/redeliver` {#post-v1-webhooks-deliveries-delivery-id-redeliver}

**Redeliver**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `delivery_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DeliveryRead](#schema-deliveryread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## feedback {#tag-feedback}

Feedback on rules and reports.

- [`POST /v1/reports/{report_id}/feedback`](#post-v1-reports-report-id-feedback): Create Feedback
- [`GET /v1/feedback`](#get-v1-feedback): List Feedback

### `POST /v1/reports/{report_id}/feedback` {#post-v1-reports-report-id-feedback}

**Create Feedback**

Report a wrong rule result, a report problem, or give your own yes / no answer to a rule question.

A yes / no answer for PG-SPONSORED marks the page as a paid publication or not; the latest answer replaces the page
result in your site audit report (marked as yours) and leaves the model result in the stored report. No cost.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`, wymagane): [FeedbackCreate](#schema-feedbackcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string or null |  | None = report-level problem |
| `label` | [FeedbackLabel](#schema-feedbacklabel) | tak | false_positive / false_negative / unclear: about the model result of the rule; yes / no: your own answer to the rule question (1 / 0), e.g. PG-SPONSORED yes = the page is a paid publication. The latest yes / no answer replaces the page result in your site audit report; problem: report-level comment |
| `comment` | string |  | default `""`; max length 4000 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [FeedbackRead](#schema-feedbackread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/feedback` {#get-v1-feedback}

**List Feedback**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `rule_id` | query | string or null |  |  |
| `label` | query | [FeedbackLabel](#schema-feedbacklabel) or null |  |  |
| `report_id` | query | string or null |  |  |
| `limit` | query | integer |  | Maximum number of items to return. (default `100`; min 1; max 1000) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [FeedbackRead](#schema-feedbackread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## auth {#tag-auth}

Sign-in (browser session or JWT).

- [`POST /v1/auth/cookie/login`](#post-v1-auth-cookie-login): Auth:Cookie.Login
- [`POST /v1/auth/jwt/login`](#post-v1-auth-jwt-login): Auth:Jwt.Login
- [`POST /v1/auth/magic-link`](#post-v1-auth-magic-link): Magic Link
- [`POST /v1/auth/cookie/logout`](#post-v1-auth-cookie-logout): Auth:Cookie.Logout
- [`POST /v1/auth/jwt/logout`](#post-v1-auth-jwt-logout): Auth:Jwt.Logout
- [`POST /v1/auth/reset-password`](#post-v1-auth-reset-password): Reset:Reset Password
- [`POST /v1/auth/forgot-password`](#post-v1-auth-forgot-password): Reset:Forgot Password
- [`POST /v1/auth/register`](#post-v1-auth-register): Register Route
- [`POST /v1/auth/confirm`](#post-v1-auth-confirm): Confirm Route

### `POST /v1/auth/cookie/login` {#post-v1-auth-cookie-login}

**Auth:Cookie.Login**

Uwierzytelnianie: brak

**Treść żądania** (`application/x-www-form-urlencoded`, wymagane): [Body_auth_cookie_login_v1_auth_cookie_login_post](#schema-body-auth-cookie-login-v1-auth-cookie-login-post)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `next` | string |  | default `"/"` |
| `grant_type` | string or null |  |  |
| `username` | string | tak |  |
| `password` | string (password) | tak |  |
| `scope` | string |  | default `""` |
| `client_id` | string or null |  |  |
| `client_secret` | string or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/auth/jwt/login` {#post-v1-auth-jwt-login}

**Auth:Jwt.Login**

Uwierzytelnianie: brak

**Treść żądania** (`application/x-www-form-urlencoded`, wymagane): [Body_auth_jwt_login_v1_auth_jwt_login_post](#schema-body-auth-jwt-login-v1-auth-jwt-login-post)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `grant_type` | string or null |  |  |
| `username` | string | tak |  |
| `password` | string (password) | tak |  |
| `scope` | string |  | default `""` |
| `client_id` | string or null |  |  |
| `client_secret` | string or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/auth/magic-link` {#post-v1-auth-magic-link}

**Magic Link**

Sends a sign-in link. The answer and the browser cookie are the same for every address.

Uwierzytelnianie: brak

**Treść żądania** (`application/json`, wymagane): [MagicLinkRequest](#schema-magiclinkrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `next` | string |  | default `"/"` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [MagicLinkAccepted](#schema-magiclinkaccepted) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/auth/cookie/logout` {#post-v1-auth-cookie-logout}

**Auth:Cookie.Logout**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `401` | Missing token or inactive user. |  |
| `204` | No Content |  |

### `POST /v1/auth/jwt/logout` {#post-v1-auth-jwt-logout}

**Auth:Jwt.Logout**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `401` | Missing token or inactive user. |  |

### `POST /v1/auth/reset-password` {#post-v1-auth-reset-password}

**Reset:Reset Password**

Uwierzytelnianie: brak

**Treść żądania** (`application/json`, wymagane): [Body_reset_reset_password_v1_auth_reset_password_post](#schema-body-reset-reset-password-v1-auth-reset-password-post)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `token` | string | tak |  |
| `password` | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `400` | Bad Request | `application/json` [ErrorModel](#schema-errormodel) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

`400` `application/json`

Przykład `RESET_PASSWORD_BAD_TOKEN`: Bad or expired token.

```json
{
  "detail": "RESET_PASSWORD_BAD_TOKEN"
}
```

Przykład `RESET_PASSWORD_INVALID_PASSWORD`: Password validation failed.

```json
{
  "detail": {
    "code": "RESET_PASSWORD_INVALID_PASSWORD",
    "reason": "Password should be at least 3 characters"
  }
}
```

### `POST /v1/auth/forgot-password` {#post-v1-auth-forgot-password}

**Reset:Forgot Password**

Always 202. If the account exists, a password reset e-mail is sent in the background.

Uwierzytelnianie: brak

**Treść żądania** (`application/json`, wymagane): [Body_reset_forgot_password_v1_auth_forgot_password_post](#schema-body-reset-forgot-password-v1-auth-forgot-password-post)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/auth/register` {#post-v1-auth-register}

**Register Route**

Always 202 with the same body. The account becomes active after the link from the e-mail.

Uwierzytelnianie: brak

**Treść żądania** (`application/json`, wymagane): [UserCreate](#schema-usercreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `password` | string | tak |  |
| `is_active` | boolean or null |  | default `true` |
| `is_superuser` | boolean or null |  | default `false` |
| `is_verified` | boolean or null |  | default `false` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [RegisterAccepted](#schema-registeraccepted) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/auth/confirm` {#post-v1-auth-confirm}

**Confirm Route**

Uwierzytelnianie: brak

**Treść żądania** (`application/json`, wymagane): [EmailConfirm](#schema-emailconfirm)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `token` | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [RegisterAccepted](#schema-registeraccepted) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## account {#tag-account}

Your account and step-up.

- [`POST /v1/account/two-factor`](#post-v1-account-two-factor): Two Factor
- [`POST /v1/account/password`](#post-v1-account-password): Change Password
- [`POST /v1/account/sessions/revoke`](#post-v1-account-sessions-revoke): Revoke Sessions
- [`PATCH /v1/users/me`](#patch-v1-users-me): Users:Patch Current User
- [`GET /v1/account/mfa`](#get-v1-account-mfa): Mfa Get
- [`POST /v1/account/mfa/reauth/email`](#post-v1-account-mfa-reauth-email): Reauth Email
- [`POST /v1/account/mfa/reauth/options`](#post-v1-account-mfa-reauth-options): Reauth Options
- [`POST /v1/account/mfa/reauth`](#post-v1-account-mfa-reauth): Reauth Post
- [`POST /v1/account/mfa/keys/options`](#post-v1-account-mfa-keys-options): Key Options
- [`POST /v1/account/mfa/keys`](#post-v1-account-mfa-keys): Key Add
- [`PATCH /v1/account/mfa/keys/{key_id}`](#patch-v1-account-mfa-keys-key-id): Key Rename
- [`DELETE /v1/account/mfa/keys/{key_id}`](#delete-v1-account-mfa-keys-key-id): Key Remove
- [`POST /v1/account/mfa/totp/setup`](#post-v1-account-mfa-totp-setup): Totp Setup
- [`POST /v1/account/mfa/totp/confirm`](#post-v1-account-mfa-totp-confirm): Totp Confirm
- [`DELETE /v1/account/mfa/totp`](#delete-v1-account-mfa-totp): Totp Off
- [`POST /v1/account/mfa/backup-codes`](#post-v1-account-mfa-backup-codes): Backup New
- [`POST /v1/account/step-up/options`](#post-v1-account-step-up-options): Stepup Options
- [`POST /v1/account/step-up/email`](#post-v1-account-step-up-email): Stepup Email
- [`POST /v1/account/step-up`](#post-v1-account-step-up): Stepup
- [`GET /v1/me`](#get-v1-me): Who am I

### `POST /v1/account/two-factor` {#post-v1-account-two-factor}

**Two Factor**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [TwoFactorUpdate](#schema-twofactorupdate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `enabled` | boolean | tak |  |
| `password` | string | tak | max length 256 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/account/password` {#post-v1-account-password}

**Change Password**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [PasswordChange](#schema-passwordchange)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `current_password` | string | tak | max length 256 |
| `new_password` | string | tak | max length 256 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/account/sessions/revoke` {#post-v1-account-sessions-revoke}

**Revoke Sessions**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |

### `PATCH /v1/users/me` {#patch-v1-users-me}

**Users:Patch Current User**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [UserUpdate](#schema-userupdate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `password` | string or null |  |  |
| `email` | string (email) or null |  |  |
| `is_active` | boolean or null |  |  |
| `is_verified` | boolean or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UserRead](#schema-userread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/account/mfa` {#get-v1-account-mfa}

**Mfa Get**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [MfaRead](#schema-mfaread) |

### `POST /v1/account/mfa/reauth/email` {#post-v1-account-mfa-reauth-email}

**Reauth Email**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` any |

### `POST /v1/account/mfa/reauth/options` {#post-v1-account-mfa-reauth-options}

**Reauth Options**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |

### `POST /v1/account/mfa/reauth` {#post-v1-account-mfa-reauth}

**Reauth Post**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [ReauthRequest](#schema-reauthrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `method` | string | tak | one of `"key"`, `"totp"`, `"backup"`, `"email"`, `"password"` |
| `code` | string or null |  |  |
| `password` | string or null |  |  |
| `credential` | object or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/account/mfa/keys/options` {#post-v1-account-mfa-keys-options}

**Key Options**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |

### `POST /v1/account/mfa/keys` {#post-v1-account-mfa-keys}

**Key Add**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [KeyRegister](#schema-keyregister)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 60 |
| `credential` | object | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PATCH /v1/account/mfa/keys/{key_id}` {#patch-v1-account-mfa-keys-key-id}

**Key Rename**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `key_id` | path | integer | tak | API key id (`key_…`). |

**Treść żądania** (`application/json`, wymagane): [KeyRename](#schema-keyrename)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 60 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/account/mfa/keys/{key_id}` {#delete-v1-account-mfa-keys-key-id}

**Key Remove**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `key_id` | path | integer | tak | API key id (`key_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/account/mfa/totp/setup` {#post-v1-account-mfa-totp-setup}

**Totp Setup**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [TotpSetup](#schema-totpsetup) |

### `POST /v1/account/mfa/totp/confirm` {#post-v1-account-mfa-totp-confirm}

**Totp Confirm**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [TotpConfirm](#schema-totpconfirm)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak | max length 16 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/account/mfa/totp` {#delete-v1-account-mfa-totp}

**Totp Off**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |

### `POST /v1/account/mfa/backup-codes` {#post-v1-account-mfa-backup-codes}

**Backup New**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [BackupCodes](#schema-backupcodes) |

### `POST /v1/account/step-up/options` {#post-v1-account-step-up-options}

**Stepup Options**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`): [StepUpOptionsRequest](#schema-stepupoptionsrequest) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/account/step-up/email` {#post-v1-account-step-up-email}

**Stepup Email**

Sends a one-time step-up code to the account e-mail (rate limited).

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` any |

### `POST /v1/account/step-up` {#post-v1-account-step-up}

**Stepup**

Step-up verification with `totp`, `passkey`, `key` (hardware key, default) or `email` (code from `/v1/account/step-up/email`, valid 8 h). Superadmin only.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [StepUpRequest](#schema-stepuprequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `method` | string |  | one of `"totp"`, `"passkey"`, `"key"`, `"email"`; default `"key"` |
| `code` | string or null |  |  |
| `credential` | object or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` any |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/me` {#get-v1-me}

**Who am I**

The caller as seen by the API: `kind` (user or api_key), the API key (no secret), the current organization with `my_role`, the key's project, the key's scopes (`null` for a signed-in user: scopes do not limit users, the role does) and the organization balance. Free, no scope needed.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [MeRead](#schema-meread) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

## users {#tag-users}

Users (admin).

- [`GET /v1/users`](#get-v1-users): List Users
- [`POST /v1/users`](#post-v1-users): Create User
- [`PATCH /v1/users/{user_id}/role`](#patch-v1-users-user-id-role): Set Role
- [`GET /v1/users/me`](#get-v1-users-me): Users:Current User
- [`GET /v1/users/{id}`](#get-v1-users-id): Users:User

### `GET /v1/users` {#get-v1-users}

**List Users**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [UserRead](#schema-userread) |

### `POST /v1/users` {#post-v1-users}

**Create User**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [AdminUserCreate](#schema-adminusercreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `password` | string | tak |  |
| `role` | [Role](#schema-role) |  | default `"user"` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [UserRead](#schema-userread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PATCH /v1/users/{user_id}/role` {#patch-v1-users-user-id-role}

**Set Role**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `user_id` | path | string (uuid) | tak | User id (UUID). |

**Treść żądania** (`application/json`, wymagane): [RoleUpdate](#schema-roleupdate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `role` | [Role](#schema-role) | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UserRead](#schema-userread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/users/me` {#get-v1-users-me}

**Users:Current User**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UserRead](#schema-userread) |
| `401` | Missing token or inactive user. |  |

### `GET /v1/users/{id}` {#get-v1-users-id}

**Users:User**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [UserRead](#schema-userread) |
| `401` | Missing token or inactive user. |  |
| `403` | Not a superuser. |  |
| `404` | The user does not exist. |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## organizations {#tag-organizations}

Organizations and members.

- [`GET /v1/orgs`](#get-v1-orgs): My Orgs
- [`POST /v1/orgs`](#post-v1-orgs): Create
- [`GET /v1/orgs/current`](#get-v1-orgs-current): Current
- [`GET /v1/orgs/{org_id}`](#get-v1-orgs-org-id): One organization
- [`GET /v1/orgs/{org_id}/members`](#get-v1-orgs-org-id-members): Members
- [`POST /v1/orgs/{org_id}/members`](#post-v1-orgs-org-id-members): Add Member
- [`PATCH /v1/orgs/{org_id}/members/{user_id}`](#patch-v1-orgs-org-id-members-user-id): Change Role
- [`DELETE /v1/orgs/{org_id}/members/{user_id}`](#delete-v1-orgs-org-id-members-user-id): Remove Member
- [`GET /v1/orgs/{org_id}/byok/serp`](#get-v1-orgs-org-id-byok-serp): Serp Get
- [`PUT /v1/orgs/{org_id}/byok/serp`](#put-v1-orgs-org-id-byok-serp): Serp Put
- [`DELETE /v1/orgs/{org_id}/byok/serp`](#delete-v1-orgs-org-id-byok-serp): Serp Delete
- [`POST /v1/orgs/{org_id}/byok/serp/test`](#post-v1-orgs-org-id-byok-serp-test): Serp Test
- [`PUT /v1/orgs/{org_id}/byok/serp/settings`](#put-v1-orgs-org-id-byok-serp-settings): Serp Settings
- [`GET /v1/orgs/{org_id}/byok/dataforseo`](#get-v1-orgs-org-id-byok-dataforseo): Status
- [`PUT /v1/orgs/{org_id}/byok/dataforseo`](#put-v1-orgs-org-id-byok-dataforseo): Save
- [`DELETE /v1/orgs/{org_id}/byok/dataforseo`](#delete-v1-orgs-org-id-byok-dataforseo): Delete
- [`POST /v1/orgs/{org_id}/byok/dataforseo/test`](#post-v1-orgs-org-id-byok-dataforseo-test): Test
- [`GET /v1/orgs/{org_id}/byok/fetch`](#get-v1-orgs-org-id-byok-fetch): Fetch Get
- [`PUT /v1/orgs/{org_id}/byok/fetch`](#put-v1-orgs-org-id-byok-fetch): Fetch Put
- [`DELETE /v1/orgs/{org_id}/byok/fetch`](#delete-v1-orgs-org-id-byok-fetch): Fetch Delete
- [`POST /v1/orgs/{org_id}/byok/fetch/test`](#post-v1-orgs-org-id-byok-fetch-test): Fetch Test
- [`PUT /v1/orgs/{org_id}/byok/fetch/settings`](#put-v1-orgs-org-id-byok-fetch-settings): Fetch Settings
- [`PUT /v1/orgs/{org_id}/byok/fallback`](#put-v1-orgs-org-id-byok-fallback): Fallback Settings

### `GET /v1/orgs` {#get-v1-orgs}

**My Orgs**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [OrgRead](#schema-orgread) |

### `POST /v1/orgs` {#post-v1-orgs}

**Create**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [OrgCreate](#schema-orgcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 200 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [OrgRead](#schema-orgread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/orgs/current` {#get-v1-orgs-current}

**Current**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [OrgRead](#schema-orgread) |

### `GET /v1/orgs/{org_id}` {#get-v1-orgs-org-id}

**One organization**

One organization by id (`org_…`): for a user any organization they belong to, for an API key only the key's organization. `my_role` is the role the caller acts with (project keys: `member`, user keys: the owner's role). Other ids: 404 `org_not_found`.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [OrgRead](#schema-orgread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `org_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/orgs/{org_id}/members` {#get-v1-orgs-org-id-members}

**Members**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [OrgMemberRead](#schema-orgmemberread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/orgs/{org_id}/members` {#post-v1-orgs-org-id-members}

**Add Member**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [OrgMemberAdd](#schema-orgmemberadd)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `role` | [OrgRole](#schema-orgrole) |  | default `"member"` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [OrgMemberRead](#schema-orgmemberread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PATCH /v1/orgs/{org_id}/members/{user_id}` {#patch-v1-orgs-org-id-members-user-id}

**Change Role**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |
| `user_id` | path | string (uuid) | tak | User id (UUID). |

**Treść żądania** (`application/json`, wymagane): [OrgMemberUpdate](#schema-orgmemberupdate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `role` | [OrgRole](#schema-orgrole) | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/orgs/{org_id}/members/{user_id}` {#delete-v1-orgs-org-id-members-user-id}

**Remove Member**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |
| `user_id` | path | string (uuid) | tak | User id (UUID). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/orgs/{org_id}/byok/serp` {#get-v1-orgs-org-id-byok-serp}

**Serp Get**

Own search results keys (only the last 4 characters) and the organization setting.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [SerpByokStatus](#schema-serpbyokstatus) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PUT /v1/orgs/{org_id}/byok/serp` {#put-v1-orgs-org-id-byok-serp}

**Serp Put**

Saves an own key after a free check. A rejected key returns 422 and is not saved; a key without funds is
saved with a warning in `error`. From then on all search results of the organization use this key.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [SerpKeyIn](#schema-serpkeyin)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [SerpProviderName](#schema-serpprovidername) | tak |  |
| `login` | string or null |  |  |
| `password` | string or null |  |  |
| `api_key` | string or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [KeyCheck](#schema-keycheck) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/orgs/{org_id}/byok/serp` {#delete-v1-orgs-org-id-byok-serp}

**Serp Delete**

Removes the own key of `provider`. New orders use our key and our prices, unless `own_key_only` is on.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |
| `provider` | query | [SerpProviderName](#schema-serpprovidername) | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/orgs/{org_id}/byok/serp/test` {#post-v1-orgs-org-id-byok-serp-test}

**Serp Test**

Checks a saved key again with a free request (404 without a key).

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [SerpKeyRef](#schema-serpkeyref)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [SerpProviderName](#schema-serpprovidername) | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [KeyCheck](#schema-keycheck) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PUT /v1/orgs/{org_id}/byok/serp/settings` {#put-v1-orgs-org-id-byok-serp-settings}

**Serp Settings**

`own_key_only`: never buy search results at our cost. Without a working own key such orders are refused
before any charge (or finish without the search data), never charged for search results.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [SerpByokSettings](#schema-serpbyoksettings)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `own_key_only` | boolean |  | default `false` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [SerpByokSettings](#schema-serpbyoksettings) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/orgs/{org_id}/byok/dataforseo` {#get-v1-orgs-org-id-byok-dataforseo}

**Status** Wycofywany.

Deprecated: use GET /v1/orgs/{org_id}/byok/serp.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DfsKeyStatus](#schema-dfskeystatus) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PUT /v1/orgs/{org_id}/byok/dataforseo` {#put-v1-orgs-org-id-byok-dataforseo}

**Save** Wycofywany.

Deprecated: use PUT /v1/orgs/{org_id}/byok/serp. Free check first; a rejected key = 422, not saved.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [DfsKeyIn](#schema-dfskeyin)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `login` | string | tak | min length 3; max length 200 |
| `password` | string | tak | min length 4; max length 200 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DfsCheck](#schema-dfscheck) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/orgs/{org_id}/byok/dataforseo` {#delete-v1-orgs-org-id-byok-dataforseo}

**Delete** Wycofywany.

Deprecated: use DELETE /v1/orgs/{org_id}/byok/serp.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/orgs/{org_id}/byok/dataforseo/test` {#post-v1-orgs-org-id-byok-dataforseo-test}

**Test** Wycofywany.

Deprecated: use POST /v1/orgs/{org_id}/byok/serp/test.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [DfsCheck](#schema-dfscheck) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/orgs/{org_id}/byok/fetch` {#get-v1-orgs-org-id-byok-fetch}

**Fetch Get**

Own page fetching keys (only the last 4 characters), the organization setting and who pays for fetching now.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FetchByokStatus](#schema-fetchbyokstatus) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PUT /v1/orgs/{org_id}/byok/fetch` {#put-v1-orgs-org-id-byok-fetch}

**Fetch Put**

Saves an own key for page fetching after a free check. A rejected key returns 422 and is not saved; a key
without credits is saved with a warning in `error`. From then on all pages fetched for the organization (reports,
audits, intent, Gain & Gap, Query Pack) use this key and fetching and rendering cost $0 here. If the key fails,
the page is not fetched and you get an error; we never switch to our key.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [FetchKeyIn](#schema-fetchkeyin)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [FetchProviderName](#schema-fetchprovidername) | tak |  |
| `api_key` | string | tak | min length 8; max length 200 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FetchKeyCheck](#schema-fetchkeycheck) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/orgs/{org_id}/byok/fetch` {#delete-v1-orgs-org-id-byok-fetch}

**Fetch Delete**

Removes the own key of `provider`. New pages are fetched with our key and our prices, unless `own_key_only`
is on.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |
| `provider` | query | [FetchProviderName](#schema-fetchprovidername) | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/orgs/{org_id}/byok/fetch/test` {#post-v1-orgs-org-id-byok-fetch-test}

**Fetch Test**

Checks a saved key again with a free request (404 without a key).

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [FetchKeyRef](#schema-fetchkeyref)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [FetchProviderName](#schema-fetchprovidername) | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FetchKeyCheck](#schema-fetchkeycheck) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PUT /v1/orgs/{org_id}/byok/fetch/settings` {#put-v1-orgs-org-id-byok-fetch-settings}

**Fetch Settings**

`own_key_only`: never fetch pages at our cost. Without a working own key, pages are not fetched and the error
says why; nothing is charged for fetching.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [FetchByokSettings](#schema-fetchbyoksettings)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `own_key_only` | boolean |  | default `false` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FetchByokSettings](#schema-fetchbyoksettings) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `PUT /v1/orgs/{org_id}/byok/fallback` {#put-v1-orgs-org-id-byok-fallback}

**Fallback Settings**

`fallback_ours`: when your own key (search results or page fetching) is rejected or has no funds, the call
uses our key and our prices instead of failing, and the report says so. Off by default: such calls fail with a
clear error. Ignored while `own_key_only` is on.

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Treść żądania** (`application/json`, wymagane): [FallbackSettings](#schema-fallbacksettings)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `fallback_ours` | boolean |  | default `false` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [FallbackSettings](#schema-fallbacksettings) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## invites {#tag-invites}

Beta invitations.

- [`GET /v1/invites`](#get-v1-invites): List Invites
- [`POST /v1/invites`](#post-v1-invites): Create
- [`DELETE /v1/invites/{invite_id}`](#delete-v1-invites-invite-id): Revoke

### `GET /v1/invites` {#get-v1-invites}

**List Invites**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [InviteRead](#schema-inviteread) |

### `POST /v1/invites` {#post-v1-invites}

**Create**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [InviteCreate](#schema-invitecreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `role` | `"user"` |  | default `"user"` |
| `project_id` | string or null |  | Existing project (public id, prj_…) the tester joins as member; None = own personal organization |
| `send_email` | boolean |  | default `true` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [InviteCreated](#schema-invitecreated) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/invites/{invite_id}` {#delete-v1-invites-invite-id}

**Revoke**

Uwierzytelnianie: cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `invite_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## billing {#tag-billing}

Balance top-ups by payment link, balance history and invoices.

- [`GET /v1/billing/topups`](#get-v1-billing-topups): Top-up payments
- [`POST /v1/billing/topups`](#post-v1-billing-topups): Create a top-up payment link
- [`GET /v1/billing/topups/options`](#get-v1-billing-topups-options): Top-up rules and consent text
- [`GET /v1/billing/topups/{topup_id}`](#get-v1-billing-topups-topup-id): Top-up payment state
- [`GET /v1/billing/ledger`](#get-v1-billing-ledger): Balance history
- [`GET /v1/billing/invoices`](#get-v1-billing-invoices): Invoices

### `GET /v1/billing/topups` {#get-v1-billing-topups}

**Top-up payments**

Top-up payments of the organization, newest first (`limit`, default 50, max 100), with the payment `mode` of the server and a `warning` in `sandbox` mode. Each item has its own `mode`; `state: sandbox` = a paid test payment that did not top up the balance. API keys need `billing:read`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `limit` | query | integer |  | Maximum number of items to return. (default `50`; min 1; max 100) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [TopupList](#schema-topuplist) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/billing/topups` {#post-v1-billing-topups}

**Create a top-up payment link**

Returns a link to a hosted card payment page for a balance top-up (`amount_usd` in whole cents, at least `min_usd`, at most `max_usd` from the options). A person opens the link and pays; card data never passes through this API. The balance grows when the payment is confirmed (poll `GET /v1/billing/topups/{id}`); a service fee is added to the payment. `consent_ver` confirms that the person accepted the consent text from the options (delivery before the 14-day withdrawal period ends). Allowed for a signed-in user or an API key of a user with the `billing:write` scope (project and organization keys get 403); viewers get 403. Unpaid links expire after `expires_in_s` and free the room under the limit. Send an `Idempotency-Key` to get the same link again when you retry. `mode: sandbox` (with `warning`) = a test payment: it is recorded with state `sandbox`, but the balance does not grow and no invoice is issued. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `Idempotency-Key` | header | string or null |  | 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. |

**Treść żądania** (`application/json`, wymagane): [TopupCreate](#schema-topupcreate)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `amount_usd` | number | tak | max 1000000.0 |
| `consent_ver` | string | tak |  |
| `lang` | string |  | one of `"en"`, `"pl"`; default `"en"` |
| `promo_code` | string or null |  |  |

Przykład:

```json
{
  "amount_usd": 50,
  "consent_ver": "2026-10-22.1",
  "lang": "en"
}
```

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [TopupStart](#schema-topupstart) |
| `422` | Error codes: `idempotency_mismatch`, `consent_required`, `topup_below_min`, `topup_invalid_amount`, `topup_over_limit`, `promo_invalid`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `forbidden` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `idempotency_unavailable`, `billing_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/billing/topups/options` {#get-v1-billing-topups-options}

**Top-up rules and consent text**

Minimum and remaining room under the balance top-up limit, service fee, validity and the consent text a person must accept before paying (`consent_ver`). Free. `mode` is the payment mode of the server (`live`, `test` or `sandbox`); in `sandbox` payments are test payments that do not top up the balance and `warning` says so. API keys need the `billing:read` scope.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `lang` | query | string |  | Language of the output: `en` or `pl`. (default `"en"`; pattern `^(en|pl)$`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [TopupOptions](#schema-topupoptions) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/billing/topups/{topup_id}` {#get-v1-billing-topups-topup-id}

**Top-up payment state**

State of a top-up payment: `open` (waiting for payment), `credited` (balance topped up), `failed`, `expired`, `rejected` (limit reached by another top-up), `sandbox` (test payment, balance unchanged). API keys need `billing:read`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `topup_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [CheckoutRead](#schema-checkoutread) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/billing/ledger` {#get-v1-billing-ledger}

**Balance history**

Balance history of the organization, newest first, in windows of days (UTC): money in (`topup`, `package`, `credit`) and out (`usage` = all charges of one day after refunds, today including work still running; `adjustment` = payment refunds and corrections). Per-job charges are in job and report responses. Next page: `?before=<next_before>`; `next_before` is null at the start of the organization's history. API keys need `billing:read`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `before` | query | string (date) or null |  | Day (YYYY-MM-DD, UTC), exclusive; default: after today |
| `days` | query | integer |  | Window length in days (default `31`; min 1; max 92) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [LedgerPage](#schema-ledgerpage) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/billing/invoices` {#get-v1-billing-invoices}

**Invoices**

Invoices for top-ups and packages, newest first, with the invoice number, state and a public PDF link (corrections as separate fields). `status: pending` = being issued. API keys need `billing:read`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `limit` | query | integer |  | Maximum number of items to return. (default `50`; min 1; max 100) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [InvoiceItem](#schema-invoiceitem) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

## addons {#tag-addons}

Add a section (indexing, How to fix, visibility, missing audit types) to a finished report or audit (paid).

- [`GET /v1/reports/{report_id}/addons`](#get-v1-reports-report-id-addons): Add-ons for a page report
- [`POST /v1/reports/{report_id}/addons`](#post-v1-reports-report-id-addons): Add a section to a page report
- [`GET /v1/audits/{audit_id}/addons`](#get-v1-audits-audit-id-addons): Add-ons for a site audit
- [`POST /v1/audits/{audit_id}/addons`](#post-v1-audits-audit-id-addons): Add a section to a site audit

### `GET /v1/reports/{report_id}/addons` {#get-v1-reports-report-id-addons}

**Add-ons for a page report**

What can still be added to a page report: Google indexing of the address, How to fix, missing audit types - each with `price_usd` and `state` (available, in_progress, done, unavailable). Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [AddonOffers](#schema-addonoffers) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/reports/{report_id}/addons` {#post-v1-reports-report-id-addons}

**Add a section to a page report**

Adds one section to an existing page report (`kind`: indexing, fix_plan, audit_type + `category`) without re-checking the rest. Price is reserved now; failures are refunded. Ordering the same add-on again while it is in progress returns it with `created=false` and no charge. Poll `GET .../addons`.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `report_id` | path | string | tak | Report id: `rep_…` for page reports, `itr_…` for search intent reports. |

**Treść żądania** (`application/json`, wymagane): [AddonOrder](#schema-addonorder)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | one of `"visibility"`, `"indexing"`, `"topicality"`, `"fix_plan"`, `"audit_type"` |
| `category` | string or null |  | Required for `kind=audit_type` |
| `markets` | array of [VisibilityMarket](#schema-visibilitymarket) |  | Only `kind=visibility`: markets to check, up to 5 (each is a separate check, `price_usd` per market, charged only when data is returned). The first market is the main one. Empty = one automatic market (the main language of the checked pages). Repeated markets are counted once. Ignored when the offer has `retry_markets`. (default `[]`; max items 5) |
| `offer` | string or null |  | Only `kind=visibility`: `token` of the offer you accept (from GET addons). Required to retry `retry_markets`; a changed offer = 409 `offer_changed`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Ordered or already in progress; poll the offers | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `200` | Already done (nothing charged) | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `report_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `addon_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/addons` {#get-v1-audits-audit-id-addons}

**Add-ons for a site audit**

What can still be added to a finished audit: visibility in Google, indexing of the audited pages, Topicality, How to fix, missing audit types - each with `price_usd` and `state`. Free.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [AddonOffers](#schema-addonoffers) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/addons` {#post-v1-audits-audit-id-addons}

**Add a section to a site audit**

Adds one section to an existing site report (`kind`: visibility, indexing, topicality, fix_plan, audit_type + `category`) without re-checking other parts. Visibility $0.50 per domain, indexing $0.01 per address, Topicality included, How to fix $0.10 per page that needs changes; audit types: only the missing rules. Ordering the same add-on again while it is in progress returns it with `created=false` and no charge.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Treść żądania** (`application/json`, wymagane): [AddonOrder](#schema-addonorder)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | one of `"visibility"`, `"indexing"`, `"topicality"`, `"fix_plan"`, `"audit_type"` |
| `category` | string or null |  | Required for `kind=audit_type` |
| `markets` | array of [VisibilityMarket](#schema-visibilitymarket) |  | Only `kind=visibility`: markets to check, up to 5 (each is a separate check, `price_usd` per market, charged only when data is returned). The first market is the main one. Empty = one automatic market (the main language of the checked pages). Repeated markets are counted once. Ignored when the offer has `retry_markets`. (default `[]`; max items 5) |
| `offer` | string or null |  | Only `kind=visibility`: `token` of the offer you accept (from GET addons). Required to retry `retry_markets`; a changed offer = 409 `offer_changed`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Ordered or already in progress; poll the offers | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `200` | Already done (nothing charged) | `application/json` [AddonOrderResult](#schema-addonorderresult) |
| `409` | Error codes: `addon_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `audit_not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached` | `application/json` [ErrorResponse](#schema-errorresponse) |

## context {#tag-context}

Page context: how well title, headings and meta match the content (paid).

- [`POST /v1/context`](#post-v1-context): Create Context
- [`POST /v1/context/estimate`](#post-v1-context-estimate): Estimate

### `POST /v1/context` {#post-v1-context}

**Create Context**

Analyse one page now: how well title, H1, meta description and H2/H3 match the content (strength 0-100),
categories, fit to an audited site, optional page vector and fix tips. A page error returns 200 with
`status: error` and nothing 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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [ContextRequest](#schema-contextrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null |  |  |
| `text` | string or null |  | Page content as markdown (headings with #, ##, ###). Use with `title` and `meta` when you have them |
| `title` | string or null |  | Text input only: the page &lt;title> |
| `meta` | string or null |  | Text input only: the meta description (empty string = the page has none; omitted = unknown) |
| `categories` | array of string |  | Taxonomies for page categories (`iab`, `google`); [] = no categories (max items 2) |
| `include_vector` | boolean |  | Return the page embedding (core content vector) (default `false`) |
| `site` | string or null |  | Domain to measure fit against; needs a site audit of that domain in your organisation (after this feature shipped) |
| `fix` | boolean |  | Ask Ani how to fix weak elements (paid separately, only when there is something to fix and a suggestion passed checks) (default `false`) |
| `lang` | string |  | Language of fix suggestions (one of `"en"`, `"pl"`; default `"en"`) |
| `render_js` | boolean |  | URL only: render JavaScript (+render price) (default `false`) |
| `project_id` | string or null |  |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ContextResult](#schema-contextresult) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `invalid_url` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded`, `context_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `context_unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/context/estimate` {#post-v1-context-estimate}

**Estimate**

Free price estimate per check and in total (nothing is held).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Treść żądania** (`application/json`, wymagane): [ContextEstimateRequest](#schema-contextestimaterequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `checks` | integer |  | default `1`; min 1.0; max 1000000.0 |
| `variant` | string |  | one of `"document"`, `"url"`; default `"url"` |
| `categories` | array of string |  | max items 2 |
| `fix` | boolean |  | default `false` |
| `render_js` | boolean |  | default `false` |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [ContextEstimate](#schema-contextestimate) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `context_rate_limited` | `application/json` [ErrorResponse](#schema-errorresponse) |

## indexing {#tag-indexing}

Google indexing state of URLs or audit pages (paid).

- [`POST /v1/indexing`](#post-v1-indexing): Create Indexing
- [`GET /v1/audits/{audit_id}/indexing`](#get-v1-audits-audit-id-indexing): Audit Indexing
- [`POST /v1/audits/{audit_id}/indexing`](#post-v1-audits-audit-id-indexing): Create Audit Indexing
- [`GET /v1/indexing/{run_id}`](#get-v1-indexing-run-id): Read Indexing

### `POST /v1/indexing` {#post-v1-indexing}

**Create Indexing**

Check whether Google has these addresses in its index. Charged per unique address that gets a result
(addresses the service could not check are refunded). Not available in private projects. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | query | string or null |  | Project public id, prj_… (or X-Project-ID header) |
| `Idempotency-Key` | header | string or null |  | 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. |
| `X-Project-ID` | header | string or null |  | Project id (`prj_…`) to work in. Empty = your default project; an API key always uses its own project. |

**Treść żądania** (`application/json`, wymagane): [IndexRequest](#schema-indexrequest)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `urls` | array of string (uri) | tak | min items 1; max items 1000 |
| `project_id` | string or null |  |  |
| `no_charge` | boolean |  | Operators only: run without charging the organisation's balance. Anyone else gets 403. (default `false`) |
| `overflow` | string |  | Addresses covered by the project's Search Console are checked free (URL Inspection) up to Google's daily limit. Above it: paid = the paid check (charged), wait = not checked today (one of `"paid"`, `"wait"`; default `"paid"`) |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [IndexRun](#schema-indexrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key`, `invalid_url` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope`, `forbidden` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/audits/{audit_id}/indexing` {#get-v1-audits-audit-id-indexing}

**Audit Indexing**

The indexing check ordered together with this audit (latest one).

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [IndexRun](#schema-indexrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

### `POST /v1/audits/{audit_id}/indexing` {#post-v1-audits-audit-id-indexing}

**Create Audit Indexing**

Check the indexing of every page of a finished audit (same price and refund rules as `POST /v1/indexing`).
The result is shown in the audit report and in `GET /v1/audits/{id}/indexing`. While the audit is still running or
its report parts are being prepared: 409 `audit_in_progress`. `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.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `audit_id` | path | string | tak | Audit id (`aud_…`) from `POST /v1/audits/site` or `GET /v1/audits`. |
| `Idempotency-Key` | header | string or null |  | 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. |

**Treść żądania** (`application/json`): [AuditIndexRequest](#schema-auditindexrequest) or null

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `202` | Successful Response | `application/json` [IndexRun](#schema-indexrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `409` | Error codes: `idempotency_in_progress`, `conflict`, `audit_in_progress` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `400` | Error codes: `invalid_idempotency_key` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `401` | Error codes: `unauthorized`, `invalid_api_key`, `api_key_expired` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `402` | Error codes: `insufficient_balance` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `403` | Error codes: `insufficient_scope` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `404` | Error codes: `not_found` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `422` | Error codes: `idempotency_mismatch`, `validation_error` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `429` | Error codes: `rate_limited`, `quota_exceeded` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `503` | Error codes: `spend_cap_reached`, `beta_budget_reached`, `idempotency_unavailable`, `unavailable` | `application/json` [ErrorResponse](#schema-errorresponse) |
| `507` | Error codes: `idempotency_result_too_large` | `application/json` [ErrorResponse](#schema-errorresponse) |

### `GET /v1/indexing/{run_id}` {#get-v1-indexing-run-id}

**Read Indexing**

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `run_id` | path | string | tak | Label run id (`lbl_…`) from `POST /v1/labels` or `POST /v1/labels/batch`. |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [IndexRun](#schema-indexrun) |
| `4XX` | Client Error | `application/json` [ErrorResponse](#schema-errorresponse) |
| `5XX` | Server Error | `application/json` [ErrorResponse](#schema-errorresponse) |

## search-console {#tag-search-console}

- [`GET /v1/orgs/{org_id}/gsc/connections`](#get-v1-orgs-org-id-gsc-connections): Connections
- [`DELETE /v1/orgs/{org_id}/gsc/connections/{connection_id}`](#delete-v1-orgs-org-id-gsc-connections-connection-id): Disconnect
- [`GET /v1/projects/{project_id}/gsc`](#get-v1-projects-project-id-gsc): Project Gsc
- [`GET /v1/projects/{project_id}/gsc/sites`](#get-v1-projects-project-id-gsc-sites): Project Sites
- [`POST /v1/projects/{project_id}/gsc/properties`](#post-v1-projects-project-id-gsc-properties): Attach
- [`DELETE /v1/projects/{project_id}/gsc/properties/{property_id}`](#delete-v1-projects-project-id-gsc-properties-property-id): Detach

### `GET /v1/orgs/{org_id}/gsc/connections` {#get-v1-orgs-org-id-gsc-connections}

**Connections**

Google accounts connected to the organization for Search Console (read-only), with their state.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [GscConnection](#schema-gscconnection) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/orgs/{org_id}/gsc/connections/{connection_id}` {#delete-v1-orgs-org-id-gsc-connections-connection-id}

**Disconnect**

Disconnects a Google account: revokes our access at Google and detaches its properties from all projects.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `org_id` | path | string | tak | Organization id (`org_…`). |
| `connection_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/projects/{project_id}/gsc` {#get-v1-projects-project-id-gsc}

**Project Gsc**

Search Console properties of the project and the organization's Google accounts.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` [GscProjectStatus](#schema-gscprojectstatus) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `GET /v1/projects/{project_id}/gsc/sites` {#get-v1-projects-project-id-gsc-sites}

**Project Sites**

Properties the Google account `connection_id` can read, domain properties first.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |
| `connection_id` | query | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `200` | Successful Response | `application/json` array of [GscSite](#schema-gscsite) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `POST /v1/projects/{project_id}/gsc/properties` {#post-v1-projects-project-id-gsc-properties}

**Attach**

Attaches a property to the project. Site audits in this project can then use its pages and traffic.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |

**Treść żądania** (`application/json`, wymagane): [PropertyAttachIn](#schema-propertyattachin)

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `connection_id` | string | tak | max length 24 |
| `site_url` | string | tak | min length 3; max length 300 |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `201` | Successful Response | `application/json` [GscProperty](#schema-gscproperty) |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

### `DELETE /v1/projects/{project_id}/gsc/properties/{property_id}` {#delete-v1-projects-project-id-gsc-properties-property-id}

**Detach**

Detaches a property from the project. The Google account stays connected.

Uwierzytelnianie: klucz API (`Bearer gsj_...`), cookie sesji panelu, JWT (`Bearer`)

**Parametry**

| Nazwa | Gdzie | Typ | Wymagane | Opis |
|---|---|---|---|---|
| `project_id` | path | string | tak | Project id (`prj_…`). |
| `property_id` | path | string | tak |  |

**Odpowiedzi**

| Status | Opis | Typ |
|---|---|---|
| `204` | Successful Response |  |
| `422` | Validation Error | `application/json` [HTTPValidationError](#schema-httpvalidationerror) |

## Schematy {#schemas}

Obiekty używane w żądaniach i odpowiedziach.

### ActionItem {#schema-actionitem}

"Top things to fix": one rule with findings, what to do and the pages affected. Ordered by number of pages, audit type (spam, then quality, then helpful) and signal strength.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string | tak |  |
| `category` | string | tak |  |
| `title` | string | tak |  |
| `fix` | string |  | default `""` |
| `pages` | array of [ActionPage](#schema-actionpage) | tak |  |

### ActionPage {#schema-actionpage}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak |  |
| `url` | string or null | tak |  |
| `action` | string |  | What to change on this page, written for this page (model fix in the report language or text built from the page's links); empty = use the rule's general `fix` (default `""`) |

### AddonOffer {#schema-addonoffer}

One add-on that can be ordered, with its price from the server price list.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | one of `"visibility"`, `"indexing"`, `"topicality"`, `"fix_plan"`, `"audit_type"` |
| `category` | string or null |  | Audit type (only `kind=audit_type`) |
| `state` | string | tak | available = can be ordered; in_progress = ordered, section being prepared (no second order is possible); done = section is in the report; unavailable = see `reason` (one of `"available"`, `"in_progress"`, `"done"`, `"unavailable"`) |
| `price_usd` | number |  | Price of this order in USD (0 = included in the report price or already paid, no extra charge) (default `0.0`) |
| `units` | integer |  | Pages or addresses the price covers (0 = whole site) (default `0`) |
| `free_units` | integer |  | Indexing: addresses checked free through the project's Search Console (daily Google limit); only the rest is in `price_usd` (default `0`) |
| `reason` | string or null |  | Why unavailable (machine code) |
| `ref` | string or null |  | Id of the running or last order (idx_…, upg_…), when there is one |
| `max_markets` | integer |  | Visibility: how many markets one order may list in `markets` (0 = not applicable). The price of an order with N markets is `price_usd` × N. (default `0`) |
| `retry_markets` | array of string |  | Visibility: markets of the previous order without data (refunded) that this order checks again; markets with data stay. When set, `price_usd` is already the price of all of them and `markets` in the order is ignored. (default `[]`) |
| `token` | string or null |  | Visibility: key of this offer. Send it back as `offer` in the order; when the offer changed in the meantime (another order, new results) the order is refused with 409 `offer_changed` and nothing is charged. Required to retry `retry_markets`. |

### AddonOffers {#schema-addonoffers}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `target` | string | tak | one of `"report"`, `"audit"` |
| `target_id` | string | tak |  |
| `offers` | array of [AddonOffer](#schema-addonoffer) | tak |  |

### AddonOrder {#schema-addonorder}

One add-on to order. `markets` only for `kind=visibility`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | one of `"visibility"`, `"indexing"`, `"topicality"`, `"fix_plan"`, `"audit_type"` |
| `category` | string or null |  | Required for `kind=audit_type` |
| `markets` | array of [VisibilityMarket](#schema-visibilitymarket) |  | Only `kind=visibility`: markets to check, up to 5 (each is a separate check, `price_usd` per market, charged only when data is returned). The first market is the main one. Empty = one automatic market (the main language of the checked pages). Repeated markets are counted once. Ignored when the offer has `retry_markets`. (default `[]`; max items 5) |
| `offer` | string or null |  | Only `kind=visibility`: `token` of the offer you accept (from GET addons). Required to retry `retry_markets`; a changed offer = 409 `offer_changed`. |

### AddonOrderResult {#schema-addonorderresult}

Order result. Ordering the same add-on while it is in progress returns it with `created` false and no charge.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `offer` | [AddonOffer](#schema-addonoffer) | tak |  |
| `created` | boolean | tak | true = this request placed the order (and reserved its price); false = already running or done, nothing charged |

### AdminUserCreate {#schema-adminusercreate}

`POST /v1/users` (admin) when public sign-up is closed.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `password` | string | tak |  |
| `role` | [Role](#schema-role) |  | default `"user"` |

### Advice {#schema-advice}

An element to avoid: name and reason (text only).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `element` | string | tak |  |
| `reason` | string |  | default `""` |

### AiPresence {#schema-aipresence}

Keywords of the domain from the Visibility data where Google shows an AI Overview. `status`: `ok`, `no_visibility` (Visibility not ordered), `empty` (no keywords) or `unavailable`. `cited` and `cited_known` are null when citation data is not available, never 0 for missing data.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string |  | one of `"ok"`, `"no_visibility"`, `"empty"`, `"unavailable"`; default `"no_visibility"` |
| `market` | string |  | default `""` |
| `fetched_at` | string (date-time) or null |  |  |
| `keywords` | integer |  | default `0` |
| `total_keywords` | integer |  | default `0` |
| `aio_keywords` | integer |  | default `0` |
| `aio_volume` | integer |  | default `0` |
| `cited_known` | boolean |  | default `false` |
| `cited` | integer or null |  |  |
| `top` | array of [AioKeyword](#schema-aiokeyword) |  | default `[]` |
| `private` | boolean |  | default `false` |

### AioKeyword {#schema-aiokeyword}

A phrase the domain ranks for where Google shows an AI Overview, with its monthly searches, the domain's organic position and whether the domain is cited in the overview (null = unknown).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `keyword` | string | tak |  |
| `volume` | integer |  | default `0` |
| `position` | integer | tak |  |
| `url_path` | string |  | default `""` |
| `cited` | boolean or null |  |  |

### AnchorCluster {#schema-anchorcluster}

A site section ranked as a topic anchor: `nv` = max(focus - 0.30, 0) × ln(1 + pages); sections with `nv` = 0 are below the coherence gate.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `cluster` | integer | tak |  |
| `pages` | integer | tak |  |
| `focus` | number | tak |  |
| `nv` | number | tak |  |
| `anchor` | boolean |  | default `false` |
| `home_cos` | number or null |  |  |
| `drift` | boolean |  | default `false` |

### ApiKeyCreate {#schema-apikeycreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 100 |
| `scopes` | array of [gspamjudge__features__apikeys__contracts__Scope](#schema-gspamjudge-features-apikeys-contracts-scope) |  | min items 1 |
| `rate_limit` | integer or null |  | Requests per minute; None = server default |
| `owner_type` | [OwnerType](#schema-ownertype) |  | project \| user \| org (POST /v1/keys) (default `"project"`) |
| `project_id` | string or null |  | Project public id (prj_…) for owner_type=project on POST /v1/keys |
| `expires_at` | string (date-time) or null |  | Expiry (UTC); default now + 90 days, max 1 year |
| `expires_in_days` | integer or null |  | Alternative to expires_at (panel form) |
| `never_expires` | boolean |  | Organization keys only, organization owner/admin only (default `false`) |
| `allowed_ips` | array of string |  | IPv4/IPv6 addresses or CIDR ranges; empty = any address (max items 50) |

### ApiKeyCreated {#schema-apikeycreated}

Response to creating or rotating a key: `key` is shown exactly once; only its hash is stored.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `owner_type` | [OwnerType](#schema-ownertype) |  | default `"project"` |
| `project_id` | string or null | tak |  |
| `owner_user_id` | string or null |  |  |
| `name` | string | tak |  |
| `prefix` | string | tak |  |
| `display` | string | tak |  |
| `scopes` | array of [gspamjudge__features__apikeys__contracts__Scope](#schema-gspamjudge-features-apikeys-contracts-scope) | tak |  |
| `rate_limit` | integer or null | tak |  |
| `allowed_ips` | array of string |  | default `[]` |
| `created_at` | string (date-time) | tak |  |
| `expires_at` | string (date-time) or null |  |  |
| `last_used_at` | string (date-time) or null |  |  |
| `last_used_ip` | string or null |  |  |
| `revoked_at` | string (date-time) or null |  |  |
| `revoke_reason` | string or null |  |  |
| `rotated_from` | string or null |  |  |
| `key` | string | tak |  |

### ApiKeyRead {#schema-apikeyread}

An API key without its secret. `prefix` identifies the key (`gsj_live_<prefix>_…`). `revoked_at` in the future = scheduled revocation (old key after rotation, grace period).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `owner_type` | [OwnerType](#schema-ownertype) |  | default `"project"` |
| `project_id` | string or null | tak |  |
| `owner_user_id` | string or null |  |  |
| `name` | string | tak |  |
| `prefix` | string | tak |  |
| `display` | string | tak |  |
| `scopes` | array of [gspamjudge__features__apikeys__contracts__Scope](#schema-gspamjudge-features-apikeys-contracts-scope) | tak |  |
| `rate_limit` | integer or null | tak |  |
| `allowed_ips` | array of string |  | default `[]` |
| `created_at` | string (date-time) | tak |  |
| `expires_at` | string (date-time) or null |  |  |
| `last_used_at` | string (date-time) or null |  |  |
| `last_used_ip` | string or null |  |  |
| `revoked_at` | string (date-time) or null |  |  |
| `revoke_reason` | string or null |  |  |
| `rotated_from` | string or null |  |  |

### ApiKeyRotate {#schema-apikeyrotate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `grace_hours` | integer or null |  | Old key keeps working this long; default 168 (7 days) |

### ArchiveResult {#schema-archiveresult}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `archived` | boolean | tak |  |
| `reports` | integer | tak |  |

### AuditAccepted {#schema-auditaccepted}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `audit_id` | string | tak | Audit id (`aud_…`); poll `GET /v1/audits/{audit_id}`. |
| `job_id` | string or null |  | Job id (`job_…`). |
| `pages` | integer | tak | Pages in the sample. |
| `patterns` | integer | tak | URL patterns in the sample. |
| `status` | [JobStatus](#schema-jobstatus) or `"draft"` |  | Job status: `queued`, `running`, `done` (some items may have failed, see `failed`), `failed`, `pausing`, `paused`, `cancelling` or `cancelled`. (default `"queued"`) |

### AuditBrief {#schema-auditbrief}

Short result saved when the audit finished, used in lists and history.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `level` | string | tak | Site spam level: `high`, `medium`, `low`, `unknown` (not enough checked pages) or `na` (this audit type was not checked). (one of `"high"`, `"medium"`, `"low"`, `"unknown"`, `"na"`) |
| `quality_level` | string | tak | Site quality level (same values). |
| `helpful_level` | string |  | Site helpful-content level. (default `"unknown"`) |
| `categories` | array of string or null |  | Checked audit types; null = all. |
| `hits` | integer | tak | Pages with a spam finding (medium or high). |
| `pages` | integer | tak | Checked pages. |
| `policies` | array of string | tak | Spam policies with findings. |
| `progress` | [AuditProgress](#schema-auditprogress) | tak | Final progress. |
| `site_ver` | integer |  | Version of the site level method (internal). (default `0`) |
| `max_signal` | integer or null |  | Strongest rule signal on any assessed page, 0-100, across the checked audit types (findings not confirmed by evidence are left out); a ranking, not a probability. Null when no rule was scored or the summary was saved before this field existed |
| `max_signal_level` | string |  | `high` (80+), `medium` (50-79), `low` (below 50); empty when `max_signal` is null (one of `"high"`, `"medium"`, `"low"`, `""`; default `""`) |

### AuditCompleteness {#schema-auditcompleteness}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `state` | string | tak | complete = every ordered part is ready; finishing = pages are assessed, some parts are still being computed or retried; incomplete = attempts exhausted, see `missing` (one of `"complete"`, `"finishing"`, `"incomplete"`) |
| `parts` | array of [AuditPart](#schema-auditpart) |  | default `[]` |
| `missing` | array of string |  | Parts without a result after all attempts (state=incomplete) (default `[]`) |

### AuditExport {#schema-auditexport}

`export.json` (also `audit.json` in the ZIP). Pages with findings come first (strongest first), then the rest.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `schema_version` | string |  | Version of this file format. (default `"1.27"`) |
| `generated_at` | string (date-time) | tak | When the file was built. |
| `audit` | [ExportAudit](#schema-exportaudit) | tak | Audit summary: counts, site levels per audit type, sample, failed pages. |
| `pages` | array of [ExportPage](#schema-exportpage) | tak | Every checked page with confirmed findings, quotes and fixes. |

### AuditIndexRequest {#schema-auditindexrequest}

`POST /v1/audits/{audit_id}/indexing`: check Google indexing of the pages of a finished audit.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `no_charge` | boolean |  | Operators only: run without charging the organisation's balance. Anyone else gets 403. (default `false`) |
| `overflow` | string |  | As in POST /v1/indexing (one of `"paid"`, `"wait"`; default `"paid"`) |

### AuditKind {#schema-auditkind}

Typ: string; one of `"batch"`, `"job"`, `"site"`

### AuditListItem {#schema-auditlistitem}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Audit id (`aud_…`) |
| `project_id` | string | tak | Project id (`prj_…`) |
| `kind` | [AuditKind](#schema-auditkind) | tak |  |
| `title` | string | tak | Site host or batch description |
| `job_id` | string or null |  | Job id (`job_…`); null = draft or batch without a job |
| `created_at` | string (date-time) | tak |  |
| `progress` | [AuditProgress](#schema-auditprogress) | tak | Progress counters. `errors` is always empty in this view: failed pages are listed by `GET /v1/audits/{id}` |
| `brief` | [AuditBrief](#schema-auditbrief) or null |  | Stored result summary (after the audit finished) |
| `report_lang` | string or null |  |  |
| `eta_seconds` | integer or null |  | Expected seconds left; only while queued or running |
| `archived_at` | string (date-time) or null |  |  |
| `app_version` | string or null |  |  |
| `judge_off` | boolean |  | default `false` |
| `topicality_off` | boolean |  | default `false` |
| `completeness` | [AuditCompleteness](#schema-auditcompleteness) or null |  | Parts computed after page assessment (Aniela's summary, fix plan, categories, topicality, Visibility). `status: done` only means the pages are assessed: the audit is ready when `status` is `done` and this field is null (no parts tracked, e.g. older audits) or `state` is `complete`. `finishing` = parts are still computed or retried in the background, keep polling (`Retry-After`); `incomplete` = finished without the parts listed in `missing` |
| `site` | string or null |  | Site host from the sample plan (site audits only) |
| `source` | string or null |  | Where the page list came from: sitemap \| upload (site audits only) |
| `pages` | integer or null |  | Pages in the sample plan (site audits only); the list is in `plan.pages` of `GET /v1/audits/{id}` |
| `report_count` | integer |  | Stored page reports so far; ids in `report_ids` of `GET /v1/audits/{id}` or `GET /v1/reports?audit_id=` (default `0`) |
| `status` | [JobStatus](#schema-jobstatus) or `"draft"` | tak | Machine-readable status (same as `progress.status`, the job status enum) (read-only) |

### AuditPart {#schema-auditpart}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | site_steps = site-level steps after page assessment are still running (other parts appear as they start); decision = Aniela's summary and role notes; fix_plan = site fix plan; categories, topicality, visibility = ordered add-ons (one of `"site_steps"`, `"decision"`, `"fix_plan"`, `"categories"`, `"topicality"`, `"visibility"`) |
| `state` | string | tak | done; running = being computed; retry = failed for a temporary reason, retried automatically in the background; failed = no result after all attempts (one of `"done"`, `"running"`, `"retry"`, `"failed"`) |
| `attempts` | integer |  | default `0` |
| `next_retry_at` | string (date-time) or null |  | Next automatic attempt (state=retry) |
| `background` | boolean |  | true = a ready part is being refreshed in the background (e.g. Aniela's summary after Check my fixes); the previous result stays visible and the part does not change the audit `state` or `missing` (default `false`) |

### AuditProgress {#schema-auditprogress}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | [JobStatus](#schema-jobstatus) or `"draft"` | tak | Job status: `queued`, `running`, `done` (some items may have failed, see `failed`), `failed`, `pausing`, `paused`, `cancelling` or `cancelled`. `done` means the pages are assessed; parts computed after them (summary, fix plan, add-ons) may still be running. The audit is ready when `status` is `done` and `completeness` is null or has `state` `complete` (`incomplete` = finished without the parts in `completeness.missing`). |
| `total` | integer | tak | Pages in the audit. |
| `done` | integer | tak | Pages finished (with or without error). |
| `failed` | integer | tak | Pages without a report (not charged). |
| `errors` | array of object |  | Failed items with the reason (`error`, `fetch_error`). (default `[]`) |
| `incomplete` | integer |  | Pages with a report but with some checks missing. (default `0`) |
| `rule_errors` | integer |  | Checks that could not be scored. (default `0`) |
| `failed_engine` | integer |  | Part of `failed` caused by our service, not the site. (default `0`) |
| `missing` | integer |  | default `0` |
| `offsite_redirects` | [OffsiteRedirects](#schema-offsiteredirects) or null |  | sample addresses that redirect to other domains. They have no content of this site, so they are not assessed and not counted in total/done/failed. Informational warning, not a spam signal; null = none |
| `fix_plan` | string or null |  | Site fix plan ordered with the audit: `generating`, `ready`, `failed`; null = not ordered. |
| `partial` | [JobPartial](#schema-jobpartial) or null |  | Partial result: the job stopped early after checking `checked` of `total` pages (`reason`: timeout = time limit, stall = no progress); pages not checked are not charged. Null otherwise |

### AuditRead {#schema-auditread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Audit id (`aud_…`). |
| `project_id` | string | tak | Project id (`prj_…`). |
| `kind` | [AuditKind](#schema-auditkind) | tak | `site` (site audit), `job` (`POST /v1/jobs`) or `batch` (`POST /v1/judge/batch`). |
| `title` | string | tak | Site host or a short description of the batch. |
| `job_id` | string or null |  | Job id (`job_…`); null for a batch. |
| `created_at` | string (date-time) | tak | When the audit was ordered. |
| `progress` | [AuditProgress](#schema-auditprogress) | tak | Pages done, failed and incomplete. |
| `report_ids` | array of string | tak | Page report ids (`rep_…`). |
| `plan` | [SamplePlan](#schema-sampleplan) or null |  | Site audit sample: sitemaps, patterns, strategy, selected pages. |
| `brief` | [AuditBrief](#schema-auditbrief) or null |  | Short result saved when the audit finished (levels per audit type, pages with findings). |
| `summary` | [AuditSummary](#schema-auditsummary) or null |  | Site report: level per audit type, risk per policy and URL pattern, worst pages, actions. Only in `GET /v1/audits/{audit_id}`. |
| `report_lang` | string or null |  | Report language (`en` \| `pl`). |
| `eta_seconds` | integer or null |  | Estimated seconds to finish; only while running. |
| `notify_email` | boolean |  | The person who ordered it gets an e-mail at the end. (default `false`) |
| `archived_at` | string (date-time) or null |  | When it was archived; null = active. |
| `app_version` | string or null |  | Service version that created the audit. |
| `judge_off` | boolean |  | default `false` |
| `topicality_off` | boolean |  | default `false` |
| `topicality` | [SiteTopicality](#schema-sitetopicality) or null |  | How focused the site is on its topics (descriptive, not a risk); null = not measured. |
| `domain_history` | [DomainHistory](#schema-domainhistory) or null |  | Archived snapshots of the domain by year (descriptive); null = not checked. |
| `ai_ready` | [SiteAiReady](#schema-siteaiready) or null |  | AI Ready of the site: per condition the number of pages in each state and example pages to fix, plus `presence` (keywords with an AI Overview from the Visibility add-on data). Null before the audit ends. |
| `visibility` | [SiteVisibility](#schema-sitevisibility) or null |  |  |
| `visibility_markets` | array of [SiteVisibility](#schema-sitevisibility) |  | More markets of the Visibility add-on, in the order of the request; the first (main) market is in `visibility`. Empty = one market (default `[]`) |
| `sitewide_links` | [SitewideLinks](#schema-sitewidelinks) or null |  |  |
| `link_graph` | [LinkGraph](#schema-linkgraph) or null |  |  |
| `page_languages` | [SiteLanguages](#schema-sitelanguages) or null |  |  |
| `content_categories` | [SiteCategories](#schema-sitecategories) or null |  | Content categories of the site and of all its content pages (descriptive); null = not measured. |
| `completeness` | [AuditCompleteness](#schema-auditcompleteness) or null |  | Parts computed after page assessment (Aniela's summary, fix plan, categories, topicality, Visibility). `status: done` only means the pages are assessed: the audit is ready when `status` is `done` and this field is null (no parts tracked, e.g. older audits) or `state` is `complete`. `finishing` = parts are still computed or retried in the background, keep polling (`Retry-After`); `incomplete` = finished without the parts listed in `missing` |
| `page_revisions` | object (map of [PageRevisionMark](#schema-pagerevisionmark)) |  | Pages re-checked after fixes, keyed by the page's current report id (rep_…): `index` (page index for `/v1/audits/{id}/pages/{index}/revisions`), `rev` (current revision, 0 = original result), `at`, `previous_report_id`, `live` (a check is queued or running). Empty = no page was re-checked |
| `status` | [JobStatus](#schema-jobstatus) or `"draft"` | tak | Job status (same as `progress.status`): `queued`, `running`, `done` (some items may have failed, see `failed`), `failed`, `pausing`, `paused`, `cancelling` or `cancelled`. `done` means the pages are assessed; parts computed after them (summary, fix plan, add-ons) may still be running. The audit is ready when `status` is `done` and `completeness` is null or has `state` `complete` (`incomplete` = finished without the parts in `completeness.missing`). (read-only) |

### AuditSummary {#schema-auditsummary}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pages` | integer | tak |  |
| `counts` | object (map of integer) | tak |  |
| `level` | string | tak |  |
| `quality_level` | string | tak |  |
| `helpful_level` | string |  | default `"unknown"` |
| `site` | object (map of [SiteShare](#schema-siteshare)) |  | default `{}` |
| `note` | string | tak |  |
| `policies` | array of [PolicyRisk](#schema-policyrisk) | tak |  |
| `patterns` | array of [PatternRisk](#schema-patternrisk) | tak |  |
| `worst` | array of [PageRisk](#schema-pagerisk) | tak |  |
| `pages_list` | array of [PageRisk](#schema-pagerisk) | tak |  |
| `findings` | array of [PageFindings](#schema-pagefindings) |  | default `[]` |
| `clean` | array of [PageRisk](#schema-pagerisk) |  | default `[]` |
| `review_pages` | array of [PageFindings](#schema-pagefindings) |  | default `[]` |
| `review` | integer |  | default `0` |
| `scales` | array of [ScaleAggregate](#schema-scaleaggregate) |  | default `[]` |
| `pq_patterns` | array of [PatternScale](#schema-patternscale) |  | default `[]` |
| `pq_low_pages` | array of [ScalePage](#schema-scalepage) |  | default `[]` |
| `actions` | array of [ActionItem](#schema-actionitem) |  | default `[]` |
| `signposts` | array of [PageRisk](#schema-pagerisk) |  | default `[]` |
| `list_review` | array of [PageFindings](#schema-pagefindings) |  | default `[]` |
| `error_pages` | array of [FailedPage](#schema-failedpage) |  | default `[]` |
| `pages_partial` | integer |  | default `0` |
| `pages_error_screen` | integer |  | default `0` |
| `unassessed` | object (map of integer) |  | default `{}` |
| `site_positives` | array of [SiteSignal](#schema-sitesignal) |  | default `[]` |
| `site_clean` | array of [SiteSignal](#schema-sitesignal) |  | default `[]` |
| `structured_data` | [StructuredDataView](#schema-structureddataview) or null |  |  |
| `sponsored` | [SponsoredView](#schema-sponsoredview) or null |  |  |

### AuditTypePrice {#schema-audittypeprice}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Audit type: `spam`, `quality` or `helpful` (value of `modes`). (one of `"spam"`, `"quality"`, `"helpful"`) |
| `name` | string | tak | Name. |
| `name_pl` | string |  | Name in Polish. (default `""`) |
| `summary` | string |  | What it checks. (default `""`) |
| `summary_pl` | string |  | What it checks, in Polish. (default `""`) |
| `price_usd` | number | tak | Price per page for this audit type alone, full rule check (`tier: basic`, USD) |

### AuditUpgradeEstimate {#schema-auditupgradeestimate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `audit_id` | string | tak | Audit id. |
| `pages` | integer | tak | Pages that would be upgraded. |
| `unavailable` | integer |  | Pages that cannot be upgraded. (default `0`) |
| `seconds` | integer | tak | Estimated time. |
| `items` | array of [UpgradeEstimate](#schema-upgradeestimate) |  | Per-page estimates. (default `[]`) |
| `cost_usd` | number | tak | Total price in USD. (read-only) |

### AuditUpgradeRequest {#schema-auditupgraderequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `tier` | string or null |  | Target scope for all categories: `lite`, `basic` or `premium`. |
| `categories` | array of string or null |  | Audit types to add: `spam`, `quality`, `helpful`. |
| `query` | string or null |  | Target phrase to add search intent checks. |
| `page_ids` | array of string or null |  | Page report ids (`rep_…`) to upgrade; empty = all pages. |
| `flagged` | boolean |  | Only pages with a spam or quality finding at medium or above. (default `false`) |

### AuditWithCopyright {#schema-auditwithcopyright}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Audit id (`aud_…`). |
| `project_id` | string | tak | Project id (`prj_…`). |
| `kind` | [AuditKind](#schema-auditkind) | tak | `site` (site audit), `job` (`POST /v1/jobs`) or `batch` (`POST /v1/judge/batch`). |
| `title` | string | tak | Site host or a short description of the batch. |
| `job_id` | string or null |  | Job id (`job_…`); null for a batch. |
| `created_at` | string (date-time) | tak | When the audit was ordered. |
| `progress` | [AuditProgress](#schema-auditprogress) | tak | Pages done, failed and incomplete. |
| `report_ids` | array of string | tak | Page report ids (`rep_…`). |
| `plan` | [SamplePlan](#schema-sampleplan) or null |  | Site audit sample: sitemaps, patterns, strategy, selected pages. |
| `brief` | [AuditBrief](#schema-auditbrief) or null |  | Short result saved when the audit finished (levels per audit type, pages with findings). |
| `summary` | [AuditSummary](#schema-auditsummary) or null |  | Site report: level per audit type, risk per policy and URL pattern, worst pages, actions. Only in `GET /v1/audits/{audit_id}`. |
| `report_lang` | string or null |  | Report language (`en` \| `pl`). |
| `eta_seconds` | integer or null |  | Estimated seconds to finish; only while running. |
| `notify_email` | boolean |  | The person who ordered it gets an e-mail at the end. (default `false`) |
| `archived_at` | string (date-time) or null |  | When it was archived; null = active. |
| `app_version` | string or null |  | Service version that created the audit. |
| `judge_off` | boolean |  | default `false` |
| `topicality_off` | boolean |  | default `false` |
| `topicality` | [SiteTopicality](#schema-sitetopicality) or null |  | How focused the site is on its topics (descriptive, not a risk); null = not measured. |
| `domain_history` | [DomainHistory](#schema-domainhistory) or null |  | Archived snapshots of the domain by year (descriptive); null = not checked. |
| `ai_ready` | [SiteAiReady](#schema-siteaiready) or null |  | AI Ready of the site: per condition the number of pages in each state and example pages to fix, plus `presence` (keywords with an AI Overview from the Visibility add-on data). Null before the audit ends. |
| `visibility` | [SiteVisibility](#schema-sitevisibility) or null |  |  |
| `visibility_markets` | array of [SiteVisibility](#schema-sitevisibility) |  | More markets of the Visibility add-on, in the order of the request; the first (main) market is in `visibility`. Empty = one market (default `[]`) |
| `sitewide_links` | [SitewideLinks](#schema-sitewidelinks) or null |  |  |
| `link_graph` | [LinkGraph](#schema-linkgraph) or null |  |  |
| `page_languages` | [SiteLanguages](#schema-sitelanguages) or null |  |  |
| `content_categories` | [SiteCategories](#schema-sitecategories) or null |  | Content categories of the site and of all its content pages (descriptive); null = not measured. |
| `completeness` | [AuditCompleteness](#schema-auditcompleteness) or null |  | Parts computed after page assessment (Aniela's summary, fix plan, categories, topicality, Visibility). `status: done` only means the pages are assessed: the audit is ready when `status` is `done` and this field is null (no parts tracked, e.g. older audits) or `state` is `complete`. `finishing` = parts are still computed or retried in the background, keep polling (`Retry-After`); `incomplete` = finished without the parts listed in `missing` |
| `page_revisions` | object (map of [PageRevisionMark](#schema-pagerevisionmark)) |  | Pages re-checked after fixes, keyed by the page's current report id (rep_…): `index` (page index for `/v1/audits/{id}/pages/{index}/revisions`), `rev` (current revision, 0 = original result), `at`, `previous_report_id`, `live` (a check is queued or running). Empty = no page was re-checked |
| `web_vitals` | [WebVitals](#schema-webvitals) or null |  | Core Web Vitals of real Chrome users from the Chrome UX Report (last 28 days): p75 and good / needs improvement / poor shares for LCP, INP, CLS, FCP and TTFB on phone and desktop, rated by Google thresholds, plus fix steps for weak metrics. Page report: the URL record, or the origin when the URL has too little traffic (`origin_fallback`). Site audit: the origin with a trend from the CrUX History API. null = not applicable. |
| `copyright_removals` | [CopyrightRemovals](#schema-copyrightremovals) or null |  | Copyright removal requests to Google Search for the domain, from the Google Transparency Report: number of requests, URLs removed / not in the index / no action / pending, first and last request date, dataset date (`snapshot`) and a link to the domain page in the report. Match: exact host without www, else the registrable domain (`match`). status `none` = no requests in the Google dataset; `unavailable` = dataset not loaded. Facts only, no score. null = no public domain (pasted text) or not a site audit. |
| `status` | [JobStatus](#schema-jobstatus) or `"draft"` | tak | Job status (same as `progress.status`): `queued`, `running`, `done` (some items may have failed, see `failed`), `failed`, `pausing`, `paused`, `cancelling` or `cancelled`. `done` means the pages are assessed; parts computed after them (summary, fix plan, add-ons) may still be running. The audit is ready when `status` is `done` and `completeness` is null or has `state` `complete` (`incomplete` = finished without the parts in `completeness.missing`). (read-only) |

### BackupCodes {#schema-backupcodes}

Shown once; only their hashes are stored.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `codes` | array of string | tak |  |

### Balance {#schema-balance}

Pay-as-you-go balance of the organization in USD (`balance_usd`); `expires_at` = nearest expiry.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `expires_at` | string (date-time) or null |  | When the nearest part of the balance expires. |
| `balance_usd` | number | tak | Balance (USD). (read-only) |
| `overdraft_usd` | number | tak | Allowed negative balance in USD (positive number, e.g. 5.0 = the balance may go down to -5.00). (read-only) |

### BalanceEntry {#schema-balanceentry}

One balance history item. `amount_usd` is signed: positive = money in, negative = charges or corrections. `usage` sums the charges of one UTC day after refunds.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `at` | string (date-time) | tak |  |
| `day` | string | tak |  |
| `type` | string | tak | one of `"usage"`, `"topup"`, `"package"`, `"credit"`, `"adjustment"` |
| `amount_usd` | number | tak |  |
| `expires_at` | string (date-time) or null |  |  |

### BatchItemResult {#schema-batchitemresult}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `index` | integer | tak | Position of the page in `items` (0-based). |
| `report` | [JudgeReport](#schema-judgereport) or null |  | Report for this page; null when the page failed. |
| `error` | string or null |  | Why the page has no report. Fetch problems carry a short message about your page (see `fetch_error`); analysis problems are a code: `inference_timeout` or `page_failed`. Failed pages are not charged. |
| `fetch_error` | [FetchFailure](#schema-fetchfailure) or null |  | Set when the page could not be fetched (kind, HTTP status). |

### BatchRequest {#schema-batchrequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `modes` | array of [Category-Input](#schema-category-input) or null |  | Audit modes: spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing. |
| `items` | array of [IngestInput](#schema-ingestinput) | tak | Pages to check (each with `url`, `html` or `text`). At most the batch limit; larger lists: `POST /v1/jobs`. |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |

### BatchResponse {#schema-batchresponse}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `results` | array of [BatchItemResult](#schema-batchitemresult) | tak | One entry per item, in request order. |

### Body_auth_cookie_login_v1_auth_cookie_login_post {#schema-body-auth-cookie-login-v1-auth-cookie-login-post}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `next` | string |  | default `"/"` |
| `grant_type` | string or null |  |  |
| `username` | string | tak |  |
| `password` | string (password) | tak |  |
| `scope` | string |  | default `""` |
| `client_id` | string or null |  |  |
| `client_secret` | string or null |  |  |

### Body_auth_jwt_login_v1_auth_jwt_login_post {#schema-body-auth-jwt-login-v1-auth-jwt-login-post}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `grant_type` | string or null |  |  |
| `username` | string | tak |  |
| `password` | string (password) | tak |  |
| `scope` | string |  | default `""` |
| `client_id` | string or null |  |  |
| `client_secret` | string or null |  |  |

### Body_create_intent_batch_csv_v1_intent_batch_csv_post {#schema-body-create-intent-batch-csv-v1-intent-batch-csv-post}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `file` | string | tak | CSV: query[,market[,device]] |
| `market` | string |  | default `"en-US"` |
| `tier` | string |  | default `"basic"` |
| `freshness` | string |  | one of `"auto"`, `"fresh"`; default `"auto"` |
| `max_age_days` | integer or null |  |  |
| `project_id` | string or null |  |  |
| `report_lang` | string or null |  | Report language: en \| pl |

### Body_reset_forgot_password_v1_auth_forgot_password_post {#schema-body-reset-forgot-password-v1-auth-forgot-password-post}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |

### Body_reset_reset_password_v1_auth_reset_password_post {#schema-body-reset-reset-password-v1-auth-reset-password-post}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `token` | string | tak |  |
| `password` | string | tak |  |

### BrokenLink {#schema-brokenlink}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `src` | string | tak |  |
| `dst` | string | tak |  |
| `anchor` | string |  | default `""` |
| `status` | string |  | one of `"ok"`, `"missing"`, `"error"`, `"unchecked"`; default `"missing"` |
| `http_status` | integer or null |  |  |

### CategoriesExtra {#schema-categoriesextra}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string | tak | one of `"pending"`, `"running"`, `"done"`, `"error"` |
| `run_id` | string or null |  | Labeler run id (`lbl_…`), same result as GET /v1/labels/batch/{id} |
| `top` | array of [TopCategory](#schema-topcategory) |  | Main and top paths per taxonomy, strongest first |
| `labels` | object |  | Taxonomy -> categories (same shape as /v1/labels) |
| `charged_usd` | number or null |  |  |
| `error` | string or null |  |  |

### Category-Input {#schema-category-input}

Audit type: `spam`, `quality` or `helpful`. Each has its own risk level.

Typ: string; one of `"spam"`, `"quality"`, `"helpful"`

### Category-Output {#schema-category-output}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Category id in the taxonomy (IAB: unique id, Google: full path) |
| `name` | string | tak |  |
| `strength` | integer | tak | Classifier strength 0-100 (ranking, not a probability) (min 0.0; max 100.0) |

### CategoryLevel {#schema-categorylevel}

One level of the main category path with its conditional strength 0-100; id and name from the taxonomy.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `level` | integer | tak | Level in the taxonomy, 1 = top level (min 1.0) |
| `id` | string | tak | Category id in the taxonomy (IAB: unique id, Google: full path) |
| `name` | string | tak |  |
| `strength` | integer | tak | Conditional strength 0-100 of this level given its parent (ranking, not a probability). Not multiplied along the path (min 0.0; max 100.0) |

### CategoryNode {#schema-categorynode}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `name` | string | tak |  |

### CheckoutKind {#schema-checkoutkind}

Typ: string; one of `"topup"`, `"package"`

### CheckoutRead {#schema-checkoutread}

Top-up payment: `credits_usd` added to the balance, `paid_usd` paid with the service fee, state, payment `mode`; `warning` is set for sandbox test payments, which do not top up the balance.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `session_id` | string | tak |  |
| `kind` | [CheckoutKind](#schema-checkoutkind) | tak |  |
| `plan` | string or null |  |  |
| `state` | [CheckoutState](#schema-checkoutstate) | tak |  |
| `created_at` | string (date-time) | tak |  |
| `fulfilled_at` | string (date-time) or null |  |  |
| `mode` | string or null |  |  |
| `credits_usd` | number | tak | read-only |
| `paid_usd` | number | tak | read-only |
| `warning` | string or null | tak | Set for sandbox test payments, which do not top up the balance. (read-only) |

### CheckoutState {#schema-checkoutstate}

Typ: string; one of `"open"`, `"rejected"`, `"credited"`, `"failed"`, `"expired"`, `"sandbox"`

### ChoiceBar {#schema-choicebar}

One segment of the distribution bar of a multiple-choice rule.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `letter` | string | tak |  |
| `label` | string | tak |  |
| `pct` | integer | tak |  |
| `prob_text` | string | tak |  |
| `modal` | boolean |  | default `false` |
| `concern` | boolean |  | default `false` |

### ClaimCheck {#schema-claimcheck}

One factual claim taken from the page, with its status and the source behind it.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `claim` | string | tak | One atomic, self-contained statement taken from the page |
| `page_quote` | string | tak | Verbatim fragment of the page that contains the claim |
| `page_verified` | boolean | tak | The fragment was found in the page text (claims not on the page are dropped) |
| `status` | [FactStatus](#schema-factstatus) | tak | confirmed \| contradicted \| not_found \| unchecked |
| `sources` | array of [FactSource](#schema-factsource) |  | Source with the quote behind the status. For not_found it can hold a related source about the same subject that does not settle the claim (for example a less precise date); empty for unchecked (default `[]`) |

### ClientPage {#schema-clientpage}

A top page you provide: its URL plus `html` or `text` (exactly one).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak | Page address (http or https); its position comes from the search results when the address is there (max length 2048) |
| `html` | string or null |  | Page HTML, up to 2,000,000 characters |
| `text` | string or null |  | Main text of the page, up to 100,000 characters (Markdown headings and lists are read) |

### ClientSerp {#schema-clientserp}

Your own search results (usually the top 10 organic results). No duplicate positions or URLs.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `results` | array of [ClientSerpResult](#schema-clientserpresult) | tak | Organic results, 3 to 20 (usually the top 10) (min items 3; max items 20) |
| `people_also_ask` | array of string |  | Questions from the People also ask box, up to 20 (max items 20) |
| `related_searches` | array of string |  | Related searches, up to 20 (max items 20) |
| `ai_overview` | string |  | Text of the AI Overview, if the page had one (default `""`; max length 4000) |
| `item_types` | array of string |  | SERP features on the page, e.g. organic, people_also_ask, video, images (max items 30) |
| `checked_at` | string (date) or null |  | When you collected these results (shown in the report as your date); empty = no date |

### ClientSerpResult {#schema-clientserpresult}

One organic result from your own search results.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `position` | integer | tak | Position in the results (1 = top) (min 1.0; max 100.0) |
| `url` | string | tak | 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 (max length 2048) |
| `title` | string |  | default `""`; max length 300 |
| `description` | string |  | Snippet shown under the title (default `""`; max length 1000) |
| `type` | string |  | Result type, e.g. organic or featured_snippet (default `"organic"`; pattern `^[a-z][a-z0-9_]{0,39}$`) |

### ClonePair {#schema-clonepair}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `a` | [PageRadius](#schema-pageradius) | tak |  |
| `b` | [PageRadius](#schema-pageradius) | tak |  |
| `cos` | number | tak |  |

### CloserLook {#schema-closerlook}

Premium: the top result pages (downloaded), their length, elements and what searchers expect.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pages` | array of [PageFacts](#schema-pagefacts) |  | default `[]` |
| `fetched` | integer |  | default `0` |
| `length_words` | object (map of integer or null) or null |  |  |
| `elements` | array of [ElementStat](#schema-elementstat) |  | default `[]` |
| `expectations` | array of [Expectation](#schema-expectation) |  | default `[]` |
| `expectations_assessed` | boolean |  | default `true` |
| `prompt_ver` | string |  | default `""` |
| `unreadable` | [UnreadableSummary](#schema-unreadablesummary) or null |  | 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 |

### ClusterMatrix {#schema-clustermatrix}

Number of links between topic clusters (row = from, column = to), sampled pages only.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `labels` | array of string |  | default `[]` |
| `cells` | array of array of integer |  | default `[]` |
| `within` | integer |  | default `0` |
| `across` | integer |  | default `0` |

### CompareRow {#schema-comparerow}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak |  |
| `yours` | number or integer or null |  |  |
| `top_share` | number or null |  |  |
| `gap` | boolean |  | default `false` |

### Comparison {#schema-comparison}

Compare: your page against the top pages (same features) with suggestions what to add.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `page` | [PageFacts](#schema-pagefacts) | tak |  |
| `length_band` | string |  | one of `"below"`, `"within"`, `"above"`, `"unknown"`; default `"unknown"` |
| `rows` | array of [CompareRow](#schema-comparerow) |  | default `[]` |
| `unmet` | array of string |  | default `[]` |
| `suggestions` | array of [Suggestion](#schema-suggestion) |  | default `[]` |

### ConnectionState {#schema-connectionstate}

`ok`: access works. `reauth_required`: Google no longer accepts the connection; connect the account again.

Typ: string; one of `"ok"`, `"reauth_required"`

### ContextEstimate {#schema-contextestimate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `checks` | integer | tak |  |
| `price_per_check_usd` | object (map of number) | tak | low / typical / high per check (USD), the amount charged (0.0001 USD step) |
| `estimated_usd` | object (map of number) | tak | low / typical / high for all checks (USD), each call rounded up to $0.0001 |
| `hold_usd_per_check` | number | tak | Held per call (maximum), unused part returned |

### ContextEstimateRequest {#schema-contextestimaterequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `checks` | integer |  | default `1`; min 1.0; max 1000000.0 |
| `variant` | string |  | one of `"document"`, `"url"`; default `"url"` |
| `categories` | array of string |  | max items 2 |
| `fix` | boolean |  | default `false` |
| `render_js` | boolean |  | default `false` |

### ContextExtra {#schema-contextextra}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string | tak | one of `"pending"`, `"running"`, `"done"`, `"error"` |
| `check_id` | string or null |  | Context check id (`ctx_…`) |
| `coherence` | integer or null |  | How well the headings follow the content, 0-100 |
| `dims` | integer or null |  | Vector dimensions |
| `space` | string or null |  | Stable id of the embedding space (`emb_…`) |
| `vector` | array of number or null |  | Page core content vector (only in the API and JSON download) |
| `charged_usd` | number or null |  |  |
| `error` | string or null |  |  |

### ContextRequest {#schema-contextrequest}

One page: `url` (we fetch it) or `text` (Markdown: `# H1`, `## H2`, `### H3`) with optional `title` and `meta`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null |  |  |
| `text` | string or null |  | Page content as markdown (headings with #, ##, ###). Use with `title` and `meta` when you have them |
| `title` | string or null |  | Text input only: the page &lt;title> |
| `meta` | string or null |  | Text input only: the meta description (empty string = the page has none; omitted = unknown) |
| `categories` | array of string |  | Taxonomies for page categories (`iab`, `google`); [] = no categories (max items 2) |
| `include_vector` | boolean |  | Return the page embedding (core content vector) (default `false`) |
| `site` | string or null |  | Domain to measure fit against; needs a site audit of that domain in your organisation (after this feature shipped) |
| `fix` | boolean |  | Ask Ani how to fix weak elements (paid separately, only when there is something to fix and a suggestion passed checks) (default `false`) |
| `lang` | string |  | Language of fix suggestions (one of `"en"`, `"pl"`; default `"en"`) |
| `render_js` | boolean |  | URL only: render JavaScript (+render price) (default `false`) |
| `project_id` | string or null |  |  |

### ContextResult {#schema-contextresult}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Check id (`ctx_…`); the stored page vector is keyed by it |
| `url` | string or null |  |  |
| `status` | string |  | one of `"ok"`, `"partial"`, `"error"`; default `"ok"` |
| `error` | string or null |  |  |
| `coherence` | integer or null |  | How well the headings follow the content, 0-100 |
| `elements` | array of [ElementScore](#schema-elementscore) |  |  |
| `pairs` | object (map of integer) |  | Strength 0-100 per pair: title_h1, h1_meta, meta_core, title_core |
| `facts` | array of string |  | Structural facts, e.g. no_h1, meta_long |
| `categories` | object |  | Taxonomy -> categories (same shape as /v1/labels) |
| `site_fit` | [SiteFit](#schema-sitefit) or null |  |  |
| `site_fit_reason` | string or null |  | Why `site_fit` is null: no_site, no_site_audit, too_few_pages, other_profile |
| `fixes` | array of [FixSuggestion](#schema-fixsuggestion) or null |  | Only with `fix: true` |
| `fix_status` | string or null |  | ok \| nothing_to_fix \| failed (failed costs nothing) |
| `vector` | [PageVector](#schema-pagevector) or null |  |  |
| `charged_usd` | number or null |  | Amount taken from the balance (USD, rounded up to $0.0001) |
| `price_breakdown_usd` | object (map of number) |  |  |

### CopyrightRemovals {#schema-copyrightremovals}

Copyright removal requests to Google Search for the domain (Google Transparency Report), facts only. `status`: `found`, `none` (no requests) or `unavailable`. The host is matched without `www.`, then the registrable domain (`match`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string | tak | one of `"found"`, `"none"`, `"unavailable"` |
| `domain` | string | tak |  |
| `matched` | string or null |  |  |
| `match` | string or null |  |  |
| `requests` | integer |  | default `0` |
| `urls_removed` | integer |  | default `0` |
| `urls_not_indexed` | integer |  | default `0` |
| `urls_no_action` | integer |  | default `0` |
| `urls_pending` | integer |  | default `0` |
| `first_date` | string (date) or null |  |  |
| `last_date` | string (date) or null |  |  |
| `snapshot` | string (date) or null |  |  |
| `source` | string |  | default `"Google Transparency Report"` |
| `source_url` | string |  | default `""` |
| `fix` | array of string |  | default `[]` |

### CreditStatus {#schema-creditstatus}

Postpaid credit of the organization (invoice at the end of the month). `used_usd` = exposure: unpaid usage
plus open reservations; new work is refused when it would exceed `limit_usd`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string |  | one of `"active"`, `"overdue"`, `"manual"`; default `"active"` |
| `terms_days` | integer |  | default `14` |
| `alert_ratio` | number |  | default `0.8` |
| `limit_usd` | number | tak | Credit limit in USD. (read-only) |
| `used_usd` | number | tak | Exposure in USD: unpaid usage plus open reservations. (read-only) |
| `remaining_usd` | number | tak | Credit left in USD. (read-only) |
| `held_usd` | number | tak | Open reservations (work in progress) in USD. (read-only) |
| `unbilled_usd` | number | tak | Settled usage not invoiced yet, in USD. (read-only) |
| `outstanding_usd` | number | tak | Issued and unpaid invoices, in USD. (read-only) |

### DecideAnswer {#schema-decideanswer}

The model's answer to one question; only the fields of its `mode` are present. Model scores, not calibrated probabilities.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `mode` | string | tak | one of `"yes_no"`, `"choice"`, `"score"` |
| `yes` | number or null |  | yes_no: probability of yes (0-1) |
| `pick` | string or null |  | choice: the most likely option; score: the most likely level |
| `probs` | object (map of number) or null |  | choice: probability per option (sum 1) |
| `score` | number or null |  | score: expected level, 1 = lowest level, N = highest (default scale 1-10) |
| `dist` | array of number or null |  | score: probability per level, lowest first (sum 1) |
| `levels` | array of string or null |  | score: level names, lowest first |

### DecideQuestion {#schema-decidequestion}

One question: `mode` (`yes_no`, `choice`, `score`), `question`, `options` (choice) or `levels` (score).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `mode` | string | tak | yes_no = probability of yes; choice = one of `options` with probabilities; score = expected level on a scale with the distribution (one of `"yes_no"`, `"choice"`, `"score"`) |
| `question` | string | tak | Your question about the text (min length 1; max length 1000) |
| `options` | array of string or null |  | choice only: 2-20 distinct answer labels |
| `levels` | array of string or null |  | score only: 2-10 distinct level names from lowest to highest; default = the 1-10 scale |

### DecideRequest {#schema-deciderequest}

`POST /v1/labels/decide`: a text and either one question (`question` + `mode`) or several (`questions`), sent to the decision model as is.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak | Plain text or Markdown, as is (up to 50,000 characters). No fetching, no HTML extraction (min length 1; max length 50000) |
| `mode` | string or null |  | Single question: the mode (use with `question`) |
| `question` | string or null |  | Single question: your question |
| `options` | array of string or null |  | Single question, mode choice: 2-20 distinct options |
| `levels` | array of string or null |  | Single question, mode score: 2-10 levels, lowest first |
| `questions` | object (map of [DecideQuestion](#schema-decidequestion)) or null |  | Several questions about the same text, keyed by your own names (1-20); answers come back under the same keys |
| `ref` | string or null |  | Your own id for this text, echoed back |

### DecideResult {#schema-decideresult}

Answers per question key (`answer` for a single question) and how much of the text the model read.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `answers` | object (map of [DecideAnswer](#schema-decideanswer)) |  | Answer per question key (`answer` for a single question) |
| `document_tokens_read` | integer or null |  | Tokens of your text the model read; the model reads at most the first 7,500 tokens |
| `truncated` | boolean |  | True when the text was longer than the model reads and only its beginning was used (default `false`) |
| `input_tokens` | integer or null |  | Tokens the model read in total: the text once plus every question and its options |
| `ref` | string or null |  |  |

### DeleteResult {#schema-deleteresult}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `deleted_reports` | integer | tak |  |

### DeliveryRead {#schema-deliveryread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `endpoint_id` | string | tak |  |
| `event` | string | tak |  |
| `delivery` | string | tak | X-GSPAMJUDGE-Delivery header value (receivers deduplicate on it) |
| `status_code` | integer | tak | Receiver HTTP status; 0 = no connection or address rejected |
| `ok` | boolean | tak |  |
| `attempts` | integer | tak |  |
| `at` | string (date-time) | tak |  |
| `redelivery_of` | string or null |  |  |

### Demand {#schema-demand}

Search demand for the phrase: average monthly searches, cost per click, ad competition, ranking difficulty and seasonality. Fields are null when the data source has no value for them.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `volume` | integer or null |  |  |
| `cpc` | number or null |  |  |
| `competition` | number or null |  |  |
| `difficulty` | integer or null |  |  |
| `months` | integer |  | default `0` |
| `peak_month` | integer or null |  |  |
| `low_month` | integer or null |  |  |
| `seasonality_index` | number or null |  |  |
| `yoy_change` | number or null |  |  |

### DeviceVitals {#schema-devicevitals}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `form_factor` | string | tak | one of `"phone"`, `"desktop"` |
| `status` | string | tak | no_data = CrUX has no record for this device (HTTP 404) (one of `"ok"`, `"no_data"`) |
| `level` | string or null |  | Which CrUX record was used: the page URL or the whole origin (fallback when the URL has too little traffic) |
| `period_start` | string (date) or null |  |  |
| `period_end` | string (date) or null |  |  |
| `metrics` | array of [MetricValue](#schema-metricvalue) |  | default `[]` |
| `passed` | boolean or null |  | Core Web Vitals assessment: LCP, INP and CLS all 'good' at p75; null when one of them has no data |
| `trend` | array of [TrendPoint](#schema-trendpoint) |  | Site only: p75 per 28-day period from the CrUX History API, oldest first (default `[]`) |

### DfsCheck {#schema-dfscheck}

Key check result of the deprecated single-provider route.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ok` | boolean | tak |  |
| `balance_usd` | number or null |  |  |
| `credits_left` | integer or null |  |  |
| `error` | string or null |  |  |
| `message` | string or null |  |  |

### DfsKeyIn {#schema-dfskeyin}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `login` | string | tak | min length 3; max length 200 |
| `password` | string | tak | min length 4; max length 200 |

### DfsKeyStatus {#schema-dfskeystatus}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | `"dataforseo"` |  | default `"dataforseo"` |
| `configured` | boolean | tak |  |
| `login_hint` | string or null |  |  |
| `updated_at` | string (date-time) or null |  |  |
| `checked_at` | string (date-time) or null |  |  |
| `check` | [DfsCheck](#schema-dfscheck) or null |  |  |
| `signup_url` | string | tak |  |

### DomainHistory {#schema-domainhistory}

Archived snapshots of the domain by year. `status`: `ok` = snapshots with content; `empty` = no snapshots older than 2 years; `unavailable` = archive or network error; `disabled` = not enabled; `skipped` = private host, IP address or no URL.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `host` | string | tak |  |
| `snapshots` | array of [Snapshot](#schema-snapshot) |  | default `[]` |
| `years_archived` | integer |  | default `0` |
| `first_year` | integer or null |  |  |
| `source` | string |  | default `"web.archive.org"` |
| `fetched_at` | string (date-time) or null |  |  |
| `status` | string |  | one of `"ok"`, `"empty"`, `"unavailable"`, `"disabled"`, `"skipped"`; default `"ok"` |
| `complete` | boolean |  | default `true` |
| `error` | string or null |  |  |

### Edge {#schema-edge}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `src` | string | tak |  |
| `dst` | string | tak |  |
| `anchor` | string |  | default `""` |
| `rel` | string |  | default `""` |

### ElementScore {#schema-elementscore}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `element` | string | tak | one of `"title"`, `"h1"`, `"meta"`, `"h2"`, `"h3"` |
| `text` | string | tak |  |
| `parent` | string or null |  | H3: text of the parent H2 |
| `strength` | integer or null |  | How well the element matches the page content, 0-100 (ranking, not a probability); null = template heading, not measured |
| `weak` | boolean |  | The element drifts from the page content (default `false`) |
| `template` | boolean |  | Heading repeated across the site (from your site audit) (default `false`) |

### ElementShare {#schema-elementshare}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak |  |
| `share` | number | tak |  |

### ElementStat {#schema-elementstat}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak |  |
| `share` | number | tak |  |
| `median` | number |  | default `0.0` |

### EmailConfirm {#schema-emailconfirm}

`POST /v1/auth/confirm`: the token from the e-mail link.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `token` | string | tak |  |

### EmbedUsage {#schema-embedusage}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `calls` | integer |  | default `0` |
| `prompt_tokens` | integer |  | default `0` |
| `usd` | number |  | default `0.0` |

### EndpointCreate {#schema-endpointcreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string (uri) | tak | https only (http and private addresses only in dev) (min length 1) |
| `project_id` | string or null |  | Project public id (prj_…); None = all projects of the org |
| `events` | array of [Event](#schema-event) |  | min items 1 |
| `description` | string or null |  |  |

### EndpointRead {#schema-endpointread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `url` | string | tak |  |
| `project_id` | string or null |  |  |
| `events` | array of [Event](#schema-event) | tak |  |
| `description` | string or null |  |  |
| `enabled` | boolean |  | default `true` |
| `created_at` | string (date-time) | tak |  |

### EndpointSecret {#schema-endpointsecret}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `secret` | string | tak |  |

### ErrorBody {#schema-errorbody}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak | one of `"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` | string | tak |  |
| `details` | any or null |  |  |
| `request_id` | string | tak |  |

### ErrorModel {#schema-errormodel}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `detail` | string or object (map of string) | tak |  |

### ErrorResponse {#schema-errorresponse}

The single error shape of all `/v1` responses.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `error` | [ErrorBody](#schema-errorbody) | tak |  |

### Estimate {#schema-estimate}

Site audit estimate: price in USD (`cost_usd`, `cost_per_page_usd`) and time.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `selected` | integer | tak | URLs after the scope filter. |
| `with_html` | integer |  | Selected items with their own HTML (no fetch fee). (default `0`) |
| `pages` | integer | tak | Pages that would be checked (after strategy and limit). |
| `categories` | array of string or null |  | Audit types priced; null = all. |
| `rules` | integer or null |  | Rules checked per page. |
| `seconds` | integer | tak | Estimated time to finish, in seconds. |
| `balanced` | integer or null |  |  |
| `cost_usd` | number | tak | Total price in USD (checks + fetching). Nothing is charged by the estimate. (read-only) |
| `cost_per_page_usd` | number | tak | Price of the checks per page in USD. (read-only) |
| `fetch_usd` | number | tak | Part of `cost_usd` for fetching pages (and JavaScript rendering). (read-only) |
| `addons_usd` | number | tak | Part of `cost_usd` for per-domain add-ons (Visibility). (read-only) |

### Event {#schema-event}

Typ: string; one of `"job.finished"`, `"job.paused"`, `"job.resumed"`, `"job.cancelled"`, `"labels.finished"`, `"infogain.finished"`, `"audit.page_rechecked"`, `"ping"`

### Evidence {#schema-evidence}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `quotes` | array of [Quote](#schema-quote) |  | Quotes from the page that support the finding. (default `[]`) |
| `none` | boolean |  | True = no supporting fragment was found. (default `false`) |
| `supported` | boolean |  | At least one quote was confirmed on the page. (default `false`) |
| `prompt_ver` | string |  | Version of the evidence step. (default `""`) |
| `error` | string or null |  | Evidence step failed; the score stays as it is. |
| `facts_kind` | string or null |  | Kind of page elements listed in `facts` (`links`, `hidden`, `scripts`, `context`); null = none for this rule. |
| `facts` | array of [Fact](#schema-fact) |  | Page elements found in the HTML (links, hidden text, scripts). (default `[]`) |
| `facts_missing` | boolean |  | The rule needs such elements, but none were found on the page. (default `false`) |
| `fix` | string |  | What to change on the page, in `fix_lang`; empty = generic advice from the rule. (default `""`) |
| `fix_lang` | string |  | Language of `fix`. (default `""`) |
| `fix_prompt_ver` | string |  | Version of the fix step. (default `""`) |
| `fix_error` | string or null |  | Fix step failed; the finding stays as it is. |
| `contradiction` | string |  | Why the finding is not confirmed: `none`, `unverified`, `facts`, `internal_links`, `rel_qualified`; empty = no contradiction. (default `""`) |
| `review_decision` | string or null |  | Our team's review: `confirmed` or `rejected`; null = not reviewed. |
| `review_by` | string or null |  | Reviewer (internal). |
| `review_at` | string (date-time) or null |  | Review time. |
| `review_quote` | string |  | Quote chosen by the reviewer. (default `""`) |
| `review_fix` | string |  | Fix written by the reviewer. (default `""`) |

### EvidenceRefreshRequest {#schema-evidencerefreshrequest}

Refresh evidence for findings that already have it: new quotes and fixes, no new scoring.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `lang` | string or null |  | Language of the fixes; empty = language of the request. |

### EvidenceRefreshResult {#schema-evidencerefreshresult}

Result of refreshing one report. Signal strength does not change; no charge (beta).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak |  |
| `hits` | integer | tak |  |
| `refreshed` | integer | tak |  |
| `failed` | integer | tak |  |
| `lang` | string | tak |  |
| `prompt_ver` | string | tak |  |

### ExcludedPage {#schema-excludedpage}

An audit page left out of topicality and categories, with the reason: `error`, `signpost`, `author` or `short`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string |  | default `""` |
| `url` | string or null |  |  |
| `title` | string |  | default `""` |
| `reason` | string | tak |  |

### Expectation {#schema-expectation}

What searchers expect: `text` from the analysis; `met`, `assessed` and `coverage` counted from the checked pages.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak |  |
| `met` | integer |  | default `0` |
| `assessed` | integer |  | default `0` |
| `coverage` | number or null |  |  |
| `aio_met` | integer or null |  | Pages cited by the AI Overview that meet it |
| `aio_assessed` | integer or null |  | Pages cited by the AI Overview that were assessed |

### ExportAudit {#schema-exportaudit}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string or null |  |  |
| `title` | string | tak |  |
| `kind` | string | tak |  |
| `created_at` | string (date-time) | tak |  |
| `report_lang` | string | tak |  |
| `status` | [JobStatus](#schema-jobstatus) | tak |  |
| `pages_total` | integer | tak |  |
| `pages_checked` | integer | tak |  |
| `pages_failed` | integer | tak |  |
| `pages_error_screen` | integer |  | default `0` |
| `pages_incomplete` | integer |  | default `0` |
| `pages_assessed` | integer or null |  |  |
| `pages_with_findings` | integer | tak |  |
| `findings_total` | integer | tak |  |
| `site_levels` | object (map of string) | tak |  |
| `note` | string |  | default `""` |
| `title_patterns` | array of [TitlePattern](#schema-titlepattern) |  | default `[]` |
| `sample` | [ExportSample](#schema-exportsample) or null |  |  |
| `failed_pages` | array of [FailedPage](#schema-failedpage) |  | default `[]` |
| `list_review` | array of [ExportPage](#schema-exportpage) |  | default `[]` |
| `site_clean` | array of [SiteSignal](#schema-sitesignal) |  | default `[]` |
| `content_categories` | [SiteCategories](#schema-sitecategories) or null |  |  |
| `page_languages` | object (map of integer) |  | default `{}` |
| `structured_data` | [ExportStructured](#schema-exportstructured) or null |  |  |
| `sponsored` | [SponsoredView](#schema-sponsoredview) or null |  |  |
| `site_glance` | string |  | default `""` |
| `role_lines` | object (map of string) |  | default `{}` |
| `role_opinions` | object (map of string) |  | default `{}` |
| `visibility` | [SiteVisibility](#schema-sitevisibility) or null |  |  |
| `visibility_markets` | array of [SiteVisibility](#schema-sitevisibility) |  | default `[]` |

### ExportFinding {#schema-exportfinding}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `category` | string | tak | one of `"spam"`, `"quality"`, `"helpful"` |
| `rule_id` | string | tak |  |
| `policy` | string | tak |  |
| `title` | string | tak |  |
| `summary` | string |  | default `""` |
| `level` | string |  | default `""` |
| `signal` | integer or null |  |  |
| `justification` | string or null |  |  |
| `evidence` | array of [ExportQuote](#schema-exportquote) |  | default `[]` |
| `fix` | string |  | default `""` |
| `fix_personal` | boolean |  | default `false` |
| `sources` | array of [ExportSource](#schema-exportsource) |  | default `[]` |

### ExportPage {#schema-exportpage}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string or null |  |  |
| `url` | string or null |  |  |
| `pattern` | string or null |  |  |
| `risk` | string |  | one of `"high"`, `"medium"`, `"none"`; default `"none"` |
| `findings` | integer |  | default `0` |
| `page_kind` | string or null |  |  |
| `page_type` | string or null |  |  |
| `to_check` | integer |  | default `0` |
| `near_rules` | array of string |  | default `[]` |
| `near_signals` | array of integer |  | default `[]` |
| `language` | string or null |  |  |
| `sponsored` | integer or null |  |  |
| `sponsored_signal` | integer or null |  | Signal strength 0-100 of the shown `sponsored` result (not a probability): for 1 - that the page is a paid publication, for 0 - that it is not (low on a page to check: the model leaned to 1 but no verified quote was found); null outside the estimate and when the result comes from your answer |
| `sponsored_status` | string or null |  | Result of a content page: sponsored, editorial, or check (the model answered 1 but no verified quote was found - left out of the share until you answer); null outside the estimate |
| `sponsored_marked` | boolean |  | True when `sponsored` and `sponsored_status` come from your own answer (POST /v1/reports/{id}/feedback, label yes / no) (default `false`) |
| `n` | integer |  | default `0` |
| `spam_level` | string |  | default `"unknown"` |
| `quality_level` | string |  | default `"unknown"` |
| `helpful_level` | string |  | default `"unknown"` |
| `items` | array of [ExportFinding](#schema-exportfinding) |  | default `[]` |
| `revision` | integer |  | default `0` |
| `checked_again_at` | string (date-time) or null |  |  |
| `previous_report_id` | string or null |  |  |

### ExportQuote {#schema-exportquote}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak |  |
| `verified` | boolean | tak |  |
| `links` | array of [QuoteLink](#schema-quotelink) |  | default `[]` |

### ExportSample {#schema-exportsample}

Where the site audit sample came from: URLs in sitemaps, selected, ordered and the strategy used.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `source` | string | tak |  |
| `sitemaps` | array of string | tak |  |
| `sitemap_urls` | integer | tak |  |
| `selected` | integer or null |  |  |
| `requested` | integer or null |  |  |
| `sampled` | integer | tak |  |
| `strategy` | string | tak |  |
| `seed` | integer | tak |  |

### ExportSdRule {#schema-exportsdrule}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `title` | string | tak |  |
| `pages` | integer | tak |  |
| `pages_resolved` | integer |  | pages where the rule was resolved (no mismatch or a confirmed mismatch); `pages` counts against this number (default `0`) |
| `pages_unresolved` | integer |  | pages with structured data to compare where the rule has no resolution (no model answer, signal not confirmed by evidence, or no result); not counted as pages without a mismatch (default `0`) |

### ExportSource {#schema-exportsource}

The official Google guideline a rule is based on.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `label` | string | tak |  |
| `url` | string | tak |  |

### ExportStatus {#schema-exportstatus}

State of an export prepared in the background (PDF, JSON, ZIP): `ready` = file ready, `pending` = 202 with `Retry-After`, `failed` = 503.

Typ: string; one of `"pending"`, `"ready"`, `"failed"`

### ExportStructured {#schema-exportstructured}

Pages with a detected structured data state, pages with schema and pages with QR-SD findings.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pages` | integer | tak |  |
| `pages_assessed` | integer | tak |  |
| `pages_with_hits` | integer | tak |  |
| `rules` | array of [ExportSdRule](#schema-exportsdrule) |  | default `[]` |

### Fact {#schema-fact}

A page element found by parsing the page (no AI): a link, a hidden fragment or a script signal.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | `link`, `hidden`, `script` or `domain_history`. |
| `anchor` | string |  | Link text. (default `""`) |
| `href` | string |  | Link address as in the HTML. (default `""`) |
| `rel` | string |  | Link `rel` attribute. (default `""`) |
| `external` | boolean |  | Link to another registrable domain. (default `false`) |
| `in_content` | boolean |  | Link inside the main content. (default `false`) |
| `qualified` | boolean |  | `rel` has sponsored, nofollow or ugc. (default `false`) |
| `social` | boolean |  | Profile of the site on a social network. (default `false`) |
| `text` | string |  | Fragment (hidden text, script) or a ready line. (default `""`) |

### FactCheck {#schema-factcheck}

Fact check of a fact-based rule against outside sources, done when the rule's signal is 50 or more. The rule was asked again with the checked facts; `signal` of the rule is the result after the check.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | [FactStatus](#schema-factstatus) | tak | Overall: contradicted if any claim is contradicted, confirmed if every checked claim is confirmed, not_found when some claims have no source, unchecked when no source answered |
| `as_of` | string | tak | Date of the check (YYYY-MM-DD, UTC); sources describe the world as of this date |
| `claims` | array of [ClaimCheck](#schema-claimcheck) |  | Checked claims from the page (at most 6) (default `[]`) |
| `score_before` | number | tak | Signal (0-1) of the rule before the fact check |
| `score_after` | number or null |  | Signal (0-1) after the rule was asked again with the facts; null = not asked again (no source answered) |
| `prompt_ver` | string | tak | Version of the fact-check prompts (FACTCHECK_PROMPT_VER) |
| `seconds` | number |  | Wall time of the check in seconds (default `0.0`) |
| `searches` | integer |  | Paid web searches made (default `0`) |
| `credits` | integer |  | Search credits used (as reported by the search provider) (default `0`) |
| `cached_searches` | integer |  | Paid web searches answered from the stored results instead (0 credits, free for you) (default `0`) |
| `cost_usd` | number |  | Our cost of the paid searches in USD (default `0.0`) |
| `charge_usd` | number |  | Price for the customer in USD: search credits × the per-credit fact check price of your price list, 0 when the customer pays the provider (default `0.0`) |
| `payer` | string |  | Whose search key paid: ours \| org (all paid searches used your own key, so searches cost $0 here) (one of `"ours"`, `"org"`; default `"ours"`) |
| `org_credits` | integer |  | Search credits paid with your own key (charged by the search provider, $0 here) (default `0`) |
| `fallback` | boolean |  | Your own key failed and searches used our key (you allowed this) (default `false`) |
| `notice` | string or null |  | Why paid searches did not run with your own key, if they did not |
| `notice_code` | string or null |  | Code of `notice`: unauthorized \| no_funds \| unavailable \| org_unknown \| own_key_required |
| `error` | string or null |  | Why the check stopped early, if it did |

### FactCheckView {#schema-factcheckview}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string | tak |  |
| `as_of` | string | tak |  |
| `signal_before` | integer | tak |  |
| `changed` | boolean | tak |  |
| `claims` | array of [FactClaimView](#schema-factclaimview) |  | default `[]` |
| `notice` | string |  | default `""` |
| `fallback` | boolean |  | default `false` |

### FactClaimView {#schema-factclaimview}

A checked claim of the page as shown in the report: status, source link, date and quote.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `claim` | string | tak |  |
| `status` | string | tak |  |
| `source_url` | string |  | default `""` |
| `source_host` | string |  | default `""` |
| `published` | string |  | default `""` |
| `quote` | string |  | default `""` |

### FactSource {#schema-factsource}

A source with a verbatim quote that confirms or contradicts the claim.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak | Address of the source page |
| `title` | string |  | Title of the source page (default `""`) |
| `origin` | string | tak | Which search returned the source: web \| wikipedia \| wikidata |
| `published` | string or null |  | Publication date reported by the search, if any (YYYY-MM-DD) |
| `quote` | string |  | Verbatim quote from the source that supports or contradicts the claim (default `""`) |
| `quote_verified` | boolean |  | The quote was found in the fetched source text (default `false`) |

### FactStatus {#schema-factstatus}

`confirmed` (a verified source quote supports the claim), `contradicted` (a verified source quote contradicts it), `not_found` (no evidence found - not a sign of falsehood), `unchecked` (sources did not answer).

Typ: string; one of `"confirmed"`, `"contradicted"`, `"not_found"`, `"unchecked"`

### FailedPage {#schema-failedpage}

A page that could not be checked (no report, not counted in the site level).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null |  |  |
| `reason` | string | tak | timeout \| unavailable (the site's server did not respond, HTTP 502-504/520-524, after retries with growing pauses) \| provider (fetch provider HTTP 5xx) \| fetch (other download error: blocked, 4xx, no code) \| analysis (page fetched, check failed) \| error_page (the page showed an error message or a technical screen instead of its content; fix it and run the check again) \| page_type (the page-type check got no model answer, e.g. provider rate limit; the page has no findings until retried) \| redirect (the address redirects to another site, see `target`; not checked and not charged) |
| `target` | string or null |  | , only for reason=redirect: host of the other site the address redirects to |
| `redirect_chain` | array of object |  | , only for reason=redirect: [{url, status, via}] - every hop of the redirect chain |
| `redirect_state` | string or null |  | ok \| partial (intermediate hops unknown) \| loop \| too_long |
| `http_status` | integer or null |  | HTTP status reported by the fetch provider, when known |
| `cause` | string or null |  | , only for reason=analysis: rate_limit (model provider HTTP 429) \| spend_cap (daily spend limit of the service reached) \| model_timeout \| model_http (other model provider HTTP error, see model_status) \| other |
| `model_status` | integer or null |  | HTTP status returned by the model provider for reason=analysis, when known |
| `retryable` | boolean | tak | `POST /v1/audits/{id}/retry-failed` can still retry it (fetch 5xx/timeout, missing page type or a model rate limit / spend cap on our side, and fewer than 2 retries so far) |

### FallbackSettings {#schema-fallbacksettings}

Organization setting for own keys of search results and page fetching. `fallback_ours`: when your key is
rejected or has no funds, the call uses our key and our prices instead of failing; the report says so. Ignored
while `own_key_only` is on.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `fallback_ours` | boolean |  | default `false` |

### FeedbackCreate {#schema-feedbackcreate}

Feedback on a report or a rule. Versions, signal and project are taken from the stored report.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string or null |  | None = report-level problem |
| `label` | [FeedbackLabel](#schema-feedbacklabel) | tak | false_positive / false_negative / unclear: about the model result of the rule; yes / no: your own answer to the rule question (1 / 0), e.g. PG-SPONSORED yes = the page is a paid publication. The latest yes / no answer replaces the page result in your site audit report; problem: report-level comment |
| `comment` | string |  | default `""`; max length 4000 |

### FeedbackLabel {#schema-feedbacklabel}

Typ: string; one of `"false_positive"`, `"false_negative"`, `"unclear"`, `"problem"`, `"yes"`, `"no"`

### FeedbackRead {#schema-feedbackread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `report_id` | string | tak |  |
| `rule_id` | string or null | tak |  |
| `rule_ver` | integer or null | tak |  |
| `prompt_ver` | string | tak |  |
| `submitted_by` | string | tak |  |
| `project_id` | string or null | tak |  |
| `label` | [FeedbackLabel](#schema-feedbacklabel) | tak |  |
| `comment` | string | tak |  |
| `created_at` | string (date-time) | tak |  |
| `signal` | integer or null | tak |  |
| `signal_level` | string | tak | one of `"high"`, `"medium"`, `"low"`, `""` |
| `near` | boolean or null | tak | True = no finding, but close to the threshold. Null = not known for this item (feedback without report context, older stored responses); see the report. |

### FetchByokSettings {#schema-fetchbyoksettings}

Organization setting. `own_key_only`: never fetch pages at our cost; without a working own key, pages are not
fetched and nothing is charged for fetching.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `own_key_only` | boolean |  | default `false` |

### FetchByokStatus {#schema-fetchbyokstatus}

Own page fetching keys by provider and the organization setting. `payer`: who pays for fetching now
(`org` = your key, fetching and rendering cost $0 here; `ours` = our key and our prices). `fallback_ours`: switch
to our key when your key fails (shared with search results).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `keys` | object (map of [FetchKeyStatus](#schema-fetchkeystatus)) | tak |  |
| `settings` | [FetchByokSettings](#schema-fetchbyoksettings) | tak |  |
| `payer` | string | tak | one of `"ours"`, `"org"` |
| `fallback_ours` | boolean |  | default `false` |

### FetchFailure {#schema-fetchfailure}

Why a page could not be downloaded: kind of failure and the HTTP status, when known.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | timeout \| unavailable (site server did not respond, HTTP 502-504/520-524) \| provider \| blocked \| captcha \| not_found \| invalid \| config \| offsite_redirect (the address redirects to another site, not checked) \| error |
| `status` | integer or null |  | HTTP status from the fetch provider, when known |
| `v` | integer |  | classification version; 2 = classified with `unavailable` (blocked 52x = challenge page) (default `1`) |
| `target` | string or null |  | , only for kind=offsite_redirect: host the page redirected to (another site; the page was not checked) |
| `redirect_chain` | array of [RedirectHop](#schema-redirecthop) |  | , only for kind=offsite_redirect: every address in the redirect chain with the HTTP status it answered with (3xx per hop; `via=meta_refresh` for an HTML meta refresh; status null = unknown). Private projects: hosts only |
| `redirect_state` | string or null |  | ok \| partial (the fetch provider reported only the final address, intermediate hops unknown) \| loop \| too_long |

### FetchKeyCheck {#schema-fetchkeycheck}

Result of a free key check (credits left, no paid request).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ok` | boolean | tak |  |
| `credits_left` | integer or null |  |  |
| `error` | string or null |  |  |
| `message` | string or null |  |  |

### FetchKeyIn {#schema-fetchkeyin}

Own key for page fetching and rendering.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [FetchProviderName](#schema-fetchprovidername) | tak |  |
| `api_key` | string | tak | min length 8; max length 200 |

### FetchKeyRef {#schema-fetchkeyref}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [FetchProviderName](#schema-fetchprovidername) | tak |  |

### FetchKeyStatus {#schema-fetchkeystatus}

Own fetching key of one provider: never the secret, only the last 4 characters (`hint`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `configured` | boolean | tak |  |
| `hint` | string or null |  |  |
| `updated_at` | string (date-time) or null |  |  |
| `checked_at` | string (date-time) or null |  |  |
| `check` | [FetchKeyCheck](#schema-fetchkeycheck) or null |  |  |
| `signup_url` | string or null |  |  |

### FetchProviderName {#schema-fetchprovidername}

Page fetching provider of an own key.

Typ: string; one of `"spidercloud"`

### FixAction {#schema-fixaction}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `n` | integer | tak | Order (1 = first). |
| `rule_ids` | array of string | tak | Rules this action fixes. |
| `title` | string | tak | Short title. |
| `text` | string | tak | What to do. |
| `source` | string |  | `model` = written for your pages, `fallback` = generic advice for the rule. (one of `"model"`, `"fallback"`; default `"model"`) |
| `signal` | integer | tak | Signal strength 0-100. |
| `pages` | array of string | tak | Pages concerned (URL or report id). |
| `evidence` | array of string |  | Quotes from the pages. (default `[]`) |
| `acceptance` | array of string |  | How to check the fix is done. (default `[]`) |
| `quote` | string |  | What is wrong: fragment found on the page. (default `""`) |
| `where` | string |  | Where to change (section, paragraph or element). (default `""`) |
| `example` | string |  | Example of the change. (default `""`) |
| `example_page` | string or null |  | Page the example is for. |
| `generic` | boolean |  | True = generic advice, no specific place found. (default `false`) |
| `steps` | array of [FixPageStep](#schema-fixpagestep) |  | default `[]` |

### FixActionChange {#schema-fixactionchange}

An action present in both versions, matched by shared rules and then pages: signal strength 0-100 before and after, the change in points (not percent) and pages added or removed.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `title` | string | tak |  |
| `rule_ids` | array of string | tak |  |
| `signal_before` | integer | tak |  |
| `signal_after` | integer | tak |  |
| `signal_delta` | integer | tak |  |
| `pages` | integer | tak |  |
| `pages_added` | array of string |  | default `[]` |
| `pages_removed` | array of string |  | default `[]` |

### FixActionRef {#schema-fixactionref}

An action in a version comparison: title, rules, signal strength 0-100 and number of pages.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `title` | string | tak |  |
| `rule_ids` | array of string | tak |  |
| `signal` | integer | tak |  |
| `pages` | integer | tak |  |

### FixEffort {#schema-fixeffort}

Estimated work to fix, counted by code from confirmed findings and signal strength (0-100), plus content pruning
signals for a site audit. An estimate, not a quote, and not a prediction of what Google will do.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `source_kind` | string | tak | one of `"report"`, `"audit"` |
| `source_id` | string | tak |  |
| `pages_checked` | integer | tak | Pages in the report or audit |
| `pages_to_fix` | integer | tak | Pages with at least one confirmed finding |
| `rows` | array of [FixEffortRow](#schema-fixeffortrow) |  | Only kinds with at least one page, in a fixed order (default `[]`) |
| `hours_low` | number |  | Lower estimate in hours (sum of rows) (default `0.0`) |
| `hours_high` | number |  | Upper estimate in hours (sum of rows) (default `0.0`) |
| `pruning` | boolean |  | true = remove or merge pages come from content pruning signals (default `false`) |
| `estimate` | `true` |  | Always true: an estimate from findings, not a quote (default `true`) |

### FixEffortRead {#schema-fixeffortread}

Estimated work to fix and the price of the fix plan.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `effort` | [FixEffort](#schema-fixeffort) | tak |  |
| `fix_plan` | [FixQuote](#schema-fixquote) | tak | Price of the fix plan for this report or audit and whether it is already paid |

### FixEffortRow {#schema-fixeffortrow}

One kind of change: how many pages and a rough number of hours (an estimate).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | minor = small fix (a fragment, an attribute, a block); rewrite = rewrite the main content; remove_merge = remove, noindex or merge the page (from content pruning) (one of `"minor"`, `"rewrite"`, `"remove_merge"`) |
| `pages` | integer | tak | Pages that need this kind of change |
| `hours_low` | number | tak | Lower estimate in hours for these pages |
| `hours_high` | number | tak | Upper estimate in hours for these pages |

### FixPageStep {#schema-fixpagestep}

One page of a fix action as a step for an agent, with the quotes found on that page.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `page` | string | tak |  |
| `quotes` | array of string |  | default `[]` |
| `signal` | integer |  | default `0` |
| `status` | string |  | one of `"open"`, `"fixed"`, `"still"`, `"unchecked"`; default `"open"` |
| `checked_at` | string or null |  |  |

### FixPlan {#schema-fixplan}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `source_kind` | string | tak | `report` (one page) or `audit` (site). (one of `"report"`, `"audit"`) |
| `source_id` | string | tak | Report or audit id. |
| `domain` | string or null |  | Site host. |
| `lang` | string | tak | Plan language. |
| `prompt_ver` | string |  | Plan version. (default `""`) |
| `generated_at` | string (date-time) | tak | When the plan was made. |
| `cached` | boolean |  | Served from cache (no cost). (default `false`) |
| `summary` | string |  | One-sentence priority. (default `""`) |
| `actions` | array of [FixAction](#schema-fixaction) |  | Ordered actions, most important first. (default `[]`) |
| `cost_usd` | number |  | Price charged for the plan (USD). (default `0.0`) |

### FixPlanDiff {#schema-fixplandiff}

Version `n` compared with version `base` (n-1): actions added, removed and present in both. A lower signal strength alone does not prove a fix.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `source_kind` | string | tak | one of `"report"`, `"audit"` |
| `source_id` | string | tak |  |
| `lang` | string | tak |  |
| `base` | integer | tak |  |
| `n` | integer | tak |  |
| `added` | array of [FixActionRef](#schema-fixactionref) |  | default `[]` |
| `removed` | array of [FixActionRef](#schema-fixactionref) |  | default `[]` |
| `changed` | array of [FixActionChange](#schema-fixactionchange) |  | default `[]` |

### FixPlanState {#schema-fixplanstate}

Fix plan state: `generating` (poll again after `retry_after` seconds), `ready` (with `plan`) or `failed` (nothing charged; a later request starts again).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string | tak | `generating` (poll after `retry_after` s), `ready` (see `plan`) or `failed`. (one of `"generating"`, `"ready"`, `"failed"`) |
| `source_kind` | string | tak | `report` or `audit`. (one of `"report"`, `"audit"`) |
| `source_id` | string | tak | Report or audit id. |
| `lang` | string | tak | Plan language. |
| `retry_after` | integer |  | Seconds to wait before polling. (default `0`) |
| `plan` | [FixPlan](#schema-fixplan) or null |  | The plan when ready. |
| `prompt_ver` | string |  | Version of the stored plan. (default `""`) |
| `stale` | boolean |  | The stored plan was made from older findings; regenerate for a fresh one. (default `false`) |
| `regenerating` | boolean |  | A new plan is being made; `plan` is the previous one. (default `false`) |

### FixPlanVersion {#schema-fixplanversion}

One saved fix plan version. `n` starts at 1 for the oldest ready plan and never changes; `current` = the version returned as the fix plan. `actions` null = the plan cannot be read.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `n` | integer | tak |  |
| `created_at` | string (date-time) | tak |  |
| `prompt_ver` | string |  | default `""` |
| `actions` | integer or null |  |  |
| `current` | boolean |  | default `false` |

### FixPlanVersions {#schema-fixplanversions}

Saved fix plan versions of a report or audit in one language, newest first.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `source_kind` | string | tak | one of `"report"`, `"audit"` |
| `source_id` | string | tak |  |
| `lang` | string | tak |  |
| `versions` | array of [FixPlanVersion](#schema-fixplanversion) |  | default `[]` |

### FixQuote {#schema-fixquote}

Price of the fix plan: pages that need changes (the same count as the work estimate) × the per-page price.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pages` | integer | tak | Pages that need changes (pages with confirmed findings in the plan); pages without issues cost 0 |
| `price_usd` | number | tak | Exact price of the fix plan in USD for your price column (pages × price per page) |
| `purchased` | boolean |  | true = the plan is already paid for (or was included before 2026-11-15) (default `false`) |

### FixStep {#schema-fixstep}

Fix step for a metric rated `poor` or `needs_improvement`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `metric` | string | tak | one of `"lcp"`, `"inp"`, `"cls"`, `"fcp"`, `"ttfb"` |
| `rating` | string | tak | one of `"good"`, `"needs_improvement"`, `"poor"` |
| `form_factors` | array of string | tak |  |
| `actions` | array of string | tak |  |

### FixSuggestion {#schema-fixsuggestion}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `element` | string | tak | one of `"title"`, `"h1"`, `"meta"`, `"h2"`, `"h3"` |
| `current` | string | tak | Current text of the element |
| `why` | string | tak | Why it does not match the content |
| `do` | string | tak | What to change |
| `example` | string | tak | Example of a new text |

### GroupShares {#schema-groupshares}

shares of the `groups` strategy in the sample; archive = the rest. A group with too few URLs is topped up by the next groups.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `home` | number |  | Share of pages linked from the home page (default `0.1`; min 0.0; max 1.0) |
| `newest` | number |  | Share of the newest sitemap pages (current year by lastmod) (default `0.25`; min 0.0; max 1.0) |

### GroupStat {#schema-groupstat}

sample group (home | newest | archive): URLs in its pool, pages sampled; `checked`/`flagged` once the audit has a summary.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `group` | string | tak |  |
| `pool` | integer | tak |  |
| `sampled` | integer | tak |  |
| `checked` | integer or null |  |  |
| `flagged` | integer or null |  |  |

### GscConnection {#schema-gscconnection}

A Google account connected to the organization for Search Console (read-only access).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Connection id (gsc_...) |
| `google_email` | string | tak | E-mail of the connected Google account (may differ from the sign-in account) |
| `state` | [ConnectionState](#schema-connectionstate) | tak |  |
| `connected_at` | string (date-time) | tak |  |
| `last_ok_at` | string (date-time) or null |  |  |
| `properties` | integer |  | Number of project properties that use this connection (default `0`) |

### GscPageMetrics {#schema-gscpagemetrics}

Search Console figures of one page for the period (variants of the URL summed).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `clicks` | integer |  | default `0` |
| `impressions` | integer |  | default `0` |
| `position` | number or null |  | Average position weighted by impressions; empty without impressions |
| `ctr` | number or null |  | Clicks / impressions, 0-1 |
| `prev_clicks` | integer or null |  | Clicks in the previous period of the same length (preset declining) |
| `variants` | integer |  | URL variants merged into this page (http/https, www, trailing slash, tracking) (default `1`) |
| `in_gsc` | boolean |  | False = page from the sitemap with no impressions in the period (default `true`) |
| `no_data` | boolean |  | True = page from the sitemap missing from a Search Console answer that hit its row limit: its figures are unknown, not zero (clicks and impressions are not a measurement) (default `false`) |

### GscPageSource {#schema-gscpagesource}

Pick audit pages from a Search Console property attached to the project (live query, page dimension).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `property_id` | string | tak | Property id attached to the project (gsp_...) (max length 24) |
| `period` | integer |  | Days of data, ending 3 days ago (Search Console delay) (one of `28`, `90`, `180`, `365`, `480`; default `90`) |
| `preset` | string or null |  | top_clicks: most clicks; impressions_no_clicks: shown but never clicked; position_4_20: average position 4-20; declining: most clicks lost against the previous period of the same length; all_impressions: every page with impressions in the period, most impressions first (default `"top_clicks"`) |
| `sort` | string or null |  | Order of pages; empty = order of the preset |
| `min_impressions` | integer or null |  | Skip pages with fewer impressions in the period; empty or 0 = no minimum. Applies to every preset |
| `limit` | integer |  | Maximum number of pages taken from Search Console (default `500`; min 1.0; max 5000.0) |
| `search_type` | `"web"` |  | default `"web"` |
| `merge_sitemap` | boolean |  | Also add sitemap pages without impressions in the period (marked as no impressions), useful for content pruning (default `false`) |

### GscProjectStatus {#schema-gscprojectstatus}

Properties of a project and the organization's Google accounts to choose from.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `properties` | array of [GscProperty](#schema-gscproperty) | tak |  |
| `connections` | array of [GscConnection](#schema-gscconnection) | tak |  |
| `can_manage` | boolean | tak | Caller may attach and detach properties |

### GscProperty {#schema-gscproperty}

A Search Console property attached to a project.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Property id (gsp_...) |
| `site_url` | string | tak |  |
| `permission` | string | tak |  |
| `connection_id` | string | tak |  |
| `connection_email` | string | tak |  |
| `connection_state` | [ConnectionState](#schema-connectionstate) | tak |  |
| `created_at` | string (date-time) | tak |  |

### GscSite {#schema-gscsite}

A Search Console property visible to a connection (`sites.list`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site_url` | string | tak | sc-domain:example.com or https://example.com/ |
| `permission` | string | tak | siteOwner, siteFullUser or siteRestrictedUser |
| `recommended` | boolean |  | Domain property preferred when both forms exist (default `false`) |

### GscSnapshot {#schema-gscsnapshot}

What was asked from Search Console for this audit.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `property` | string | tak | Property URL (sc-domain:... or URL prefix) |
| `property_id` | string or null |  | Property id in the project (gsp_...) |
| `start_date` | string | tak |  |
| `end_date` | string | tak |  |
| `preset` | string or null |  |  |
| `sort` | string or null |  |  |
| `min_impressions` | integer or null |  | Minimum impressions used to pick pages (empty = none) |
| `rows` | integer |  | Pages returned by Search Console after merging variants and host filter (default `0`) |
| `merged_sitemap` | integer |  | Sitemap pages added with no impressions (default `0`) |
| `partial` | boolean |  | Search Console returned its row limit (50,000); pages with fewer clicks may be missing from the list (default `false`) |
| `map_partial` | boolean |  | Reading the sitemap stopped at a limit; the rest of the sitemap was not compared with Search Console (default `false`) |

### HTTPValidationError {#schema-httpvalidationerror}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `detail` | array of [ValidationError](#schema-validationerror) |  |  |

### HeadingScore {#schema-headingscore}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `level` | integer | tak |  |
| `text` | string | tak |  |
| `parent` | string |  | default `""` |
| `signal` | integer or null |  |  |
| `low` | boolean |  | default `false` |
| `template` | boolean |  | default `false` |

### IndexPage {#schema-indexpage}

One address. `checked_url` = the address after redirects.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak |  |
| `checked_url` | string or null |  |  |
| `status` | string |  | one of `"pending"`, `"indexed"`, `"not_indexed"`, `"error"`; default `"pending"` |
| `checked_at` | string (date-time) or null |  |  |

### IndexRequest {#schema-indexrequest}

`POST /v1/indexing`: addresses to check (duplicates counted once), optionally a project.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `urls` | array of string (uri) | tak | min items 1; max items 1000 |
| `project_id` | string or null |  |  |
| `no_charge` | boolean |  | Operators only: run without charging the organisation's balance. Anyone else gets 403. (default `false`) |
| `overflow` | string |  | Addresses covered by the project's Search Console are checked free (URL Inspection) up to Google's daily limit. Above it: paid = the paid check (charged), wait = not checked today (one of `"paid"`, `"wait"`; default `"paid"`) |

### IndexRun {#schema-indexrun}

An indexing check run (`idx_…`). `audit_id` = audit it belongs to; `price_usd` = reserved (USD), `charged_usd` = charged after settlement (lookup errors are free).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `status` | string | tak | one of `"queued"`, `"running"`, `"done"`, `"partial"`, `"failed"` |
| `project_id` | string or null |  |  |
| `audit_id` | string or null |  |  |
| `created_at` | string (date-time) | tak |  |
| `finished_at` | string (date-time) or null |  |  |
| `total` | integer | tak |  |
| `indexed` | integer |  | default `0` |
| `not_indexed` | integer |  | default `0` |
| `errors` | integer |  | default `0` |
| `price_usd` | number |  | Amount reserved for this check (USD). (default `0.0`) |
| `charged_usd` | number or null |  | Amount charged after the check (USD); addresses the service could not check are free. Null until settled. |
| `pages` | array of [IndexPage](#schema-indexpage) |  | default `[]` |
| `error` | string or null |  |  |

### InfoGainRequest {#schema-infogainrequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `query` | string | tak | Search phrase the text should answer (min length 1; max length 200) |
| `market` | string |  | language-COUNTRY, e.g. pl-PL, en-US (default `"en-US"`; max length 8; pattern `^[a-zA-Z]{2,3}([-_][a-zA-Z0-9]{2,4})?[-_][a-zA-Z]{2}$`) |
| `device` | string |  | one of `"desktop"`, `"mobile"`; default `"desktop"` |
| `url` | string or null |  | Your page: we fetch it and cut menus, footers and consent windows before the analysis. With `text`, used only as context (your domain in AI Overview sources) |
| `text` | string or null |  | Your text (Markdown or plain); no length limit beyond the request size |
| `title` | string |  | default `""`; max length 300 |
| `report_lang` | string or null |  | Report language; default from Accept-Language |
| `render_js` | string |  | Render JavaScript of your page (`url` only): `render_js` price only when the page was rendered (one of `"on"`, `"auto"`, `"off"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Reuse search results up to N days old (default 3); 0 = always new results |
| `webhook_url` | string or null |  | POST `infogain.finished` (signed like job webhooks) when the report is ready or failed |
| `project_id` | string or null |  | Project public id (prj_…); default from X-Project-Id or the key |

### InfoGainRun {#schema-infogainrun}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Report id (igr_…) |
| `status` | string | tak | one of `"new"`, `"queued"`, `"running"`, `"done"`, `"failed"` |
| `query` | string | tak |  |
| `market` | string | tak |  |
| `device` | string | tak |  |
| `report_lang` | string | tak |  |
| `url` | string or null |  |  |
| `project_id` | string or null |  |  |
| `created_at` | string (date-time) | tak |  |
| `finished_at` | string (date-time) or null |  |  |
| `serp_source` | string or null |  | Search results reused from recent checks or bought for this report |
| `price_usd` | number |  | Amount reserved when the report was ordered (default `0.0`) |
| `charged_usd` | number or null |  | Amount charged after the report (refund of the rest); None = not settled yet |
| `failure` | string or null |  | Why the report failed (status failed). A failed report is not charged, except `pages_filtered_out`: your domain filter excluded all top results, so only the search results bought for this report are charged ($0.0015 pay as you go), and `document_fetch_failed`: your page could not be read, so there was nothing to compare; the search results and page fetches we paid for are charged at our provider's cost plus 30%, the analysis is not (see `charged_usd` and `message`). Under the current rules an unreadable page gives a brief for a new page instead of this failure (see `fallback`) |
| `message` | string or null |  | Failure explained in one sentence; for a report with `fallback`, why your page could not be read and how the brief is charged |
| `report` | object or null |  | Gain & Gap report (Gain, Coverage, claims, gaps, check list, fix plan, top pages, AI Overview); present when status is done. `report.top_basis` is present only when too few top results had readable text (for example videos): what is in the top results and that the comparison also uses the titles and descriptions shown in the search results (pages with `basis` snippet); each such result is charged at a lower rate than a page with text |
| `product` | string |  | `query_pack` = this report is part of a Query Pack (see GET /v1/query-pack/{id}); price and charge then cover the whole pack (one of `"gain_gap"`, `"query_pack"`; default `"gain_gap"`) |
| `intent_id` | string or null |  | Intent report for the same phrase (itr_…): the Intent part of a Query Pack, or an Intent report ordered together with this one in the panel |
| `mode` | string |  | Mode you ordered. `compare` = your page or text compared with the search results; `brief` = phrase only (Query Pack): `report.brief` has what the top results cover, questions they leave unanswered and sections for a new page; Gain, Coverage and the fix plan are empty (one of `"compare"`, `"brief"`; default `"compare"`) |
| `fallback` | `"document_unreadable"` or null |  | `document_unreadable` = you ordered a comparison of your page (`url`), but we could not read it (for example HTTP 404, a redirect to another site or no main text), so instead of a failed report you get a brief for a new page built from the same top results: `report.mode` is brief, `report.brief` has the plan and `report.doc_unreadable` the reason (`reason`, `http_status`). Charged at the brief price for the pages read plus the search results and page fetches we paid for (provider cost plus 30%), never more than the reservation; `message` says it in one sentence. If the brief cannot be prepared because of a problem on our side, the report fails and nothing is charged. Only for reports ordered after this rule was introduced; earlier ones fail with `document_fetch_failed`. None = the report you ordered |

### IngestInput {#schema-ingestinput}

Page input: `url`, `html` or `text`. The URL is normalized: no `#fragment` and no tracking or secret parameters.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null |  | Page address (http/https). Give at least one of `url`, `html` or `text`; with `html` the URL is kept as context and the page is not fetched. |
| `html` | string or null |  | Raw HTML of the page (no fetch, no fetch fee); wins over `url` as the content source. |
| `text` | string or null |  | Plain text of the page (no fetch; checks that need links or HTML are skipped). |
| `name` | string or null |  |  |
| `render_js` | string or null |  | Render JavaScript: true = always (+ render_js price, USD), false = never, auto = only after a block/empty shell (surcharge only when rendered); empty = project setting |

### IntentBatchAccepted {#schema-intentbatchaccepted}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `batch_id` | string | tak | Batch id. |
| `items` | array of [IntentSummary](#schema-intentsummary) | tak | One entry per unique phrase; poll each with `GET /v1/intent/{report_id}`. |
| `skipped` | integer |  | Duplicates in the input. (default `0`) |
| `price_usd` | number | tak | Total price in USD. (read-only) |

### IntentBatchCancel {#schema-intentbatchcancel}

Response of `POST /v1/intent/batches/{batch_id}/cancel`: the batch after cancelling; repeating it returns `changed` false.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `batch` | [IntentBatchState](#schema-intentbatchstate) | tak | The batch after the cancel |
| `changed` | boolean | tak | True when this call cancelled phrases; false when there was nothing left to cancel |

### IntentBatchRequest {#schema-intentbatchrequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `tier` | string |  | 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 (one of `"basic"`, `"premium"`, `"compare"`; default `"basic"`) |
| `freshness` | string |  | auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price) (one of `"auto"`, `"fresh"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Oldest results reused with freshness=auto (default 3 days) |
| `report_lang` | string or null |  | Report language: en \| pl; exports and share link. Empty = Accept-Language, else en |
| `items` | array of [IntentItem](#schema-intentitem) | tak | Phrases; duplicates (phrase + market + device) run once (min items 1) |
| `project_id` | string or null |  | Project id (`prj_…`); default project when omitted. |

### IntentBatchState {#schema-intentbatchstate}

Batch state from its phrases. `price_usd` = sum of phrase prices: reserved while running, charged after settlement; cancelled phrases are always 0.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `batch_id` | string | tak |  |
| `status` | string | tak | queued \| running \| cancelling (cancelled, phrases already running are finishing) \| done \| failed (no phrase succeeded) \| cancelled (one of `"queued"`, `"running"`, `"cancelling"`, `"done"`, `"failed"`, `"cancelled"`) |
| `total` | integer | tak |  |
| `done` | integer |  | Phrases with a report (default `0`) |
| `failed` | integer |  | Phrases that could not be analysed (not charged) (default `0`) |
| `cancelled` | integer |  | Phrases cancelled before they started: not run and not charged (default `0`) |
| `items` | array of [IntentSummary](#schema-intentsummary) | tak |  |
| `price_usd` | number | tak | read-only |

### IntentFailure {#schema-intentfailure}

Why an Intent phrase failed, in plain words.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak | few_readable_pages = too few top pages with readable text; page_unreadable = your page could not be read; temporary = temporary connection or queue problem, order again; failed = other error (one of `"few_readable_pages"`, `"page_unreadable"`, `"temporary"`, `"failed"`) |
| `message` | string | tak | The reason in one sentence (English) |
| `readable_pages` | integer or null |  | Top pages with readable text (few_readable_pages) |
| `top_pages` | integer or null |  | Top pages taken from the search results (few_readable_pages) |
| `needed_pages` | integer or null |  | Readable top pages needed (few_readable_pages) |

### IntentItem {#schema-intentitem}

A phrase and its market: `market` (e.g. `en-US`) or `location_code` with `language_code` from the market list.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | language-COUNTRY, e.g. en-US, pl-PL (default `"en-US"`) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `query` | string | tak | Search phrase (min length 1; max length 200) |
| `device` | string |  | `desktop` (default) or `mobile` results. (one of `"desktop"`, `"mobile"`; default `"desktop"`) |

### IntentRead {#schema-intentread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Intent report id (`itr_…`). |
| `status` | string | tak | `queued`, `running`, `done`, `failed` or `cancelled` (batch phrase cancelled before it started, not charged). (one of `"queued"`, `"running"`, `"done"`, `"failed"`, `"cancelled"`) |
| `query` | string | tak | Search phrase. |
| `market` | string | tak | Market (language-COUNTRY, e.g. `en-US`). |
| `device` | string |  | `desktop` or `mobile`. (default `"desktop"`) |
| `tier` | string |  | `basic`, `premium` or `compare`. (one of `"basic"`, `"premium"`, `"compare"`; default `"basic"`) |
| `project_id` | string or null |  | Project id (`prj_…`). |
| `batch_id` | string or null |  | Batch id when ordered with `POST /v1/intent/batch`. |
| `created_at` | string (date-time) | tak | Ordered. |
| `finished_at` | string (date-time) or null |  | Finished. |
| `error` | string or null |  | Why the report failed (`intent_failed`); null otherwise. Failed reports are not charged. |
| `cache` | string or null |  | Reuse of recent search results: `miss` (new), `serp` (results reused), `profile` (whole report reused). |
| `dominant_title` | string or null |  | Name of the main search intent. |
| `dominant_share` | number or null |  | Share of results with the main intent (0-1). |
| `snapshot_at` | string or null |  | Date of the search results used. |
| `report_lang` | string or null |  | Report language. |
| `queue_state` | string or null |  | 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). |
| `compare_url` | string or null |  | Your page compared with the top results (tier `compare`). |
| `report` | [IntentReport](#schema-intentreport) or null |  | Full intent report when `status` is `done`. |
| `price_usd` | number | tak | Price charged in USD. (read-only) |

### IntentReport {#schema-intentreport}

Search intent report for one phrase. `snapshot_at` = date of the search results used; with your own results (`serp_source: client`) it is the date you gave, or empty.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `query` | string | tak |  |
| `market` | string | tak |  |
| `device` | string |  | default `"desktop"` |
| `snapshot_at` | string | tak |  |
| `serp_source` | string |  | one of `"ours"`, `"client"`; default `"ours"` |
| `pages_source` | string or null |  |  |
| `results_total` | integer |  | default `0` |
| `intents` | array of [IntentRow](#schema-intentrow) |  | default `[]` |
| `dominant_intent_id` | string or null |  |  |
| `dominant_title` | string or null |  |  |
| `dominant_share` | number or null |  |  |
| `recommended_form` | string or null |  |  |
| `expected_genre` | string or null |  |  |
| `article_fits` | boolean or null |  |  |
| `article_fits_reason` | string |  | default `""` |
| `length_words` | object (map of integer or null) or null |  |  |
| `length_sample` | integer |  | default `0` |
| `elements` | array of [ElementShare](#schema-elementshare) |  | default `[]` |
| `useful_elements` | array of string |  | default `[]` |
| `reader_questions` | array of [Question](#schema-question) |  | default `[]` |
| `heading_themes` | array of [Question](#schema-question) |  | default `[]` |
| `related_searches` | array of string |  | default `[]` |
| `warnings` | array of string |  | default `[]` |
| `summary` | string |  | default `""` |
| `labeler_version` | string |  | default `""` |
| `length_basis` | string |  | default `""` |
| `traffic_known` | integer |  | default `0` |
| `dominant_by_traffic_id` | string or null |  |  |
| `ai_overview` | string |  | default `""` |
| `ai_overview_note` | string |  | default `""` |
| `item_types` | array of string |  | default `[]` |
| `domains` | array of string |  | default `[]` |
| `results` | array of [ResultMap](#schema-resultmap) |  | default `[]` |
| `page_types` | array of [Question](#schema-question) |  | default `[]` |
| `avoid` | array of [Advice](#schema-advice) |  | default `[]` |
| `useful` | array of [Advice](#schema-advice) |  | default `[]` |
| `demand` | [Demand](#schema-demand) or null |  |  |
| `closer` | [CloserLook](#schema-closerlook) or null |  |  |
| `compare` | [Comparison](#schema-comparison) or null |  |  |
| `page_scope` | [PageScopeInfo](#schema-pagescopeinfo) or null |  |  |
| `app_version` | string or null |  |  |

### IntentRequest {#schema-intentrequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | language-COUNTRY, e.g. en-US, pl-PL (default `"en-US"`) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `query` | string | tak | Search phrase (min length 1; max length 200) |
| `device` | string |  | `desktop` (default) or `mobile` results. (one of `"desktop"`, `"mobile"`; default `"desktop"`) |
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `tier` | string |  | 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 (one of `"basic"`, `"premium"`, `"compare"`; default `"basic"`) |
| `freshness` | string |  | auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price) (one of `"auto"`, `"fresh"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Oldest results reused with freshness=auto (default 3 days) |
| `report_lang` | string or null |  | Report language: en \| pl; exports and share link. Empty = Accept-Language, else en |
| `serp` | [ClientSerp](#schema-clientserp) or null |  | Your own search results for the phrase instead of ours: no search results fee, nothing shared with other customers |
| `pages` | array of [ClientPage](#schema-clientpage) or null |  | premium and compare: documents of the top pages (3 to 10) instead of fetching them: no page fetch fee |
| `project_id` | string or null |  | Project public id (prj_…); default project when omitted |
| `compare_url` | string or null |  | Your page (http/https), required with tier=compare and only there |

### IntentRow {#schema-intentrow}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `intent_id` | string | tak |  |
| `title` | string | tak |  |
| `form` | string |  | default `""` |
| `answer_share` | number |  | default `0.0` |
| `coverage` | number |  | default `0.0` |
| `traffic_share` | number or null |  |  |
| `best_rank` | integer or null |  |  |
| `searcher_goal` | string |  | default `""` |
| `ranks` | array of integer |  | default `[]` |
| `median_words` | integer or null |  |  |

### IntentSummary {#schema-intentsummary}

One row of the search intent history; price in `price_usd`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Intent report id (`itr_…`). |
| `status` | string | tak | `queued`, `running`, `done`, `failed` or `cancelled` (batch phrase cancelled before it started, not charged). (one of `"queued"`, `"running"`, `"done"`, `"failed"`, `"cancelled"`) |
| `query` | string | tak | Search phrase. |
| `market` | string | tak | Market (language-COUNTRY, e.g. `en-US`). |
| `device` | string |  | `desktop` or `mobile`. (default `"desktop"`) |
| `tier` | string |  | `basic`, `premium` or `compare`. (one of `"basic"`, `"premium"`, `"compare"`; default `"basic"`) |
| `project_id` | string or null |  | Project id (`prj_…`). |
| `batch_id` | string or null |  | Batch id when ordered with `POST /v1/intent/batch`. |
| `created_at` | string (date-time) | tak | Ordered. |
| `finished_at` | string (date-time) or null |  | Finished. |
| `error` | string or null |  | Why the report failed (`intent_failed`); null otherwise. Failed reports are not charged. |
| `cache` | string or null |  | Reuse of recent search results: `miss` (new), `serp` (results reused), `profile` (whole report reused). |
| `dominant_title` | string or null |  | Name of the main search intent. |
| `dominant_share` | number or null |  | Share of results with the main intent (0-1). |
| `snapshot_at` | string or null |  | Date of the search results used. |
| `report_lang` | string or null |  | Report language. |
| `queue_state` | string or null |  | 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). |
| `compare_url` | string or null |  | Your page compared with the top results (tier `compare`). |
| `price_usd` | number | tak | Price charged in USD. (read-only) |

### IntentTier {#schema-intenttier}

A search intent tier with its price per phrase (`price_usd`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | `basic`, `premium` or `compare` (value of `tier`). (one of `"basic"`, `"premium"`, `"compare"`) |
| `name` | string | tak | Name. |
| `name_pl` | string |  | Name in Polish. (default `""`) |
| `label` | string |  | Short label. (default `""`) |
| `summary` | string |  | What you get. (default `""`) |
| `summary_pl` | string |  | What you get, in Polish. (default `""`) |
| `includes` | array of string |  | What is included. (default `[]`) |
| `available` | boolean |  | Can be ordered now. (default `true`) |
| `price_usd` | number | tak | Price per phrase (USD). (read-only) |

### InviteCreate {#schema-invitecreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `role` | `"user"` |  | default `"user"` |
| `project_id` | string or null |  | Existing project (public id, prj_…) the tester joins as member; None = own personal organization |
| `send_email` | boolean |  | default `true` |

### InviteCreated {#schema-invitecreated}

Response to creating an invitation: `link` is shown once; `emailed` = the invitation was sent by e-mail.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `email` | string | tak |  |
| `role` | string | tak |  |
| `project_id` | string or null | tak |  |
| `created_at` | string (date-time) | tak |  |
| `expires_at` | string (date-time) | tak |  |
| `used_at` | string (date-time) or null |  |  |
| `revoked_at` | string (date-time) or null |  |  |
| `status` | [InviteStatus](#schema-invitestatus) | tak |  |
| `link` | string | tak |  |
| `emailed` | boolean |  | default `false` |

### InviteRead {#schema-inviteread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `email` | string | tak |  |
| `role` | string | tak |  |
| `project_id` | string or null | tak |  |
| `created_at` | string (date-time) | tak |  |
| `expires_at` | string (date-time) | tak |  |
| `used_at` | string (date-time) or null |  |  |
| `revoked_at` | string (date-time) or null |  |  |
| `status` | [InviteStatus](#schema-invitestatus) | tak |  |

### InviteStatus {#schema-invitestatus}

Typ: string; one of `"pending"`, `"used"`, `"expired"`, `"revoked"`

### InvoiceItem {#schema-invoiceitem}

Invoice for a top-up or package: number, state, public PDF link, amount paid.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `topup_id` | string | tak |  |
| `status` | string | tak |  |
| `number` | string or null |  |  |
| `pdf_url` | string or null |  |  |
| `correction_number` | string or null |  |  |
| `correction_pdf_url` | string or null |  |  |
| `amount_usd` | number | tak |  |
| `currency` | string |  | default `"USD"` |
| `issued_at` | string (date-time) or null |  |  |
| `kind` | string |  | default `"topup"` |

### JobAccepted {#schema-jobaccepted}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `job_id` | string | tak | Job id (`job_…`). |
| `status` | [JobStatus](#schema-jobstatus) | tak | Job status: `queued`, `running`, `done` (some items may have failed, see `failed`), `failed`, `pausing`, `paused`, `cancelling` or `cancelled`. |
| `partial` | [JobPartial](#schema-jobpartial) or null |  | Partial result; always null when the job is accepted |

### JobAction {#schema-jobaction}

Typ: string; one of `"pause"`, `"resume"`, `"cancel"`

### JobControlResult {#schema-jobcontrolresult}

Response of `POST /v1/jobs/{job_id}/pause`, `resume` and `cancel`. Repeating it is harmless: `changed` is false when the job was already in that state.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `job` | [JobRead](#schema-jobread) | tak | Job after the action. |
| `action` | [JobAction](#schema-jobaction) | tak | `pause`, `resume` or `cancel`. |
| `changed` | boolean | tak | False = no-op (already in that state) |

### JobCreate {#schema-jobcreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `modes` | array of [Category-Input](#schema-category-input) or null |  | Audit modes: spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing. |
| `items` | array of [IngestInput](#schema-ingestinput) | tak | Pages to check (`url`, `html` or `text`). (min items 1) |
| `targets` | object (map of object) or null |  | Optional target phrase per item: index -> `{query, market}`. |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `fix_plan` | boolean |  | Buy the site fix plan when the audit finishes (paid add-on: price per page that needs changes, no minimum, see pricing `fix_plan`); only with explain=true and confirmed findings. Not enough balance = no plan, the audit still finishes; you can buy it later with POST /v1/audits/{id}/fix-plan/order (default `false`) |
| `webhook_url` | string (uri) or null |  | We send a signed POST (HMAC-SHA256) here when the job ends. |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |

### JobItemResult {#schema-jobitemresult}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `index` | integer | tak | Position in `items` (0-based). |
| `report_id` | string or null |  | Report id (`rep_…`); null when the item failed. |
| `error` | string or null |  | Why the item failed: a fetch message (see `fetch_error`) or a code (`page_failed`). |
| `url` | string or null |  | Item URL; null for HTML/text input. |
| `name` | string or null |  |  |
| `rendered` | boolean |  | Fetched with JavaScript rendering (surcharge). (default `false`) |
| `fetch_error` | [FetchFailure](#schema-fetchfailure) or null |  | Fetch problem: kind and HTTP status. |
| `page_type_error` | boolean |  | Report exists but the page type is missing (can be retried with retry-failed). (default `false`) |
| `finished_at` | string (date-time) or null |  | When the item finished. |
| `fetch_s` | number or null |  | Fetch time in seconds. |
| `judge_started_at` | string (date-time) or null |  | When checking started. |
| `judge_s` | number or null |  | Checking time in seconds. |
| `fc` | integer |  | Fact check charge for this page in units of $0.0001 (search credits × 1.3; 0 when not checked, from stored results or with your own search key). The job charges at most the fact check amount reserved at the start. (default `0`) |

### JobPartial {#schema-jobpartial}

Set when a job finished with a partial result: pages checked of the total and why it stopped.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `checked` | integer | tak | Pages with a report |
| `total` | integer | tak | Pages in the job |
| `reason` | string |  | Why the job stopped early: timeout = job time limit reached; stall = no finished evaluation call for the stall window (one of `"timeout"`, `"stall"`; default `"timeout"`) |

### JobProgress {#schema-jobprogress}

Job progress: pages per stage, pages in progress, pace and estimated time to finish.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `stages` | object (map of integer) | tak | Number of pages in each stage. |
| `active` | array of [PageProgress](#schema-pageprogress) |  | Pages in progress (stage and checks done). |
| `rules_done` | integer |  | Checks done on pages in progress. (default `0`) |
| `rules_total` | integer |  | Checks planned on pages in progress. (default `0`) |
| `pages_per_min` | number or null |  | Recent pace. |
| `eta_seconds` | integer or null |  | Estimated seconds to finish; null = still measuring. |
| `others_busy` | boolean |  | Other jobs are running at the same time. (default `false`) |
| `updated_at` | string (date-time) or null |  | Last live update. |
| `calls_done` | number or null |  | Checks done (estimate). |
| `calls_total` | number or null |  | Checks planned. |
| `calls_per_min` | number or null |  | Checks per minute. |
| `percent` | integer or null |  | Share of rule checks (scoring calls) done; evidence and report writing come after 100 (phase `finishing`). None = no live data |
| `telemetry` | boolean |  | Live data available. (default `false`) |
| `phase` | string or null |  | `scoring`, `finishing` (evidence, saving) or `stale`. |
| `run_phase` | string or null |  | Site audit: fetch = pages are still being downloaded (pages already downloaded are checked at the same time), judge = all pages downloaded, only checking is left. None = single-phase job or no live data |
| `fetched` | integer or null |  | Pages downloaded or finished with a fetch error so far (audits that fetch first). |
| `fetch_total` | integer or null |  | Pages to download in the fetch phase (audits that fetch first). |

### JobRead {#schema-jobread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Job id (`job_…`). |
| `project_id` | string | tak | Project id (`prj_…`). |
| `created_by` | string (uuid) or null |  | User who created it; null for an API key. |
| `status` | [JobStatus](#schema-jobstatus) | tak | Job status: `queued`, `running`, `done` (some items may have failed, see `failed`), `failed`, `pausing`, `paused`, `cancelling` or `cancelled`. |
| `total` | integer | tak | Items in the job. |
| `done` | integer | tak | Items processed (with or without an error). |
| `failed` | integer | tak | Items without a report (not charged). |
| `report_ids` | array of string | tak | Report ids (`rep_…`) of finished items. |
| `errors` | array of [JobItemResult](#schema-jobitemresult) | tak | Failed items with the reason. |
| `error` | string or null |  | Why the whole job stopped; null otherwise. |
| `partial` | [JobPartial](#schema-jobpartial) or null |  | Set when the job finished with a partial result (status `done`): pages checked of the total; the remaining pages were not charged. Null otherwise. |
| `webhook_status` | integer or null |  | HTTP status of your webhook (0 = no connection). |
| `created_at` | string (date-time) | tak | Created. |
| `started_at` | string (date-time) or null |  | Started. |
| `finished_at` | string (date-time) or null |  | Finished. |
| `progress` | [JobProgress](#schema-jobprogress) or null |  | Live progress (pages per stage, pace, `eta_seconds`); only in `GET /v1/jobs/{job_id}`. |
| `paused_at` | string (date-time) or null |  | Start of the current pause; null when not paused |
| `refund_usd` | number or null |  | Amount returned to the balance if the job is cancelled now (unprocessed pages), in USD; null when finished. |
| `queue_eta` | [QueueEta](#schema-queueeta) or null |  | Estimated seconds to finish this job on each backend, from the last routing decision; null for jobs without a second backend |

### JobResultItem {#schema-jobresultitem}

One item of `GET /v1/jobs/{job_id}/results`. Full report: `GET /v1/reports/{report_id}`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `index` | integer | tak | Position in `items` (0-based). |
| `report_id` | string or null |  | Report id (`rep_…`); null when the item failed. |
| `error` | string or null |  | Why the item failed: a fetch message (see `fetch_error`) or a code (`page_failed`). |
| `url` | string or null |  | Item URL; null for HTML/text input. |
| `name` | string or null |  |  |
| `rendered` | boolean |  | Fetched with JavaScript rendering (surcharge). (default `false`) |
| `fetch_error` | [FetchFailure](#schema-fetchfailure) or null |  | Fetch problem: kind and HTTP status. |
| `page_type_error` | boolean |  | Report exists but the page type is missing (can be retried with retry-failed). (default `false`) |
| `finished_at` | string (date-time) or null |  | When the item finished. |
| `fetch_s` | number or null |  | Fetch time in seconds. |
| `judge_started_at` | string (date-time) or null |  | When checking started. |
| `judge_s` | number or null |  | Checking time in seconds. |
| `fc` | integer |  | Fact check charge for this page in units of $0.0001 (search credits × 1.3; 0 when not checked, from stored results or with your own search key). The job charges at most the fact check amount reserved at the start. (default `0`) |

### JobStatus {#schema-jobstatus}

Typ: string; one of `"queued"`, `"running"`, `"done"`, `"failed"`, `"pausing"`, `"paused"`, `"cancelling"`, `"cancelled"`

### JudgeReport {#schema-judgereport}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null | tak | Checked address (normalized); null for `html`/`text` input without a URL. |
| `profile` | [ProfileInfo](#schema-profileinfo) | tak | Version of the checks used for this report. |
| `extraction_ok` | boolean | tak | False when the main content could not be read well (results less reliable). |
| `truncated` | boolean | tak | True when the page was longer than the checked part. |
| `violations` | array of [RuleScore](#schema-rulescore) | tak | Spam policy checks (one entry per rule). A finding has a high `signal`. |
| `quality_signals` | array of [RuleScore](#schema-rulescore) | tak | Quality checks (Search Quality Rater Guidelines, Lowest/Low). |
| `labels` | array of [RuleScore](#schema-rulescore) |  | Neutral page labels (e.g. YMYL topic, payments, user content); not problems. (default `[]`) |
| `positives` | array of [RuleScore](#schema-rulescore) |  | Good signals (1 = present). (default `[]`) |
| `choices` | array of [RuleScore](#schema-rulescore) |  | Multiple-choice checks (e.g. page quality scale): `modal` option and `expected` position. (default `[]`) |
| `not_assessed` | array of object | tak | Rules that were not asked for this page, with the reason (e.g. no target phrase). |
| `intent` | object or null |  | Search intent fit for `query`; null without a target phrase. |
| `ai_ready` | object or null |  | AI Ready: structural conditions for AI answers in Google (snippet directives, data-nosnippet, robots.txt, Googlebot response, content without JavaScript, date). Each `conditions[]` item has `state` `met` \| `fix` \| `no_data` and a `reason` code. Null for pasted text or HTML without a URL. |
| `fetch` | object or null |  | How the page was fetched: `rendered` (JavaScript run, surcharge) and `js_shell`. |
| `report_lang` | string or null |  | Report language (`en` \| `pl`) chosen with the order. |
| `skipped` | array of string |  | Rules skipped on purpose (e.g. quality rules on utility pages). (default `[]`) |
| `source` | string or null |  |  |
| `name` | string or null |  |  |
| `chars_total` | integer or null |  |  |
| `chars_assessed` | integer or null |  |  |
| `not_applicable` | array of string |  | default `[]` |
| `app_version` | string or null |  | Service version that produced the report. |

### JudgeRequest {#schema-judgerequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `modes` | array of [Category-Input](#schema-category-input) or null |  | Audit modes: spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing. |
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `url` | string or null |  | Page address (http/https). Give at least one of `url`, `html` or `text`; with `html` the URL is kept as context and the page is not fetched. |
| `html` | string or null |  | Raw HTML of the page (no fetch, no fetch fee); wins over `url` as the content source. |
| `text` | string or null |  | Plain text of the page (no fetch; checks that need links or HTML are skipped). |
| `name` | string or null |  |  |
| `render_js` | string or null |  | Render JavaScript: true = always (+ render_js price, USD), false = never, auto = only after a block/empty shell (surcharge only when rendered); empty = project setting |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `query` | string or null |  | Target search phrase for the page (optional). Enables search intent checks; without it those checks are listed in `not_assessed`. |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |

### JudgeResponse {#schema-judgeresponse}

Response of `POST /v1/judge`: the page report plus the id and URL of the stored report.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null | tak | Checked address (normalized); null for `html`/`text` input without a URL. |
| `profile` | [ProfileInfo](#schema-profileinfo) | tak | Version of the checks used for this report. |
| `extraction_ok` | boolean | tak | False when the main content could not be read well (results less reliable). |
| `truncated` | boolean | tak | True when the page was longer than the checked part. |
| `violations` | array of [RuleScore](#schema-rulescore) | tak | Spam policy checks (one entry per rule). A finding has a high `signal`. |
| `quality_signals` | array of [RuleScore](#schema-rulescore) | tak | Quality checks (Search Quality Rater Guidelines, Lowest/Low). |
| `labels` | array of [RuleScore](#schema-rulescore) |  | Neutral page labels (e.g. YMYL topic, payments, user content); not problems. (default `[]`) |
| `positives` | array of [RuleScore](#schema-rulescore) |  | Good signals (1 = present). (default `[]`) |
| `choices` | array of [RuleScore](#schema-rulescore) |  | Multiple-choice checks (e.g. page quality scale): `modal` option and `expected` position. (default `[]`) |
| `not_assessed` | array of object | tak | Rules that were not asked for this page, with the reason (e.g. no target phrase). |
| `intent` | object or null |  | Search intent fit for `query`; null without a target phrase. |
| `ai_ready` | object or null |  | AI Ready: structural conditions for AI answers in Google (snippet directives, data-nosnippet, robots.txt, Googlebot response, content without JavaScript, date). Each `conditions[]` item has `state` `met` \| `fix` \| `no_data` and a `reason` code. Null for pasted text or HTML without a URL. |
| `fetch` | object or null |  | How the page was fetched: `rendered` (JavaScript run, surcharge) and `js_shell`. |
| `report_lang` | string or null |  | Report language (`en` \| `pl`) chosen with the order. |
| `skipped` | array of string |  | Rules skipped on purpose (e.g. quality rules on utility pages). (default `[]`) |
| `source` | string or null |  |  |
| `name` | string or null |  |  |
| `chars_total` | integer or null |  |  |
| `chars_assessed` | integer or null |  |  |
| `not_applicable` | array of string |  | default `[]` |
| `app_version` | string or null |  | Service version that produced the report. |
| `report_id` | string or null |  | Stored report id (`rep_…`): `GET /v1/reports/{report_id}`, fix plan, exports. |
| `report_url` | string or null |  | API path of the saved report: /v1/reports/{report_id} |

### KeyCheck {#schema-keycheck}

Result of a free key check (balance or credits left, no paid request).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ok` | boolean | tak |  |
| `balance_usd` | number or null |  |  |
| `credits_left` | integer or null |  |  |
| `error` | string or null |  |  |
| `message` | string or null |  |  |

### KeyRegister {#schema-keyregister}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 60 |
| `credential` | object | tak |  |

### KeyRename {#schema-keyrename}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 60 |

### LabelBatchRequest {#schema-labelbatchrequest}

`POST /v1/labels/batch`: many items as a background job; get the result with GET or a webhook. An invalid item does not reject the batch: it comes back as an item with `status: error` and an `error_code`, not charged.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `items` | array of [LabelInput](#schema-labelinput) | tak | 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 (min items 1; max items 1000) |
| `taxonomies` | array of string |  | min items 1; max items 2 |
| `project_id` | string or null |  |  |
| `render_js` | boolean or null |  | Default for items without their own render_js |
| `webhook_url` | string or null |  | https URL notified (signed POST, event `labels.finished`) when the batch finishes |

### LabelCancelResult {#schema-labelcancelresult}

Response of `POST /v1/labels/batch/{run_id}/cancel`: the run after cancelling; repeating it returns `changed` false.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `run` | [LabelRun](#schema-labelrun) | tak | The batch after the cancel |
| `changed` | boolean | tak | True when this call cancelled items; false when there was nothing left to cancel |

### LabelCompare {#schema-labelcompare}

Before = revision 0 (or the one you chose), after = the current one. `classifier_changed` = the classifier changed between revisions, so a difference may not come from your fix.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `before_rev` | integer | tak |  |
| `after_rev` | integer | tak |  |
| `taxonomies` | array of [TaxonomyChange](#schema-taxonomychange) |  |  |
| `classifier_changed` | boolean |  | The classifier was updated between the two checks, so part of the difference may come from that, not from your changes (default `false`) |

### LabelEstimate {#schema-labelestimate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `checks` | integer | tak |  |
| `estimated_usd` | [PriceRange](#schema-pricerange) | tak | Estimated price (USD): exact per-check price × checks, the same for batches and single calls |
| `price_per_check_usd` | [PriceRange](#schema-pricerange) | tak | Exact price per check in a batch (USD) |
| `price_per_single_call_usd` | [PriceRange](#schema-pricerange) | tak | Price per single `POST /v1/labels` call (USD): equal to `price_per_check_usd` |
| `model_per_check_usd` | [PriceRange](#schema-pricerange) | tak | Labeling part per check (USD): tokens × price per 1M tokens |
| `fetch_per_check_usd` | number |  | Fetch part per check (USD), `url` only (default `0.0`) |
| `render_per_check_usd` | number |  | JavaScript rendering part per check (USD), `render_js` only (default `0.0`) |
| `model_usd` | [PriceRange](#schema-pricerange) | tak | Labeling part for all checks (USD) |
| `fetch_usd` | number |  | Fetch part for all checks (USD) (default `0.0`) |
| `render_usd` | number |  | JavaScript rendering part for all checks (USD) (default `0.0`) |
| `rates` | [LabelRates](#schema-labelrates) | tak | Rates behind the parts |
| `hold_usd` | number | tak | Amount held when you start (maximum price), the unused part is returned |
| `document_tokens_per_check` | [PriceRange](#schema-pricerange) | tak | Secondary detail: estimated tokens per check |
| `per_1000_checks` | object (map of array of [SizePrice](#schema-sizeprice)) | tak | Price per 1000 checks by page size, keyed by number of taxonomies (`1`, `2`) |

### LabelEstimateRequest {#schema-labelestimaterequest}

`POST /v1/labels/estimate` (free): price estimate before you order. Without texts, typical page sizes are assumed.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `checks` | integer | tak | Number of pages or texts to label (min 1.0; max 1000000.0) |
| `taxonomies` | array of string |  | min items 1; max items 2 |
| `variant` | string |  | `document` = you send text or html, `url` = we fetch (one of `"document"`, `"url"`; default `"url"`) |
| `render_js` | boolean |  | URL only: price with JavaScript rendering (default `false`) |
| `avg_chars` | integer or null |  | Average text length in characters |
| `samples` | array of string |  | Up to 20 sample texts (not stored) (max items 20) |

### LabelInput {#schema-labelinput}

One item: exactly one of `url` (we fetch the page), `html` (a page you already have, processed as if fetched) or `text`. `ref` = your own id.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null |  | Page address: we fetch it (+fetch price per check) |
| `html` | string or null |  | 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) |
| `text` | string or null |  | Plain text or Markdown (up to 50,000 characters), no fetch |
| `source_url` | string or null |  | 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 |
| `ref` | string or null |  | Your own id for this item, echoed back in results |
| `render_js` | boolean or null |  | 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. |

### LabelRates {#schema-labelrates}

Stawki Labelera pokazywane klientowi osobno: model, pobranie, render; USD.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `model_per_1m_tokens_per_taxonomy` | number | tak | Labeling: USD per 1M document tokens, per taxonomy |
| `fetch_per_url` | number | tak | Page fetch: USD per URL we fetch |
| `render_per_url` | number | tak | JavaScript rendering: USD per page rendered (only `render_js: true`) |

### LabelRecheck {#schema-labelrecheck}

Response of the recheck: the new revision (result at once) and the comparison with revision 0.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `revision` | [LabelRevision](#schema-labelrevision) | tak |  |
| `compare` | [LabelCompare](#schema-labelcompare) or null |  |  |

### LabelRecheckRequest {#schema-labelrecheckrequest}

`POST /v1/labels/{run_id}/items/{index}/recheck`: an empty body fetches the item's URL again. `html` or `text` = a new version of the page (e.g. a draft), not fetched. `targets` = target categories to compare in the response (not stored).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `html` | string or null |  | New page HTML (e.g. a draft before publishing). Without html and text we fetch the item's URL again |
| `text` | string or null |  | New plain text or Markdown of the page |
| `source_url` | string or null |  | 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 |
| `targets` | object (map of string) |  | Intended category per taxonomy (IAB: unique id, Google: full path) for the before/after comparison |

### LabelRequest {#schema-labelrequest}

`POST /v1/labels`: one page or text, result returned at once.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string or null |  | Page address: we fetch it (+fetch price per check) |
| `html` | string or null |  | 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) |
| `text` | string or null |  | Plain text or Markdown (up to 50,000 characters), no fetch |
| `source_url` | string or null |  | 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 |
| `ref` | string or null |  | Your own id for this item, echoed back in results |
| `render_js` | boolean or null |  | 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. |
| `taxonomies` | array of string |  | min items 1; max items 2 |
| `project_id` | string or null |  |  |

### LabelResult {#schema-labelresult}

Result of one item. `labels` only for taxonomies that succeeded; `failed` = taxonomies without a result (not charged).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `index` | integer |  | default `0` |
| `ref` | string or null |  |  |
| `url` | string or null |  |  |
| `variant` | string |  | Price variant: `document` (you sent text or html, no fetch) or `url` (we fetched the page) (one of `"document"`, `"url"`; default `"url"`) |
| `status` | string |  | one of `"pending"`, `"ok"`, `"partial"`, `"error"`, `"cancelled"`; default `"pending"` |
| `error` | string or null |  |  |
| `error_code` | string or null |  | 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 |
| `rendered` | boolean |  | default `false` |
| `low_content` | boolean |  | Less than about 600 characters of readable text: labels are less reliable (below 100 characters the item fails with no charge) (default `false`) |
| `labels` | object (map of [TaxonomyLabels](#schema-taxonomylabels)) |  |  |
| `failed` | array of string |  |  |
| `charged_usd` | number or null |  | 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 |
| `model_usd` | number or null |  | Part of `charged_usd` for labeling: document tokens × the price per 1M tokens per taxonomy; null until finished |
| `fetch_usd` | number or null |  | Part of `charged_usd` for fetching the page (`url` only); null until finished |
| `render_usd` | number or null |  | Part of `charged_usd` for JavaScript rendering (only when the page was rendered); null until finished |
| `document_tokens` | integer or null |  | Secondary detail: document tokens billed for this check, summed over successful taxonomies; null until finished |
| `run_id` | string or null |  | 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 |

### LabelRevision {#schema-labelrevision}

One check of a page: revision 0 = the original result, 1 and later = rechecks (`lrv_…`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rev` | integer | tak | 0 = the original check, 1, 2, ... = rechecks (min 0.0) |
| `revision_id` | string or null |  | Recheck id (`lrv_…`); null for the original check |
| `run_id` | string or null |  | Run of this check (`lbl_…`); null when the recheck did not start |
| `index` | integer | tak | Item index in `run_id` |
| `status` | string | tak | `checking`, `done` (labels ready) or `failed` (the previous result stays current) (one of `"checking"`, `"done"`, `"failed"`) |
| `source` | string |  | `url` = fetched by us, `document` = html or text you sent (one of `"url"`, `"document"`; default `"url"`) |
| `free` | boolean |  | True = this recheck was not charged (default `false`) |
| `checked_at` | string (date-time) | tak |  |
| `charged_usd` | number or null |  |  |
| `error` | string or null |  |  |
| `result` | [LabelResult](#schema-labelresult) or null |  |  |

### LabelRevisions {#schema-labelrevisions}

`GET /v1/labels/{run_id}/items/{index}/revisions`: check history of a page and a before/after comparison.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `run_id` | string | tak | Run of the original check |
| `index` | integer | tak |  |
| `url` | string or null |  |  |
| `current_rev` | integer | tak | Latest revision with labels (0 = the original check) |
| `revisions` | array of [LabelRevision](#schema-labelrevision) |  |  |
| `compare` | [LabelCompare](#schema-labelcompare) or null |  | Original check vs the current one; null without rechecks |
| `next_check_free` | boolean |  | The next recheck of this page is free (default `false`) |
| `next_check_max_usd` | number |  | Most the next recheck can cost (USD); you pay the actual price, never more (default `0.0`) |

### LabelRun {#schema-labelrun}

A label run (`lbl_…`): a single call or a batch. `price_usd` = reserved, `charged_usd` = charged (failed items, taxonomies and rendering that did not run are refunded).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `status` | string | tak | one of `"queued"`, `"running"`, `"cancelling"`, `"done"`, `"partial"`, `"failed"`, `"cancelled"` |
| `batch` | boolean |  | default `false` |
| `project_id` | string or null |  |  |
| `taxonomies` | array of string | tak |  |
| `created_at` | string (date-time) | tak |  |
| `finished_at` | string (date-time) or null |  |  |
| `total` | integer | tak |  |
| `done` | integer |  | Items finished with a result or an error (cancelled items not included) (default `0`) |
| `errors` | integer |  | default `0` |
| `cancelled` | integer |  | Items cancelled before they started: not run and not charged (default `0`) |
| `price_usd` | number |  | Amount held for the batch (USD): the maximum price of every check (default `0.0`) |
| `estimated_usd` | number or null |  | Estimated price (USD) for typical page sizes; you pay the actual price, never more than `price_usd` |
| `charged_usd` | number or null |  | Price of the run (USD): exact sum of item prices. The balance moves in $0.0001 steps; fractions are carried to your next charge |
| `model_usd` | number or null |  | Labeling part of `charged_usd` (sum of items) |
| `fetch_usd` | number or null |  | Page fetch part of `charged_usd` (sum of items) |
| `render_usd` | number or null |  | JavaScript rendering part of `charged_usd` (sum of items) |
| `items` | array of [LabelResult](#schema-labelresult) |  |  |
| `error` | string or null |  |  |

### LeadAccepted {#schema-leadaccepted}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ok` | boolean |  | default `true` |

### LeadCreate {#schema-leadcreate}

Website form input. `hp` is a honeypot field hidden from people: when filled, the response is 202 and nothing is stored.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `type` | string | tak | one of `"beta"`, `"sales"` |
| `email` | string (email) | tak |  |
| `name` | string or null |  |  |
| `company` | string or null |  |  |
| `message` | string or null |  |  |
| `website` | string or null |  |  |
| `role` | string or null |  |  |
| `locale` | string |  | one of `"en"`, `"pl"`; default `"en"` |
| `consent` | boolean | tak | Consent to store your e-mail (privacy policy); must be true. |
| `hp` | string or null |  |  |

### LeakAccepted {#schema-leakaccepted}

Always the same response, so it does not reveal whether a key existed.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `received` | integer | tak |  |

### LeakReport {#schema-leakreport}

Report of published API keys (secret scanner, researcher). Matching keys are revoked at once.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `keys` | array of string | tak | min items 1; max items 100 |
| `source_url` | string or null |  |  |

### LedgerPage {#schema-ledgerpage}

Balance history window [`from_day`, `to_day`), newest first; next page with `?before=<next_before>`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `entries` | array of [BalanceEntry](#schema-balanceentry) | tak |  |
| `from_day` | string | tak |  |
| `to_day` | string | tak |  |
| `next_before` | string or null |  |  |

### LevelCount {#schema-levelcount}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `label` | string | tak |  |
| `count` | integer | tak |  |

### LinkGraph {#schema-linkgraph}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ver` | string |  | default `"g4"` |
| `content` | string |  | one of `"ok"`, `"unknown"`; default `"ok"` |
| `reason` | string |  | one of `""`, `"no_navdetect"`, `"no_content_links"`; default `""` |
| `pages` | integer |  | default `0` |
| `nodes` | integer |  | default `0` |
| `edges` | integer |  | default `0` |
| `truncated` | boolean |  | default `false` |
| `home` | string |  | default `""` |
| `avg_out` | number |  | default `0.0` |
| `orphan_count` | integer |  | default `0` |
| `orphans` | array of [NodeStat](#schema-nodestat) |  | default `[]` |
| `hubs` | array of [NodeStat](#schema-nodestat) |  | default `[]` |
| `linked` | array of [NodeStat](#schema-nodestat) |  | default `[]` |
| `depth_hist` | object (map of integer) |  | default `{}` |
| `broken_count` | integer |  | default `0` |
| `broken` | array of [BrokenLink](#schema-brokenlink) |  | default `[]` |
| `graph_clusters` | integer |  | default `0` |
| `purity` | number or null |  |  |
| `mismatches` | array of [TopicMismatch](#schema-topicmismatch) |  | default `[]` |
| `matrix` | [ClusterMatrix](#schema-clustermatrix) or null |  |  |
| `redirects_known` | boolean |  | default `false` |

### MagicLinkAccepted {#schema-magiclinkaccepted}

Always 202 with the same body, so it does not reveal whether the e-mail has an account.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | `"sent"` |  | default `"sent"` |
| `message` | string | tak |  |

### MagicLinkRequest {#schema-magiclinkrequest}

`POST /v1/auth/magic-link`. `next` = local path to open after sign-in.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `next` | string |  | default `"/"` |

### MeKey {#schema-mekey}

The API key used for this call (no secret): id, name, owner type, masked value, expiry, rate limit.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `name` | string | tak |  |
| `owner_type` | string | tak |  |
| `display` | string | tak |  |
| `expires_at` | string (date-time) or null |  |  |
| `rate_limit` | integer or null |  |  |

### MeOrg {#schema-meorg}

The current organization and the role the caller acts with.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `name` | string | tak |  |
| `my_role` | string or null |  |  |

### MeProject {#schema-meproject}

The project a project API key is bound to.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `name` | string | tak |  |

### MeRead {#schema-meread}

The caller: kind, user, API key, organization with role, the key's project, scopes and balance.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | one of `"user"`, `"api_key"` |
| `user` | [MeUser](#schema-meuser) or null |  |  |
| `key` | [MeKey](#schema-mekey) or null |  |  |
| `org` | [MeOrg](#schema-meorg) or null |  |  |
| `project` | [MeProject](#schema-meproject) or null |  |  |
| `scopes` | array of string or null |  |  |
| `balance` | [Balance](#schema-balance) or null |  |  |

### MeUser {#schema-meuser}

The signed-in user or the owner of a user API key.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `email` | string or null |  |  |

### MemberAdd {#schema-memberadd}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `role` | [ProjectRole](#schema-projectrole) |  | default `"member"` |

### MemberRead {#schema-memberread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `user_id` | string (uuid) | tak |  |
| `email` | string or null |  |  |
| `role` | [ProjectRole](#schema-projectrole) | tak |  |

### MetricValue {#schema-metricvalue}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `metric` | string | tak | one of `"lcp"`, `"inp"`, `"cls"`, `"fcp"`, `"ttfb"` |
| `p75` | number | tak | 75th percentile of real Chrome visits: milliseconds (CLS: unitless score) |
| `good` | number | tak | Share of visits in the Google 'good' bucket, 0-1 |
| `needs_improvement` | number | tak | Share of visits in the 'needs improvement' bucket, 0-1 |
| `poor` | number | tak | Share of visits in the 'poor' bucket, 0-1 |
| `rating` | string | tak | Rating of p75 by Google thresholds, computed by code (one of `"good"`, `"needs_improvement"`, `"poor"`) |

### MfaMethods {#schema-mfamethods}

Second-step methods of the account. Preferred order at sign-in: security key, authenticator app, e-mail.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `keys` | integer |  | default `0` |
| `hardware_keys` | integer |  | default `0` |
| `totp` | boolean |  | default `false` |
| `email` | boolean |  | default `false` |
| `backup_left` | integer |  | default `0` |

### MfaRead {#schema-mfaread}

Two-step sign-in settings of your account.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `methods` | [MfaMethods](#schema-mfamethods) | tak |  |
| `keys` | array of [SecurityKeyRead](#schema-securitykeyread) |  | default `[]` |
| `reauth` | array of string |  | default `[]` |
| `reauth_fresh` | boolean |  | default `false` |
| `superadmin` | boolean |  | default `false` |
| `stepup` | array of string |  | default `[]` |

### MonthPoint {#schema-monthpoint}

One month of organic visibility history (or the current state).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `year` | integer | tak |  |
| `month` | integer | tak |  |
| `top3` | integer |  | default `0` |
| `top10` | integer |  | default `0` |
| `top50` | integer |  | default `0` |
| `count` | integer |  | default `0` |
| `etv` | number |  | default `0.0` |

### NodeStat {#schema-nodestat}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak |  |
| `id` | string |  | default `""` |
| `sampled` | boolean |  | default `false` |
| `status` | string |  | one of `"ok"`, `"missing"`, `"error"`, `"unchecked"`; default `"unchecked"` |
| `http_status` | integer or null |  |  |
| `inlinks` | integer |  | default `0` |
| `outlinks` | integer |  | default `0` |
| `depth` | integer or null |  |  |
| `topic_label` | string |  | default `""` |

### NoticeLevel {#schema-noticelevel}

Typ: string; one of `"info"`, `"warning"`, `"outage"`

### OffsiteRedirectItem {#schema-offsiteredirectitem}

A sampled address that redirects to another domain (not checked).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak | Address from the sample (private project: host only) |
| `target` | string | tak | Host of the other site the address ends on |
| `chain` | array of object |  | Redirect chain [{url, status, via}]: 3xx status per hop, `via=meta_refresh` for an HTML meta refresh, status null = unknown |
| `state` | string or null |  | ok \| partial (fetch provider reported only the final address) \| loop \| too_long |

### OffsiteRedirects {#schema-offsiteredirects}

Information for the site: addresses that redirect to other domains (no signal strength).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `count` | integer | tak |  |
| `items` | array of [OffsiteRedirectItem](#schema-offsiteredirectitem) |  | Up to 500 addresses; `count` is the full number |

### OrgCreate {#schema-orgcreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 200 |

### OrgMemberAdd {#schema-orgmemberadd}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `role` | [OrgRole](#schema-orgrole) |  | default `"member"` |

### OrgMemberRead {#schema-orgmemberread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `user_id` | string (uuid) | tak |  |
| `email` | string or null |  |  |
| `role` | [OrgRole](#schema-orgrole) | tak |  |
| `created_at` | string (date-time) or null |  |  |

### OrgMemberUpdate {#schema-orgmemberupdate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `role` | [OrgRole](#schema-orgrole) | tak |  |

### OrgRead {#schema-orgread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `name` | string | tak |  |
| `slug` | string | tak |  |
| `status` | [OrgStatus](#schema-orgstatus) | tak |  |
| `plan` | string | tak |  |
| `created_at` | string (date-time) | tak |  |
| `my_role` | [OrgRole](#schema-orgrole) or null |  |  |

### OrgRole {#schema-orgrole}

Typ: string; one of `"owner"`, `"admin"`, `"member"`, `"viewer"`

### OrgStatus {#schema-orgstatus}

Typ: string; one of `"active"`, `"suspended"`, `"closed"`

### OwnerType {#schema-ownertype}

Owner of an API key. Access = key scopes limited by the owner's current permissions.

Typ: string; one of `"project"`, `"user"`, `"org"`

### PageCategories {#schema-pagecategories}

One page: category paths in both taxonomies (the first one is the main path).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string |  | default `""` |
| `url` | string or null |  |  |
| `title` | string |  | default `""` |
| `group` | string or null |  |  |
| `iab` | array of [gspamjudge__features__topics__contracts__CategoryPath](#schema-gspamjudge-features-topics-contracts-categorypath) |  | default `[]` |
| `google` | array of [gspamjudge__features__topics__contracts__CategoryPath](#schema-gspamjudge-features-topics-contracts-categorypath) |  | default `[]` |
| `error` | string or null |  |  |
| `iab_error` | string or null |  |  |
| `google_error` | string or null |  |  |
| `iab_ver` | string or null |  |  |
| `iab_fallback` | string or null |  |  |
| `unreliable` | integer |  | default `0` |

### PageCompare {#schema-pagecompare}

Comparison of two revisions of a page (before = earlier, after = later). `rules` = rules with a finding in either of them (fixed, still, new), strongest after first. `version_changed` = the checks changed between the reports, so a difference may not come from your fix.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `before_report_id` | string | tak |  |
| `after_report_id` | string | tak |  |
| `before_rev` | integer | tak |  |
| `after_rev` | integer | tak |  |
| `rules` | array of [RuleCompare](#schema-rulecompare) |  |  |
| `fixed` | integer |  | default `0` |
| `still` | integer |  | default `0` |
| `new` | integer |  | default `0` |
| `unchecked` | integer |  | default `0` |
| `version_changed` | boolean |  | default `false` |

### PageContext {#schema-pagecontext}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string |  | default `""` |
| `url` | string or null |  |  |
| `title` | string |  | default `""` |
| `kind` | string |  | one of `"content"`, `"hub"`, `"home"`; default `"content"` |
| `h1_known` | boolean |  | default `false` |
| `meta_known` | boolean |  | default `false` |
| `pairs` | array of [PairScore](#schema-pairscore) |  | default `[]` |
| `headings` | array of [HeadingScore](#schema-headingscore) |  | default `[]` |
| `coherence` | integer or null |  |  |
| `site_signal` | integer or null |  |  |
| `facts` | array of string |  | default `[]` |
| `low` | integer |  | default `0` |
| `error` | string or null |  |  |

### PageExtras {#schema-pageextras}

Add-ons of a page report; null = not ordered.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string or null |  |  |
| `job_id` | string | tak |  |
| `categories` | [CategoriesExtra](#schema-categoriesextra) or null |  |  |
| `context` | [ContextExtra](#schema-contextextra) or null |  |  |

### PageFacts {#schema-pagefacts}

One page (a top result or yours). `ok` false = not downloaded (`error` gives a short reason).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak |  |
| `rank` | integer or null |  |  |
| `aio_source` | boolean |  | 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` | string |  | default `""` |
| `title` | string |  | default `""` |
| `ok` | boolean |  | default `true` |
| `error` | string or null |  |  |
| `unread` | string or null |  | 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 |
| `words` | integer or null |  |  |
| `elements` | object (map of integer) |  | default `{}` |
| `outline` | array of string |  | default `[]` |
| `text` | string |  | default `""` |
| `met` | array of integer or null |  | default `[]` |
| `categories` | object or null |  |  |

### PageFindings {#schema-pagefindings}

A page with potential violations: only rules at or above medium, with the rule description and evidence.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak |  |
| `url` | string or null | tak |  |
| `name` | string or null |  |  |
| `pattern` | string or null |  |  |
| `level` | string | tak |  |
| `quality_level` | string | tak |  |
| `helpful_level` | string |  | default `"unknown"` |
| `top_rule` | string or null |  |  |
| `review` | integer |  | default `0` |
| `page_kind` | string or null |  |  |
| `page_type` | string or null |  |  |
| `near_rules` | array of string |  | default `[]` |
| `near_signals` | array of integer |  | default `[]` |
| `language` | string or null |  |  |
| `sponsored` | integer or null |  |  |
| `sponsored_signal` | integer or null |  | Signal strength 0-100 of the shown `sponsored` result (not a probability): for 1 - that the page is a paid publication, for 0 - that it is not (low on a page to check: the model leaned to 1 but no verified quote was found); null outside the estimate and when the result comes from your answer |
| `sponsored_status` | string or null |  | Result of a content page: sponsored, editorial, or check (the model answered 1 but no verified quote was found - left out of the share until you answer); null outside the estimate |
| `sponsored_marked` | boolean |  | True when `sponsored` and `sponsored_status` come from your own answer (POST /v1/reports/{id}/feedback, label yes / no) (default `false`) |
| `spam` | array of [RuleView](#schema-ruleview) |  | default `[]` |
| `quality` | array of [RuleView](#schema-ruleview) |  | default `[]` |
| `helpful` | array of [RuleView](#schema-ruleview) |  | default `[]` |
| `review_rules` | array of [RuleView](#schema-ruleview) |  | default `[]` |
| `top_signal` | integer or null |  | Signal strength 0-100 (null when not scored); a ranking, not a probability. |
| `top_signal_level` | string |  | `high` (80+), `medium` (50-79), `low` (below 50); empty when not scored. (one of `"high"`, `"medium"`, `"low"`, `""`) |

### PageItem {#schema-pageitem}

Imported page: with `html` the page is checked from that HTML without fetching; without it the page is fetched.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak | Page address. |
| `html` | string or null |  | Page HTML; when given, the page is checked without fetching. |
| `query` | string or null |  | Target phrase of the page (CSV column `query`). |
| `market` | string or null |  | Market of the phrase, e.g. `en-US` (CSV column `market`). |
| `render_js` | string or null |  | JavaScript rendering for this page: `on`, `off` or `auto` (CSV column `render_js`); empty = the audit setting. |

### PageProgress {#schema-pageprogress}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `index` | integer | tak |  |
| `stage` | [PageStage](#schema-pagestage) | tak |  |
| `rules_done` | integer or null |  |  |
| `rules_total` | integer or null |  |  |

### PageRadius {#schema-pageradius}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string |  | default `""` |
| `url` | string or null |  |  |
| `title` | string |  | default `""` |
| `radius` | number | tak |  |
| `cluster` | integer |  | default `-1` |
| `map_cluster` | integer or null |  |  |
| `cluster_radius` | number or null |  |  |
| `anchor_radius` | number or null |  |  |
| `anchor` | integer or null |  |  |
| `home` | boolean |  | default `false` |

### PageRecheckAccepted {#schema-pagerecheckaccepted}

202 after "Check my fixes": the new revision is accepted and the amount is reserved (USD). status waiting = in your organization's queue (job_id null), queued = the check has started.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `revision_id` | string | tak |  |
| `audit_id` | string | tak | Audit public id (aud_…) |
| `index` | integer | tak |  |
| `rev` | integer | tak |  |
| `status` | [RevisionStatus](#schema-revisionstatus) |  | waiting = in your organization's queue (up to 5 checks run at once, the next one starts when one finishes); queued = the check has started (default `"queued"`) |
| `job_id` | string or null |  | Single-page job (job_…); its result becomes the page's newest revision. null while the revision is waiting - poll the revisions endpoint |
| `reserved_usd` | number | tak | Amount held for this check; unused part returns after the job (USD) |

### PageRecheckBatch {#schema-pagerecheckbatch}

Page indexes of one audit to check again after your fixes (Check my fixes for many pages).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `indexes` | array of integer | tak | Page indexes in the audit job (`index` of job results, `page_revisions[...].index`); duplicates are ignored. Up to 200 pages (min items 1; max items 200) |

### PageRecheckBatchAccepted {#schema-pagerecheckbatchaccepted}

202 for a batch: accepted revisions in input order and refused pages with an error code.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `accepted` | array of [PageRecheckAccepted](#schema-pagerecheckaccepted) |  |  |
| `refused` | array of [PageRecheckRefused](#schema-pagerecheckrefused) |  |  |
| `reserved_usd` | number |  | Sum held for the accepted checks (USD) (default `0.0`) |

### PageRecheckRefused {#schema-pagerecheckrefused}

A page refused in a batch, with the same error code and message as the single-page endpoint.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `index` | integer | tak |  |
| `code` | string | tak | Same code as the single-page endpoint, e.g. recheck_cooldown, page_check_running, page_not_recheckable, recheck_daily_limit, quota_exceeded |
| `message` | string | tak |  |

### PageRevision {#schema-pagerevision}

One revision of an audit page.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Revision id (rvs_…) |
| `index` | integer | tak | Page index in the audit job (stable for the page) |
| `rev` | integer | tak | Revision number: 1, 2, … (0 = the original audit result, not listed) |
| `status` | [RevisionStatus](#schema-revisionstatus) | tak |  |
| `report_id` | string or null |  | New page report (rep_…) when status is done |
| `previous_report_id` | string | tak | Report this revision replaces (before) |
| `job_id` | string or null |  | Single-page job of this revision (job_…) |
| `error` | string or null |  | Why the revision failed; the page keeps its previous result |
| `charged` | boolean |  | False = free revision (owner setting) (default `true`) |
| `created_at` | string (date-time) | tak |  |
| `finished_at` | string (date-time) or null |  |  |

### PageRevisionMark {#schema-pagerevisionmark}

Short revision marker of a page in an audit, without the comparison.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `index` | integer | tak |  |
| `rev` | integer | tak |  |
| `at` | string (date-time) or null |  |  |
| `previous_report_id` | string or null |  |  |
| `live` | boolean |  | default `false` |
| `waiting` | boolean |  | default `false` |

### PageRevisions {#schema-pagerevisions}

Revision history of a page and a comparison of the current revision with revision 0.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `audit_id` | string | tak |  |
| `index` | integer | tak |  |
| `url` | string or null |  |  |
| `current_report_id` | string or null |  |  |
| `current_rev` | integer |  | default `0` |
| `live` | boolean |  | A check of this page is waiting, queued or running (default `false`) |
| `waiting` | boolean |  | The check waits in your organization's queue and has not started yet (default `false`) |
| `revisions` | array of [PageRevision](#schema-pagerevision) |  |  |
| `compare` | [PageCompare](#schema-pagecompare) or null |  | Original result (revision 0) vs the newest revision |
| `next_check_free` | boolean |  | The next Check my fixes of this page is free: the first check of each page costs nothing, later checks cost one page of this audit type (default `false`) |
| `next_check_usd` | number or null |  | Price of the next check in USD (0 when free); null = unknown |

### PageRisk {#schema-pagerisk}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak |  |
| `url` | string or null | tak |  |
| `name` | string or null |  |  |
| `pattern` | string or null |  |  |
| `level` | string | tak |  |
| `quality_level` | string | tak |  |
| `helpful_level` | string |  | default `"unknown"` |
| `top_rule` | string or null |  |  |
| `review` | integer |  | default `0` |
| `page_kind` | string or null |  |  |
| `page_type` | string or null |  |  |
| `near_rules` | array of string |  | default `[]` |
| `near_signals` | array of integer |  | default `[]` |
| `language` | string or null |  |  |
| `sponsored` | integer or null |  |  |
| `sponsored_signal` | integer or null |  | Signal strength 0-100 of the shown `sponsored` result (not a probability): for 1 - that the page is a paid publication, for 0 - that it is not (low on a page to check: the model leaned to 1 but no verified quote was found); null outside the estimate and when the result comes from your answer |
| `sponsored_status` | string or null |  | Result of a content page: sponsored, editorial, or check (the model answered 1 but no verified quote was found - left out of the share until you answer); null outside the estimate |
| `sponsored_marked` | boolean |  | True when `sponsored` and `sponsored_status` come from your own answer (POST /v1/reports/{id}/feedback, label yes / no) (default `false`) |
| `top_signal` | integer or null |  | Signal strength 0-100 (null when not scored); a ranking, not a probability. |
| `top_signal_level` | string |  | `high` (80+), `medium` (50-79), `low` (below 50); empty when not scored. (one of `"high"`, `"medium"`, `"low"`, `""`) |

### PageScopeInfo {#schema-pagescopeinfo}

What the page analysis covered: pages you asked for, pages taken, search results and results skipped by your
domain filter. Present only when the order set `top_pages` or a domain list. `analyzed` 0 = your filter excluded
all top pages.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `requested` | integer | tak | Pages you asked for (10 = every organic result when you set only domains) |
| `analyzed` | integer | tak | Pages taken for the analysis: fewer than requested when the domain filter left fewer results |
| `results` | integer | tak | Organic results with an address in the search results |
| `filtered` | integer |  | Results skipped by your domain filter (default `0`) |
| `include_domains` | array of string |  | default `[]` |
| `exclude_domains` | array of string |  | default `[]` |

### PageStage {#schema-pagestage}

Stage of a page in a job.

Typ: string; one of `"queued"`, `"fetching"`, `"judging"`, `"evidence"`, `"done"`, `"error"`

### PageTierPrice {#schema-pagetierprice}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Tier id: `lite`, `basic` or `premium` (kept stable; the name describes the scope). (one of `"lite"`, `"basic"`, `"premium"`) |
| `name` | string | tak | Name. |
| `name_pl` | string | tak | Name in Polish. |
| `rules` | string | tak | Rules included. (one of `"quick"`, `"binary"`, `"all"`) |
| `steps` | array of `"evidence"` |  | Steps included (e.g. evidence). (default `[]`) |
| `extra` | string or null |  | Extras. |
| `summary` | string |  | What it includes. (default `""`) |
| `summary_pl` | string |  | What it includes, in Polish. (default `""`) |
| `price_usd` | number | tak | Price per page at this scope for all three audit types (USD) |

### PageVector {#schema-pagevector}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `dims` | integer | tak |  |
| `space` | string | tak | Stable id of the embedding space (`emb_…`); vectors with different `space` are not comparable, even with the same `dims` |
| `values` | array of number | tak |  |

### PairScore {#schema-pairscore}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pair` | string | tak |  |
| `cos` | number | tak |  |
| `signal` | integer | tak |  |
| `low` | boolean |  | default `false` |

### PasswordChange {#schema-passwordchange}

`POST /v1/account/password`: changing the password requires the current one.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `current_password` | string | tak | max length 256 |
| `new_password` | string | tak | max length 256 |

### PatternPreview {#schema-patternpreview}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pattern` | string | tak | URL pattern (`<slug>`, `<n>` stand for variable parts). |
| `count` | integer | tak | URLs with this pattern. |
| `lastmod_min` | string or null |  | Oldest sitemap lastmod. |
| `lastmod_max` | string or null |  | Newest sitemap lastmod. |
| `samples` | array of string | tak | Example URLs. |

### PatternRisk {#schema-patternrisk}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pattern` | string | tak |  |
| `in_sitemap` | integer or null |  |  |
| `sampled` | integer |  | default `0` |
| `capped` | integer or null |  |  |
| `flagged` | integer | tak |  |
| `level` | string | tak |  |
| `top_rule` | string or null |  |  |
| `top_signal` | integer or null |  | Signal strength 0-100 (null when not scored); a ranking, not a probability. |
| `top_signal_level` | string |  | `high` (80+), `medium` (50-79), `low` (below 50); empty when not scored. (one of `"high"`, `"medium"`, `"low"`, `""`) |

### PatternScale {#schema-patternscale}

Page Quality per URL pattern.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pattern` | string | tak |  |
| `pages` | integer | tak |  |
| `bars` | array of [ChoiceBar](#schema-choicebar) | tak |  |
| `modal_label` | string | tak |  |
| `concern_pages` | integer | tak |  |

### PatternStat {#schema-patternstat}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pattern` | string | tak |  |
| `in_sitemap` | integer or null |  |  |
| `sampled` | integer |  | default `0` |
| `capped` | integer or null |  |  |

### Pending {#schema-pending}

Body of a 202 response: the resource is still being prepared; repeat `GET url` after `retry_after_s` seconds.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | [ExportStatus](#schema-exportstatus) |  | `pending` while the file is being prepared. (default `"pending"`) |
| `retry_after_s` | integer | tak | Seconds to wait before polling `url` again (same value as the Retry-After header) |
| `url` | string | tak | URL to poll (this request's path with the recognised export parameters `lang` and `detail`) |
| `retry_after` | integer | tak | Deprecated alias of `retry_after_s` (kept for existing clients) |

### Plan {#schema-plan}

Organization plan and its limits. Null limit = no limit.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Plan id. |
| `name` | string | tak | Plan name. |
| `price_usd` | number or null |  | Monthly price (USD); null = free or custom. |
| `payg` | boolean |  | Pay-as-you-go balance can be bought. (default `false`) |
| `projects_max` | integer or null |  | Max projects; null = no limit. |
| `seats_max` | integer or null |  | Max members. |
| `api_keys_max` | integer or null |  | Max API keys. |
| `audit_pages_max` | integer or null |  | Max pages per audit. |
| `limit_month_usd` | number or null | tak | Monthly plan pool (USD); null = no limit. (read-only) |
| `limit_day_usd` | number or null | tak | Daily spending limit (USD); null = none. (read-only) |

### PolicyRisk {#schema-policyrisk}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `policy` | string | tak |  |
| `layer` | string | tak |  |
| `category` | string |  | default `""` |
| `pages_flagged` | integer | tak |  |
| `pages_scored` | integer | tak |  |
| `share` | number | tak |  |
| `max_signal` | integer or null | tak | Signal strength 0-100 (null when not scored); a ranking, not a probability. |
| `max_signal_level` | string |  | `high` (80+), `medium` (50-79), `low` (below 50); empty when not scored. (one of `"high"`, `"medium"`, `"low"`, `""`) |

### PriceFreeze {#schema-pricefreeze}

Price list the organization pays by. A paid top-up or package keeps the prices of its day until the next top-up;
when a current price is lower, the lower one applies.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `version` | string | tak | Price list version the organization pays by. |
| `current_version` | string | tak | Current price list version. |
| `frozen_at` | string (date-time) or null |  | Time (UTC) of the paid top-up that set the prices; null = current price list. |
| `frozen` | boolean | tak | True when the organization pays the prices of its last top-up (lower of the frozen and current price per item). (read-only) |

### PriceRange {#schema-pricerange}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `low` | number | tak |  |
| `typical` | number | tak |  |
| `high` | number | tak |  |

### ProfileInfo {#schema-profileinfo}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `prompt_ver` | string | tak | Version of the checks; reports with the same version are comparable. |

### ProjectCreate {#schema-projectcreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | min length 1; max length 200 |
| `restricted` | boolean |  | default `false` |

### ProjectRead {#schema-projectread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `name` | string | tak |  |
| `owner_id` | string (uuid) | tak |  |
| `created_at` | string (date-time) | tak |  |
| `restricted` | boolean |  | default `false` |
| `private_mode` | boolean |  | default `false` |
| `render_js_default` | string |  | one of `"off"`, `"on"`, `"auto"`; default `"on"` |
| `sitemap_url` | string or null |  |  |
| `my_role` | [ProjectRole](#schema-projectrole) or null |  |  |

### ProjectRole {#schema-projectrole}

Typ: string; one of `"owner"`, `"member"`

### ProjectUpdate {#schema-projectupdate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string or null |  |  |
| `restricted` | boolean or null |  |  |
| `private_mode` | boolean or null |  | Private mode: full URLs, page content, evidence and paste names are stored encrypted; public links show only the host. |
| `render_js_default` | string or null |  | Default JavaScript rendering: off \| on (+ render_js price per page, USD) \| auto (render after a block/empty shell, surcharge only when rendered) |
| `sitemap_url` | string or null |  | Sitemap or sitemap index URL used by default in the website audit wizard (http or https, public host); empty string clears it |

### PropertyAttachIn {#schema-propertyattachin}

Attach a property seen by `connection_id` to the project.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `connection_id` | string | tak | max length 24 |
| `site_url` | string | tak | min length 3; max length 300 |

### PrunePage {#schema-prunepage}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak |  |
| `report_id` | string |  | default `""` |
| `page_type` | string or null |  |  |
| `group` | string |  | one of `"money"`, `"supporting"`, `"site"`; default `"supporting"` |
| `published` | string or null |  |  |
| `modified` | string or null |  |  |
| `date_source` | string or null |  |  |
| `action` | string | tak | one of `"keep"`, `"improve"`, `"merge"`, `"remove"`, `"review"` |
| `method` | string |  | one of `"none"`, `"edit"`, `"301"`, `"410_or_noindex"`, `"manual"`; default `"none"` |
| `target` | string or null |  |  |
| `reasons` | array of [Reason](#schema-reason) |  | default `[]` |
| `missing` | array of string |  | default `[]` |
| `priority` | integer |  | default `0` |
| `trend` | [Trend](#schema-trend) or null |  |  |

### PruningReport {#schema-pruningreport}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ver` | string |  | default `"p4"` |
| `host` | string | tak |  |
| `pages` | array of [PrunePage](#schema-prunepage) | tak |  |
| `counts` | object (map of integer) | tak |  |
| `missing` | array of string |  | default `[]` |

### PublicEngine {#schema-publicengine}

One checking engine in `PublicStatus.engines`, under a generic name ("Engine 1", "Engine 2").

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak | Generic engine name. |
| `level` | [StatusLevel](#schema-statuslevel) | tak | State. |
| `label` | string | tak | Short label. |
| `updated_at` | string (date-time) or null |  | Last check. |

### PublicNotice {#schema-publicnotice}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | integer | tak | Notice id. |
| `level` | [NoticeLevel](#schema-noticelevel) | tak | Severity. |
| `text` | string | tak | Text. |
| `scope` | string | tak | Module: `judge`, `audit`, `intent`, `api`. |
| `dismissible` | boolean | tak | Can be hidden. |
| `starts_at` | string (date-time) | tak | Start. |
| `ends_at` | string (date-time) or null |  | End; null = open. |

### PublicStatus {#schema-publicstatus}

`GET /v1/status`: service state, notices and the state of each checking engine.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `level` | [StatusLevel](#schema-statuslevel) | tak | `up`, `warming`, `busy` or `degraded`. |
| `label` | string | tak | Short label. |
| `message` | string | tak | Message for people. |
| `eta_s` | integer or null |  | Estimated seconds until checks start (cold start); null = now. |
| `notices` | array of [PublicNotice](#schema-publicnotice) |  | Active notices. (default `[]`) |
| `updated_at` | string (date-time) or null |  | Last check of the service. |
| `engines` | array of [PublicEngine](#schema-publicengine) |  | State of each checking engine. (default `[]`) |
| `version` | string or null |  | Service version. |

### QueryPackRequest {#schema-querypackrequest}

Same input as Gain & Gap, but `url` and `text` are optional. With `url` the Intent part compares your page with
the top results; with `text` only it reads the top results without your page (and the pack costs less). Without
`url` and `text` (phrase only) the Gain & Gap part is a brief for a new page: what the top results cover, which
questions they leave unanswered and which sections a new page should have; the Intent part reads the top results
without your page. This is the lowest Query Pack price.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `top_pages` | integer or null |  | 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 |
| `include_domains` | array of string |  | 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 (max items 20) |
| `exclude_domains` | array of string |  | 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 (max items 50) |
| `query` | string | tak | Search phrase the text should answer (min length 1; max length 200) |
| `market` | string |  | language-COUNTRY, e.g. pl-PL, en-US (default `"en-US"`; max length 8; pattern `^[a-zA-Z]{2,3}([-_][a-zA-Z0-9]{2,4})?[-_][a-zA-Z]{2}$`) |
| `device` | string |  | one of `"desktop"`, `"mobile"`; default `"desktop"` |
| `url` | string or null |  | Your page: we fetch it and cut menus, footers and consent windows before the analysis. With `text`, used only as context (your domain in AI Overview sources) |
| `text` | string or null |  | Your text (Markdown or plain); no length limit beyond the request size |
| `title` | string |  | default `""`; max length 300 |
| `report_lang` | string or null |  | Report language; default from Accept-Language |
| `render_js` | string |  | Render JavaScript of your page (`url` only): `render_js` price only when the page was rendered (one of `"on"`, `"auto"`, `"off"`; default `"auto"`) |
| `max_age_days` | integer or null |  | Reuse search results up to N days old (default 3); 0 = always new results |
| `webhook_url` | string or null |  | POST `infogain.finished` (signed like job webhooks) when the report is ready or failed |
| `project_id` | string or null |  | Project public id (prj_…); default from X-Project-Id or the key |

### QueryPackRun {#schema-querypackrun}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Query Pack id (igr_…, the same id as its Gain & Gap part) |
| `status` | string | tak | done = both parts finished and at least one has a result; failed = no part has a result (it can still be charged for search results and page fetches when your page could not be read, see `charged_usd`) (one of `"queued"`, `"running"`, `"done"`, `"failed"`) |
| `query` | string | tak |  |
| `market` | string | tak |  |
| `device` | string | tak |  |
| `report_lang` | string | tak |  |
| `url` | string or null |  |  |
| `project_id` | string or null |  |  |
| `created_at` | string (date-time) | tak |  |
| `finished_at` | string (date-time) or null |  |  |
| `price_usd` | number |  | Amount reserved for the whole pack (default `0.0`) |
| `charged_usd` | number or null |  | Amount charged for the pack after both parts; the rest of the reservation is refunded. The analysis of a part without a result is not charged. The search results and page fetches we paid for (provider cost plus 30%) are charged when at least one part has a result, and also when the pack failed because your page could not be read (`gain_gap.failure` document_fetch_failed); a pack that failed for another reason (for example a temporary problem on our side) is not charged. When your page could not be read in a pack ordered with `url`, the Gain & Gap part is a brief for a new page from the same top results (`gain_gap.fallback` document_unreadable) and the pack is charged like a phrase-only pack (Intent plus the brief, plus the Compare difference when the Intent part did compare your page). Packs ordered before these rules were introduced keep the earlier ones (a part without a result is not charged; an unreadable page fails). None = not settled yet |
| `intent_status` | string or `"cancelled"` or null |  | Intent part status; None = not started yet |
| `intent` | object or null |  | Intent report (as GET /v1/intent/{id}, without its own price: the pack pays). Warning `pages_unreadable` in `intent.report.warnings` = too few top pages had readable text (for example videos), so the Intent part is based on the search results only (types and titles) and is charged like Intent Basic, without the page analysis. `intent.report.closer.unreadable` lists top results without text by kind (videos, login pages, PDF...): we do not analyse video content. The Gain & Gap part then compares the titles and descriptions of those results (`gain_gap.report.top_basis`) |
| `intent_failure` | [IntentFailure](#schema-intentfailure) or null |  | Why the Intent part failed (`intent_status` failed): code, one sentence and, for few_readable_pages, the page counts; None otherwise |
| `mode` | string |  | `brief` = ordered with the phrase only: the Gain & Gap part is a brief for a new page (`gain_gap.report.brief`). A pack ordered with `url` whose page could not be read keeps `compare` here and has `gain_gap.fallback` document_unreadable (one of `"compare"`, `"brief"`; default `"compare"`) |
| `gain_gap` | [InfoGainRun](#schema-infogainrun) | tak | Gain & Gap part (as GET /v1/infogain/{id}) |

### Question {#schema-question}

A reader question or a heading topic; `coverage` = share of results that cover it.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `question` | string | tak |  |
| `coverage` | number |  | default `0.0` |
| `source` | string |  | default `""` |

### QueueEta {#schema-queueeta}

Estimated wait before the job starts, in seconds.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `default_s` | integer or null |  | Seconds to finish on the default backend |
| `big_s` | integer or null |  | Seconds to finish on the second backend (cold start included) |

### Quote {#schema-quote}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak | Fragment of the page. |
| `verified` | boolean | tak | The fragment was found in the page text. |
| `links` | array of [QuoteLink](#schema-quotelink) |  | Link rules: page links this verified quote points to, taken from the page's link list (anchor, href, rel, host, region). Empty when the quote does not point to a link unambiguously (default `[]`) |

### QuoteLink {#schema-quotelink}

A link of the page pointed to by a quote, taken from the page's link list.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `anchor` | string | tak | Clickable text of the link as on the page |
| `href` | string | tak | Link address as in the page HTML |
| `rel` | string |  | rel attribute as in the page HTML; empty = none (default `""`) |
| `host` | string |  | Host of the link target (relative links resolved against the page URL) (default `""`) |
| `region` | string |  | Where the link is on the page: content \| footer \| nav \| other (default `"other"`) |
| `external` | boolean |  | Target is on another registrable domain than the page (default `false`) |

### QuoteView {#schema-quoteview}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak |  |
| `verified` | boolean | tak |  |
| `links` | array of [QuoteLink](#schema-quotelink) |  | default `[]` |

### RankedKeyword {#schema-rankedkeyword}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `keyword` | string | tak |  |
| `volume` | integer |  | default `0` |
| `position` | integer | tak |  |
| `url_path` | string |  | default `""` |
| `is_new` | boolean |  | default `false` |
| `offtopic_signal` | integer or null |  |  |
| `offtopic` | boolean or null |  |  |

### RawLabelRequest {#schema-rawlabelrequest}

`POST /v1/labels/raw`: a final text sent to the taxonomy model as is (no fetching, no HTML extraction).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak | Plain text or Markdown to classify, as is (up to 50,000 characters, at least 100 non-blank). No fetching, no HTML extraction (max length 50000) |
| `taxonomy` | string |  | iab = IAB Content Taxonomy 3.1, google = Google Content Categories v2, both = one call per taxonomy (one of `"iab"`, `"google"`, `"both"`; default `"both"`) |
| `ref` | string or null |  | Your own id for this text, echoed back |

### RawLabelResult {#schema-rawlabelresult}

Raw taxonomy model output per taxonomy in `results`, unchanged; `failed` = taxonomies without an answer. Model scores, not calibrated probabilities.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `results` | object (map of object) |  | Raw model output per taxonomy |
| `failed` | array of string |  | Taxonomies the model did not answer for |
| `document_tokens_read` | integer or null |  | Tokens of your text the model read (max over taxonomies); the model reads at most the first 7,500 tokens |
| `truncated` | boolean |  | True when the text was longer than the model reads and only its beginning was classified (default `false`) |
| `ref` | string or null |  |  |

### Reason {#schema-reason}

One fact behind a result: a code with its parameters, shown as text in the report language.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak |  |
| `rules` | array of string |  | default `[]` |
| `target` | string or null |  |  |
| `value` | string or null |  |  |
| `value2` | string or null |  |  |
| `position` | integer or null |  |  |

### ReauthRequest {#schema-reauthrequest}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `method` | string | tak | one of `"key"`, `"totp"`, `"backup"`, `"email"`, `"password"` |
| `code` | string or null |  |  |
| `password` | string or null |  |  |
| `credential` | object or null |  |  |

### RedirectHop {#schema-redirecthop}

One address in a redirect chain. `status` = HTTP status of that address (3xx for a redirect, the page status for the last one; null = unknown). `via: meta_refresh` = redirect through `<meta http-equiv="refresh">` in the HTML.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak |  |
| `status` | integer or null |  |  |
| `via` | string or null |  |  |

### RegisterAccepted {#schema-registeraccepted}

Always 202 with the same body, so it does not reveal whether the e-mail has an account. `POST /v1/auth/confirm` returns the same shape with `status` `confirmed`.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string |  | one of `"pending"`, `"confirmed"`; default `"pending"` |
| `message` | string | tak |  |

### ReportSummary {#schema-reportsummary}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Report id (`rep_…`). |
| `created_at` | string (date-time) | tak | When the report was made. |
| `url` | string or null | tak | Checked address; null for text/HTML input or a private project. |
| `host` | string or null |  | Host of `url`. |
| `url_hash` | string or null |  | Hash of the normalized URL (private projects keep only this). |
| `prompt_ver` | string | tak | Version of the checks. |
| `project_id` | string or null |  | Project id (`prj_…`). |
| `archived_at` | string (date-time) or null |  | When the report was archived; null = active. |

### ReportWithCopyright {#schema-reportwithcopyright}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Report id (`rep_…`). |
| `created_at` | string (date-time) | tak | When the report was made. |
| `url` | string or null | tak | Checked address; null for text/HTML input or a private project. |
| `host` | string or null |  | Host of `url`. |
| `url_hash` | string or null |  | Hash of the normalized URL (private projects keep only this). |
| `prompt_ver` | string | tak | Version of the checks. |
| `project_id` | string or null |  | Project id (`prj_…`). |
| `archived_at` | string (date-time) or null |  | When the report was archived; null = active. |
| `report` | [JudgeReport](#schema-judgereport) | tak | The page report (customer view: confirmed findings only). |
| `web_vitals` | [WebVitals](#schema-webvitals) or null |  | Core Web Vitals of real Chrome users from the Chrome UX Report (last 28 days): p75 and good / needs improvement / poor shares for LCP, INP, CLS, FCP and TTFB on phone and desktop, rated by Google thresholds, plus fix steps for weak metrics. Page report: the URL record, or the origin when the URL has too little traffic (`origin_fallback`). Site audit: the origin with a trend from the CrUX History API. null = not applicable. |
| `copyright_removals` | [CopyrightRemovals](#schema-copyrightremovals) or null |  | Copyright removal requests to Google Search for the domain, from the Google Transparency Report: number of requests, URLs removed / not in the index / no action / pending, first and last request date, dataset date (`snapshot`) and a link to the domain page in the report. Match: exact host without www, else the registrable domain (`match`). status `none` = no requests in the Google dataset; `unavailable` = dataset not loaded. Facts only, no score. null = no public domain (pasted text) or not a site audit. |

### ResultMap {#schema-resultmap}

One organic result from the search results and the intents it was assigned to (`intent_ids`), with the page type (`page_type`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `result_id` | string | tak |  |
| `rank` | integer or null |  |  |
| `domain` | string |  | default `""` |
| `title` | string |  | default `""` |
| `intent_ids` | array of string |  | default `[]` |
| `page_type` | string or null |  |  |

### RetryFailedResult {#schema-retryfailedresult}

Response of `POST /v1/audits/{audit_id}/retry-failed`: the job is queued again only for pages that failed to download.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `job` | [JobRead](#schema-jobread) | tak |  |
| `pages` | integer | tak | Pages queued again (fetch error: provider HTTP 5xx or timeout); successful pages are kept |
| `reserved_usd` | number | tak | Amount held for the retried pages only; unused part returns to the balance at the end |
| `max_retries` | integer | tak | Retries allowed per page; after that the fetch error stays in the report |
| `free_pages` | integer |  | Retried pages that are free of charge: the page type could not be determined on our side (model call failed), so they are not part of the hold (default `0`) |

### RevisionStatus {#schema-revisionstatus}

Typ: string; one of `"waiting"`, `"queued"`, `"done"`, `"failed"`

### Role {#schema-role}

Typ: string; one of `"user"`, `"admin"`, `"superadmin"`

### RoleUpdate {#schema-roleupdate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `role` | [Role](#schema-role) | tak |  |

### RuleBrief {#schema-rulebrief}

Short rule entry for choosing rules: id, title, layer and mode.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Rule id, use it in `rules`. |
| `title` | string | tak | Short name in English. |
| `title_pl` | string or null |  | Short name in Polish. |
| `layer` | string | tak | Rule group (`spam`, `quality`, …). |
| `mode` | string or null |  | Audit type the rule belongs to: `spam`, `quality` or `helpful`. |

### RuleCompare {#schema-rulecompare}

A rule in the before/after comparison: signal strength 0-100 in both reports and the change.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string | tak |  |
| `kind` | string | tak |  |
| `before` | integer or null |  | Signal strength 0-100 before; null = no result |
| `after` | integer or null |  | Signal strength 0-100 after; null = no result |
| `before_hit` | boolean |  | default `false` |
| `after_hit` | boolean |  | default `false` |
| `change` | string |  | fixed = finding before and the rule was assessed after without a finding; still = finding in both; new = finding only after; unchecked = finding before, but the rule has no settled result after (engine error, not assessed, to check); none = no finding in either (one of `"fixed"`, `"still"`, `"new"`, `"unchecked"`, `"none"`; default `"none"`) |

### RuleScore {#schema-rulescore}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string | tak | Rule id from `GET /v1/rules`. |
| `rule_ver` | integer | tak | Rule version. |
| `layer` | string | tak | Rule group (e.g. `spam`, `quality`). |
| `kind` | string |  | `violation` (problem), `info` (label) or `positive` (good signal). (one of `"violation"`, `"info"`, `"positive"`; default `"violation"`) |
| `policy` | string | tak | Google policy or guideline the rule checks. |
| `detectability` | string | tak | How much the page alone shows: `P` = the page is enough, `P+` = partly, `O` = needs data from outside the page. (one of `"P"`, `"P+"`, `"O"`) |
| `ok` | boolean |  | False when the rule could not be scored (see `error`); such a rule is not charged. (default `true`) |
| `justification` | string or null |  | Reserved; always null. |
| `contradiction` | boolean or null |  | Reserved; always null. |
| `evidence` | [Evidence](#schema-evidence) or null |  | Quotes and fix suggestions for a finding (with `explain`). |
| `unsupported` | boolean or null |  | True = finding without a confirmed quote on the page (shown to customers as not confirmed); null = no evidence was collected. |
| `factcheck` | [FactCheck](#schema-factcheck) or null |  | Fact check against outside sources (web search, encyclopedia, knowledge base) for fact-based rules with signal 50+: each claim of the page is `confirmed`, `contradicted` (only with a verified quote from the source), `not_found` (no evidence, not a falsehood) or `unchecked` (sources did not answer). `signal` is the result after the check; `score_before` keeps the result before it. Null = not checked. |
| `error` | string or null |  | Why the rule has no score (`ok: false`). |
| `answer_type` | string |  | `binary` (yes/no) or `choice` (options). (one of `"binary"`, `"choice"`; default `"binary"`) |
| `modal` | string or null |  | Choice rules: the most likely option letter. |
| `expected` | number or null |  | Choice rules with a scale: expected position 0..n-1. |
| `signal` | integer or null |  | Signal strength 0-100 (null when not scored). Higher = stronger signal; a ranking, not a probability. |
| `signal_level` | string |  | `high` (80+), `medium` (50-79), `low` (below 50); empty when not scored. (one of `"high"`, `"medium"`, `"low"`, `""`) |
| `near` | boolean or null |  | True = no finding, but the result is close to the threshold (shown as "Near the threshold"). Null = not known (older stored responses replayed with the same Idempotency-Key). |

### RuleStrength {#schema-rulestrength}

Signal strength 0-100 of one rule in a page report (`GET /v1/reports/{report_id}/signals`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string | tak |  |
| `kind` | string | tak |  |
| `signal` | integer or null |  |  |
| `signal_level` | string |  | default `""` |
| `hit` | boolean |  | default `false` |
| `near` | boolean |  | default `false` |

### RuleView {#schema-ruleview}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string | tak |  |
| `policy` | string | tak |  |
| `detectability` | string | tak |  |
| `ok` | boolean | tak |  |
| `score_text` | string | tak |  |
| `bar_pct` | integer | tak |  |
| `signal_level` | string |  | default `""` |
| `coverage_text` | string | tak |  |
| `low_coverage` | boolean | tak |  |
| `justification` | string or null |  |  |
| `error` | string or null |  |  |
| `quotes` | array of [QuoteView](#schema-quoteview) |  | default `[]` |
| `description` | string |  | default `""` |
| `title` | string |  | default `""` |
| `summary` | string |  | default `""` |
| `why` | string |  | default `""` |
| `fix` | string |  | default `""` |
| `fix_personal` | boolean |  | default `false` |
| `sources` | array of [SourceView](#schema-sourceview) |  | default `[]` |
| `level` | string |  | default `""` |
| `level_label` | string |  | default `""` |
| `signal` | integer or null |  |  |
| `facts_kind` | string or null |  |  |
| `facts` | array of [Fact](#schema-fact) |  | default `[]` |
| `facts_missing` | boolean |  | default `false` |
| `model_fix` | string |  | default `""` |
| `model_fix_lang` | string |  | default `""` |
| `action` | string |  | default `""` |
| `action_source` | string |  | default `""` |
| `contradiction` | string |  | default `""` |
| `evidence_state` | string |  | default `"none"` |
| `near` | boolean |  | default `false` |
| `review_reason` | string |  | default `""` |
| `factcheck` | [FactCheckView](#schema-factcheckview) or null |  |  |

### SampleInfo {#schema-sampleinfo}

Where the site audit sample came from: sitemaps, URLs found, selected and sampled, and the strategy.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `source` | string |  | default `"sitemap"` |
| `sitemap_urls` | integer | tak |  |
| `sampled` | integer | tak |  |
| `selected` | integer or null |  |  |
| `requested` | integer or null |  |  |
| `strategy` | string | tak |  |
| `sitemaps` | array of string |  | default `[]` |
| `sitemaps_total` | integer |  | default `0` |
| `groups` | array of [GroupStat](#schema-groupstat) |  | default `[]` |

### SamplePlan {#schema-sampleplan}

Result of URL discovery and sampling for a site audit.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site` | string | tak |  |
| `sitemaps` | array of string | tak |  |
| `sitemap_urls` | integer | tak |  |
| `seed` | integer | tak |  |
| `strategy` | string | tak |  |
| `pages` | array of [SampledPage](#schema-sampledpage) | tak |  |
| `patterns` | array of [PatternStat](#schema-patternstat) | tak |  |
| `source` | string |  | default `"sitemap"` |
| `scope` | [gspamjudge__features__audits__contracts__Scope](#schema-gspamjudge-features-audits-contracts-scope) or null |  |  |
| `selected` | integer or null |  |  |
| `categories` | array of string or null |  |  |
| `estimate` | [Estimate](#schema-estimate) or null |  |  |
| `with_topicality` | boolean |  | default `true` |
| `with_judge` | boolean |  | default `true` |
| `title_patterns` | array of [TitlePattern](#schema-titlepattern) |  | default `[]` |
| `requested` | integer or null |  |  |
| `groups` | array of [GroupStat](#schema-groupstat) |  | default `[]` |
| `gsc` | [GscSnapshot](#schema-gscsnapshot) or null |  |  |

### SampledPage {#schema-sampledpage}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak |  |
| `pattern` | string | tak |  |
| `lastmod` | string or null |  |  |
| `reason` | string | tak |  |
| `html` | boolean |  | default `false` |
| `gsc` | [GscPageMetrics](#schema-gscpagemetrics) or null |  |  |

### ScaleAggregate {#schema-scaleaggregate}

A multiple-choice rule in an audit: average distribution over pages and the number of pages per most likely answer.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string | tak |  |
| `policy` | string | tak |  |
| `kind` | string | tak |  |
| `pages` | integer | tak |  |
| `bars` | array of [ChoiceBar](#schema-choicebar) | tak |  |
| `modal_counts` | array of [LevelCount](#schema-levelcount) | tak |  |
| `concern_pages` | integer |  | default `0` |
| `expected_label` | string |  | default `""` |
| `weakest` | [ScalePage](#schema-scalepage) or null |  |  |

### ScalePage {#schema-scalepage}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak |  |
| `url` | string or null | tak |  |
| `name` | string or null |  |  |
| `label` | string | tak |  |
| `concern_signal` | integer or null |  | Signal strength 0-100 (null when not scored); a ranking, not a probability. |
| `concern_signal_level` | string |  | `high` (80+), `medium` (50-79), `low` (below 50); empty when not scored. (one of `"high"`, `"medium"`, `"low"`, `""`) |

### SdRuleView {#schema-sdruleview}

One structured data rule (QR-SD-*) on a page or across the site.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `rule_id` | string | tak |  |
| `title` | string | tak |  |
| `summary` | string |  | default `""` |
| `state` | string | tak |  |
| `score_text` | string |  | default `""` |
| `level` | string |  | default `""` |
| `pct` | integer |  | default `0` |
| `fix` | string |  | default `""` |
| `pages` | integer |  | default `0` |
| `pages_resolved` | integer |  | default `0` |
| `pages_unresolved` | integer |  | default `0` |

### SectionCount {#schema-sectioncount}

Site section: the first path segment (`/blog/`) or `/` (home page and files in the root).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `section` | string | tak | First path segment (e.g. `/blog/`). |
| `count` | integer | tak | URLs in the section. |

### SecurityKeyRead {#schema-securitykeyread}

A registered WebAuthn security key (without the public key and credential id).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | integer | tak |  |
| `name` | string | tak |  |
| `hardware` | boolean | tak |  |
| `created_at` | string (date-time) | tak |  |
| `last_used_at` | string (date-time) or null |  |  |

### SerpByokSettings {#schema-serpbyoksettings}

Organization setting. `own_key_only`: never buy search results at our cost; without a working own key the
order is refused before any charge.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `own_key_only` | boolean |  | default `false` |

### SerpByokStatus {#schema-serpbyokstatus}

Own keys for search results by provider and the organization settings. `order`: providers with a key, in the
order used. `fallback_ours`: switch to our key when your key fails (shared with page fetching).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `keys` | object (map of [SerpKeyStatus](#schema-serpkeystatus)) | tak |  |
| `order` | array of [SerpProviderName](#schema-serpprovidername) | tak |  |
| `settings` | [SerpByokSettings](#schema-serpbyoksettings) | tak |  |
| `fallback_ours` | boolean |  | default `false` |

### SerpKeyIn {#schema-serpkeyin}

Own key for search results. `login` and `password` for the first provider, `api_key` for the second.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [SerpProviderName](#schema-serpprovidername) | tak |  |
| `login` | string or null |  |  |
| `password` | string or null |  |  |
| `api_key` | string or null |  |  |

### SerpKeyRef {#schema-serpkeyref}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `provider` | [SerpProviderName](#schema-serpprovidername) | tak |  |

### SerpKeyStatus {#schema-serpkeystatus}

Own key of one provider: never the secret, only the last 4 characters (`hint`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `configured` | boolean | tak |  |
| `hint` | string or null |  |  |
| `updated_at` | string (date-time) or null |  |  |
| `checked_at` | string (date-time) or null |  |  |
| `check` | [KeyCheck](#schema-keycheck) or null |  |  |
| `signup_url` | string or null |  |  |

### SerpProviderName {#schema-serpprovidername}

Search results provider of an own key.

Typ: string; one of `"dataforseo"`, `"searchapi"`

### ShareCreate {#schema-sharecreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `expires_in_days` | integer or null |  | Days until the link expires (default 30); null = never (default `30`) |
| `include_evidence` | boolean |  | Show evidence quotes from the page (default off) (default `false`) |
| `show_project_name` | boolean |  | Show the project name on the public page (default off) (default `false`) |
| `password` | string or null |  | Optional password (write-only, stored as scrypt hash); recipients must enter it |

### ShareCreated {#schema-sharecreated}

Response to creating a share link: `link` is always present.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `kind` | [ShareKind](#schema-sharekind) | tak |  |
| `target_id` | string | tak |  |
| `project_id` | string | tak |  |
| `created_at` | string (date-time) | tak |  |
| `expires_at` | string (date-time) or null |  |  |
| `revoked_at` | string (date-time) or null |  |  |
| `include_evidence` | boolean | tak |  |
| `show_project_name` | boolean | tak |  |
| `views` | integer | tak |  |
| `last_viewed_at` | string (date-time) or null |  |  |
| `status` | [ShareStatus](#schema-sharestatus) | tak |  |
| `has_password` | boolean |  | default `false` |
| `link` | string | tak |  |
| `legacy` | boolean |  | Created before links were stored encrypted: the link cannot be shown again; create a new one to copy it (default `false`) |

### ShareKind {#schema-sharekind}

Typ: string; one of `"report"`, `"audit"`, `"intent"`, `"infogain"`

### SharePassword {#schema-sharepassword}

`PATCH /v1/share-links/{share_id}`: set or change the password (`password`) or remove it (`null`). A change ends earlier unlocks.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `password` | string or null | tak |  |

### ShareRead {#schema-shareread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `kind` | [ShareKind](#schema-sharekind) | tak |  |
| `target_id` | string | tak |  |
| `project_id` | string | tak |  |
| `created_at` | string (date-time) | tak |  |
| `expires_at` | string (date-time) or null |  |  |
| `revoked_at` | string (date-time) or null |  |  |
| `include_evidence` | boolean | tak |  |
| `show_project_name` | boolean | tak |  |
| `views` | integer | tak |  |
| `last_viewed_at` | string (date-time) or null |  |  |
| `status` | [ShareStatus](#schema-sharestatus) | tak |  |
| `has_password` | boolean |  | default `false` |
| `link` | string or null |  | Full link; only for members who can write in the project, null for read-only roles, API keys and legacy links |
| `legacy` | boolean |  | Created before links were stored encrypted: the link cannot be shown again; create a new one to copy it (default `false`) |

### ShareStatus {#schema-sharestatus}

Typ: string; one of `"active"`, `"expired"`, `"revoked"`

### SiteAiReady {#schema-siteaiready}

AI Ready of a site audit: per condition the number of pages in each state, plus AI Overview presence.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `version` | integer |  | default `1` |
| `checked_at` | string (date-time) | tak |  |
| `pages` | integer |  | default `0` |
| `conditions` | array of [SiteCondition](#schema-sitecondition) |  | default `[]` |
| `presence` | [AiPresence](#schema-aipresence) |  | default `{"status": "no_visibility", "market": "", "keywords": 0, "total_keywords": 0, "aio_keywords": 0, "aio_volume": 0, "cited_known": false, "top": [], "private": false}` |

### SiteAuditCreate {#schema-siteauditcreate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site` | string or null |  | Domain or site URL; the sitemap is found via robots.txt or /sitemap.xml. |
| `sitemap_url` | string or null |  | Direct sitemap URL (also a sitemap index). |
| `sitemap_xml` | string or null |  | Pasted sitemap XML (urlset or sitemapindex). |
| `urls` | array of string or null |  | Your own list of URLs instead of a sitemap. |
| `items` | array of [PageItem](#schema-pageitem) or null |  | Imported pages: `url` and optional `html` (with HTML the page is not fetched). |
| `same_site` | boolean |  | URL list: keep only the host of the first URL (or `site`). (default `true`) |
| `distinct_slash` | boolean |  | Treat `/a` and `/a/` as different URLs (default: the same). (default `false`) |
| `subdomains` | array of string |  | Subdomains of the same registrable domain to include in discovery (links on the home page of each); other hosts are ignored (default `[]`; max items 20) |
| `preview_id` | string or null |  | Id from `POST /v1/audits/site/preview` (same user or key and project): skips discovery. |
| `gsc` | [GscPageSource](#schema-gscpagesource) or null |  | Pages from a Search Console property of the project, ordered by its figures; `site` (optional) limits a domain property to that host |
| `pages` | integer |  | Sample size (pages to check). The price is per checked page. (default `30`; min 1.0) |
| `strategy` | string |  | `groups` (default) = pages linked from the home page + newest (current year) + random archive; `all` = all selected URLs (up to `pages`); `newest` = by sitemap lastmod; `stratified` = spread evenly with `seed`; `newest+stratified` = newest first, then spread; `home+random` = home page + random pages. (default `"groups"`; pattern `^(groups|newest\+stratified|all|newest|stratified|home\+random)$`) |
| `group_shares` | [GroupShares](#schema-groupshares) or null |  | Strategy groups: shares of home/newest; archive = rest. Empty = 10% home, 25% newest |
| `seed` | integer or null |  | Sampling seed; empty = date of the order (same seed + same sitemap = same sample). |
| `scope` | [gspamjudge__features__audits__contracts__Scope](#schema-gspamjudge-features-audits-contracts-scope) or null |  | Which URLs may be sampled: URL patterns from the preview, glob rules, sections, date filter. |
| `preset` | string or null |  | Label of a ready selection in the app; the price comes from the actual rules. |
| `js` | boolean |  | Legacy: true = `render_js: on`. (default `false`) |
| `render_js` | string or null |  | Render JavaScript: on (+ render_js price per page, USD) \| off \| auto (surcharge only for rendered pages); empty = project setting |
| `rules` | array of string or null |  | Rule ids from `GET /v1/rules` (e.g. `SP-KWS`) or ready sets `preset:<name>`: `preset:quick`, `preset:guest-post` (an article before publishing: link anchors, author bio, promotional text; checks that need the page HTML are listed in `not_applicable` for `text`). Empty = every rule of the selected `modes`. |
| `categories` | array of string or null |  | Audit types: `spam`, `quality`, `helpful`; empty = all three. Alias of `modes`. |
| `modes` | array of string or null |  | Audit modes: spam, quality, helpful; same as `categories` (alias, wins when both are given); empty or all three = everything |
| `topicality` | boolean |  | Site topical focus, content map and topic category: measured from at least 5 sampled pages with content, no extra charge (included in the site audit). Default true; send false to skip it (default `true`) |
| `judge` | boolean |  | Rule assessment: true = spam/quality/helpful rules as chosen in `modes`. false = Topicality only: pages are fetched and measured (topical focus, content map, categories, heading coherence, what to fix), no rule calls, priced per page as `topicality` (+ fetch). Requires topicality=true; `modes`, `rules`, `explain` and `fix_plan` are ignored (default `true`) |
| `explain` | boolean |  | Collect quotes and fix suggestions for findings (recommended). Without it you get signals only. (default `false`) |
| `fix_plan` | boolean |  | Buy the site fix plan when the audit finishes (paid add-on: price per page that needs changes, no minimum, see pricing `fix_plan`); only with explain=true and confirmed findings. Not enough balance = no plan, the audit still finishes; you can buy it later with POST /v1/audits/{id}/fix-plan/order (default `false`) |
| `project_id` | string or null |  | Project public id (`prj_…`). Same as the `X-Project-ID` header; empty = your default project (an API key always uses its own project). |
| `report_lang` | string or null |  | Report language: en \| pl; titles, what to do, exports and share link. Empty = Accept-Language, else en |
| `notify_email` | boolean |  | E-mail the user who started the audit when it finishes; ignored for API keys (default `false`) |
| `visibility` | [VisibilityOrder](#schema-visibilityorder) or null |  | Add-on: Google visibility of the domain (keyword counts in TOP3/10/50, 12-month trend, strongest keywords, keywords outside the site topic) for one market, or for up to 5 markets with `markets` (multilingual domain); flat price per domain and market, charged only for markets with data |
| `start` | boolean |  | Draft: false = save the configuration as a draft audit (status `draft`) without discovering pages, charging or queueing; start it later with POST /v1/audits/{audit_id}/start (default `true`) |

### SiteCategories {#schema-sitecategories}

Site category = the most common level 1 and level 2 path of the main page categories in the sample.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `profile` | string | tak |  |
| `prompt_ver` | string | tak |  |
| `pages` | integer | tak |  |
| `iab_pages` | integer |  | default `0` |
| `google_pages` | integer |  | default `0` |
| `sampled` | integer | tak |  |
| `skipped` | integer |  | default `0` |
| `partial` | boolean |  | default `false` |
| `usd` | number |  | default `0.0` |
| `iab_fallbacks` | integer |  | default `0` |
| `budget_cut` | boolean |  | default `false` |
| `stopped` | boolean |  | default `false` |
| `iab` | array of [SiteCategory](#schema-sitecategory) |  | default `[]` |
| `google` | array of [SiteCategory](#schema-sitecategory) |  | default `[]` |
| `page_list` | array of [PageCategories](#schema-pagecategories) |  | default `[]` |
| `excluded` | array of [ExcludedPage](#schema-excludedpage) |  | default `[]` |
| `no_measure` | string or null |  |  |

### SiteCategory {#schema-sitecategory}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `path` | string | tak |  |
| `pages` | integer | tak |  |
| `share` | number | tak |  |

### SiteCondition {#schema-sitecondition}

A condition at site level: number of pages in each state and example pages to fix.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `key` | string | tak | one of `"snippet"`, `"nosnippet_content"`, `"robots_txt"`, `"googlebot_access"`, `"no_js"`, `"date"`, `"internal_links"`, `"indexing"`, `"page_experience"` |
| `met` | integer |  | default `0` |
| `fix` | integer |  | default `0` |
| `no_data` | integer |  | default `0` |
| `reasons` | object (map of integer) |  | default `{}` |
| `no_data_reasons` | object (map of integer) |  | default `{}` |
| `examples` | array of string |  | default `[]` |

### SiteContext {#schema-sitecontext}

Page context for a site audit: pages and site totals. `counts`: code -> number of pages (e.g. `low_meta_core`, `meta_template`).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ver` | string | tak |  |
| `pages` | integer |  | default `0` |
| `skipped` | integer |  | default `0` |
| `partial` | boolean |  | default `false` |
| `h1_known` | boolean |  | default `false` |
| `meta_known` | boolean |  | default `false` |
| `counts` | object (map of integer) |  | default `{}` |
| `template_headings` | array of string |  | default `[]` |
| `page_list` | array of [PageContext](#schema-pagecontext) |  | default `[]` |

### SiteFit {#schema-sitefit}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `strength` | integer | tak | How close the page is to the site's main topics, 0-100 (min 0.0; max 100.0) |
| `audit_id` | string | tak |  |
| `pages` | integer | tak | Audited pages with stored vectors behind the site profile |

### SiteLanguages {#schema-sitelanguages}

Languages of the audit pages and the dominant language.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `profile` | string | tak |  |
| `prompt_ver` | string | tak |  |
| `pages` | integer |  | default `0` |
| `skipped` | integer |  | default `0` |
| `errors` | integer |  | default `0` |
| `counts` | object (map of integer) |  | default `{}` |
| `dominant` | string or null |  |  |

### SitePreview {#schema-sitepreview}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `preview_id` | string | tak | Pass it to `estimate` and `POST /v1/audits/site` to reuse this discovery. |
| `site` | string | tak | Site host. |
| `source` | string | tak | `sitemap` or `upload` (your URL list or import). |
| `sitemaps` | array of string | tak | Sitemaps read. |
| `total` | integer | tak | URLs found. |
| `rejected` | integer |  | URLs dropped (bad URL, other host, duplicate, over limit). (default `0`) |
| `with_html` | integer |  | Imported items with their own HTML. (default `0`) |
| `patterns` | array of [PatternPreview](#schema-patternpreview) | tak | URL patterns with counts and sample URLs. |
| `sections` | array of [SectionCount](#schema-sectioncount) |  | URL counts per first path segment, largest first. (default `[]`) |
| `discovery` | string |  | default `"sitemap"` |
| `subdomains` | object (map of integer) |  | default `{}` |
| `subdomains_missed` | array of string |  | default `[]` |
| `partial` | boolean |  | default `false` |
| `gsc` | [GscSnapshot](#schema-gscsnapshot) or null |  |  |
| `gsc_top` | array of object |  | default `[]` |

### SiteShare {#schema-siteshare}

Share of pages with a confirmed finding in an audit type and the site level based on it.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `confirmed` | integer | tak |  |
| `pages` | integer | tak |  |
| `share` | number | tak |  |
| `level` | string | tak |  |

### SiteSignal {#schema-sitesignal}

A rule at site level. With findings: `pages` = pages with a medium or stronger signal, strength = median on those pages. Without findings: `pages` = pages checked with the rule, strength = the highest on them (below medium).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `name` | string | tak |  |
| `rule_id` | string | tak |  |
| `score_text` | string | tak |  |
| `signal_level` | string |  | default `""` |
| `pages` | integer |  | default `0` |
| `weak` | boolean |  | default `false` |
| `near` | integer |  | default `0` |
| `bands` | array of integer |  | default `[]` |

### SiteSource {#schema-sitesource}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `site` | string or null |  | Domain or site URL; the sitemap is found via robots.txt or /sitemap.xml. |
| `sitemap_url` | string or null |  | Direct sitemap URL (also a sitemap index). |
| `sitemap_xml` | string or null |  | Pasted sitemap XML (urlset or sitemapindex). |
| `urls` | array of string or null |  | Your own list of URLs instead of a sitemap. |
| `items` | array of [PageItem](#schema-pageitem) or null |  | Imported pages: `url` and optional `html` (with HTML the page is not fetched). |
| `same_site` | boolean |  | URL list: keep only the host of the first URL (or `site`). (default `true`) |
| `distinct_slash` | boolean |  | Treat `/a` and `/a/` as different URLs (default: the same). (default `false`) |
| `subdomains` | array of string |  | Subdomains of the same registrable domain to include in discovery (links on the home page of each); other hosts are ignored (default `[]`; max items 20) |
| `preview_id` | string or null |  | Id from `POST /v1/audits/site/preview` (same user or key and project): skips discovery. |
| `gsc` | [GscPageSource](#schema-gscpagesource) or null |  | Pages from a Search Console property of the project, ordered by its figures; `site` (optional) limits a domain property to that host |

### SiteTopicality {#schema-sitetopicality}

Site topicality: coherence 0-100, outlier pages, topic clusters and near-duplicate pages.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `pages` | integer | tak |  |
| `skipped` | integer |  | default `0` |
| `partial` | boolean |  | default `false` |
| `focus` | number |  | default `0.0` |
| `score` | integer |  | default `0` |
| `radius_p50` | number |  | default `0.0` |
| `radius_p95` | number |  | default `0.0` |
| `outliers` | array of [PageRadius](#schema-pageradius) |  | default `[]` |
| `clusters` | array of [TopicCluster](#schema-topiccluster) |  | default `[]` |
| `noise` | integer |  | default `0` |
| `clones` | array of [ClonePair](#schema-clonepair) |  | default `[]` |
| `excluded` | array of [ExcludedPage](#schema-excludedpage) |  | default `[]` |
| `no_measure` | string or null |  |  |
| `distilled` | integer |  | default `0` |
| `anchors` | [TopicAnchors](#schema-topicanchors) or null |  |  |
| `names_lang` | string or null |  |  |
| `map_pages` | array of [PageRadius](#schema-pageradius) |  | default `[]` |

### SiteVisibility {#schema-sitevisibility}

Organic search visibility of the host in one market. `status`: ok = data available; empty = no ranking phrases known for the domain in this market; unavailable = data source error; disabled = visibility data not configured; skipped = no domain or market; private = phrases shown only in the app.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `host` | string | tak |  |
| `market` | string | tak |  |
| `status` | string |  | one of `"ok"`, `"empty"`, `"unavailable"`, `"disabled"`, `"skipped"`, `"private"`; default `"ok"` |
| `fetched_at` | string (date-time) or null |  |  |
| `source` | string |  | default `"dataforseo_labs"` |
| `months` | array of [MonthPoint](#schema-monthpoint) |  | default `[]` |
| `current` | [MonthPoint](#schema-monthpoint) or null |  |  |
| `delta_top3` | integer or null |  |  |
| `delta_top10` | integer or null |  |  |
| `delta_top50` | integer or null |  |  |
| `total_keywords` | integer |  | default `0` |
| `keywords` | array of [RankedKeyword](#schema-rankedkeyword) |  | default `[]` |
| `judged` | integer |  | default `0` |
| `offtopic_count` | integer |  | default `0` |
| `offtopic_volume` | integer |  | default `0` |
| `judged_volume` | integer |  | default `0` |
| `offtopic_examples` | array of [RankedKeyword](#schema-rankedkeyword) |  | default `[]` |
| `private` | boolean |  | default `false` |
| `error` | string or null |  |  |
| `own_key` | boolean |  | default `false` |
| `error_message` | string or null | tak | Message for an error with your organization's own data key; other errors have no message. (read-only) |

### SitewideAnchor {#schema-sitewideanchor}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `anchor` | string |  | default `""` |
| `href` | string |  | default `""` |
| `rel` | array of string |  | default `[]` |
| `place` | string |  | one of `"header"`, `"nav"`, `"mobile"`, `"footer"`, `"sidebar"`, `"other"`; default `"other"` |

### SitewideLinks {#schema-sitewidelinks}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string |  | one of `"ok"`, `"fallback"`; default `"fallback"` |
| `samples` | integer |  | default `0` |
| `outbound` | array of [SitewideTarget](#schema-sitewidetarget) |  | default `[]` |
| `internal_links` | integer |  | default `0` |
| `internal_top` | array of string |  | default `[]` |
| `steps_lang` | string |  | default `""` |

### SitewideTarget {#schema-sitewidetarget}

Target domain of outgoing links in blocks repeated across pages (menu, footer, mobile menu).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `host` | string | tak |  |
| `pages` | integer |  | default `0` |
| `rel` | array of string |  | default `[]` |
| `places` | array of string |  | default `[]` |
| `anchors` | array of [SitewideAnchor](#schema-sitewideanchor) |  | default `[]` |
| `steps` | array of string |  | default `[]` |

### SizePrice {#schema-sizeprice}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `size` | string | tak | one of `"short"`, `"typical"`, `"max"` |
| `document_tokens` | integer | tak |  |
| `model` | number |  | Labeling part per 1000 checks (USD): document tokens × price per 1M tokens (default `0.0`) |
| `fetch` | number |  | Fetch part per 1000 checks (USD), `url` only (default `0.0`) |
| `document` | number | tak | Price per 1000 checks, text you send (USD) |
| `url` | number | tak | Price per 1000 checks, URL we fetch (USD) |

### Snapshot {#schema-snapshot}

One archived snapshot of the home page: HTML structure fields only (each may be empty).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `year` | integer | tak |  |
| `timestamp` | string | tak |  |
| `title` | string |  | default `""` |
| `site_name` | string |  | default `""` |
| `org_name` | string |  | default `""` |
| `lang` | string |  | default `""` |

### SourceView {#schema-sourceview}

"Based on": the official Google source of a rule (label in the report language and a link).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `label` | string | tak |  |
| `url` | string | tak |  |

### SponsoredPage {#schema-sponsoredpage}

content page counted as a paid publication (answer 1 with verified evidence or your answer), also a
page to check or a page you marked as editorial.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak | Page report id |
| `url` | string or null |  | Page address |
| `signal` | integer or null |  | Signal strength 0-100 of the model's answer 1 (not a probability); null for a page to check and for a page you marked |
| `marked` | boolean |  | True when the result comes from your own answer, not from the model (default `false`) |
| `quotes` | array of [SponsoredQuote](#schema-sponsoredquote) |  | Verified evidence quotes (default `[]`) |

### SponsoredQuote {#schema-sponsoredquote}

verified evidence quote (label, link to the promoted offer or a sentence about the brand).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak | Verbatim fragment of the page that shows the paid publication: the label, the sentence, or the link text of the promoted offer. Empty when that link has no text or its text is the address itself - then only `links` is given |
| `links` | array of string |  | Address of the promoted offer when the quote is a link (default `[]`) |

### SponsoredView {#schema-sponsoredview}

estimated share of paid publications among content pages (posts and articles by page type).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `content_pages` | integer | tak | Counted content pages (sponsored + editorial, without pages to check) (posts and articles by page type; lists, tags, sections, author pages and the home page are not counted) |
| `sponsored` | integer | tak | Content pages counted as paid publications (answer 1 with verified evidence, or your answer) |
| `editorial` | integer | tak | Content pages counted as editorial |
| `sponsored_pct` | number | tak | Share of paid publications among content pages, 0-100 |
| `site_estimate` | boolean |  | True when the pages were drawn at random, so the share estimates the whole site and the interval below is given; False = share among the checked posts only (newest, own list, all pages up to a number) (default `false`) |
| `ci_low` | number or null |  | Lower end of the 95% Wilson interval for the site share, 0-100; null when the sample does not allow a site estimate |
| `ci_high` | number or null |  | Upper end of the 95% Wilson interval for the site share, 0-100; null when the sample does not allow a site estimate |
| `no_evidence` | integer |  | Diagnostics: model answered 1 but no verified quote (including pages you marked since); not shown in the report (default `0`) |
| `check` | integer |  | Content pages to check: the model answered 1 but no verified quote was found. Left out of the counts, the share and the interval until you answer (default `0`) |
| `marked` | integer |  | Content pages whose result comes from your answer (counted by your answer) (default `0`) |
| `unassessed` | integer |  | Content pages without a result (check or evidence step failed) - left out of the counts above (default `0`) |
| `pages` | array of [SponsoredPage](#schema-sponsoredpage) |  | Pages counted as paid publications: model results first (strongest signal first), then pages you marked (default `[]`) |
| `check_pages` | array of [SponsoredPage](#schema-sponsoredpage) |  | Pages to check (no quotes, no signal) (default `[]`) |
| `marked_editorial` | array of [SponsoredPage](#schema-sponsoredpage) |  | Pages you marked as not sponsored (default `[]`) |

### StatusLevel {#schema-statuslevel}

Typ: string; one of `"up"`, `"warming"`, `"busy"`, `"degraded"`

### StepUpOptionsRequest {#schema-stepupoptionsrequest}

`POST /v1/account/step-up/options`: `key` = hardware security keys only (default), `passkey` = any key.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `method` | string |  | one of `"passkey"`, `"key"`; default `"key"` |

### StepUpRequest {#schema-stepuprequest}

`POST /v1/account/step-up`: a code from the authenticator app or a WebAuthn assertion (`passkey` = any key, `key` = hardware key). Without `method`, `key` is assumed.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `method` | string |  | one of `"totp"`, `"passkey"`, `"key"`, `"email"`; default `"key"` |
| `code` | string or null |  |  |
| `credential` | object or null |  |  |

### StructuredDataView {#schema-structureddataview}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak |  |
| `has_schema` | boolean or null |  |  |
| `assessed` | boolean |  | default `false` |
| `types` | array of string |  | default `[]` |
| `rules` | array of [SdRuleView](#schema-sdruleview) |  | default `[]` |
| `hits` | integer |  | default `0` |
| `pages` | integer |  | default `0` |
| `pages_assessed` | integer |  | default `0` |
| `pages_with_hits` | integer |  | default `0` |

### Subject {#schema-subject}

Typ: string; one of `"user"`, `"project"`, `"org"`

### Suggestion {#schema-suggestion}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `text` | string | tak |  |
| `source` | string |  | one of `"model"`, `"fallback"`; default `"model"` |

### TaxonomyChange {#schema-taxonomychange}

Before/after comparison in one taxonomy: main category, deepest confident level and target category.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `taxonomy` | string | tak | one of `"iab"`, `"google"` |
| `before` | [Category-Output](#schema-category-output) or null |  | Main category before |
| `after` | [Category-Output](#schema-category-output) or null |  | Main category after |
| `before_confident` | [Category-Output](#schema-category-output) or null |  |  |
| `after_confident` | [Category-Output](#schema-category-output) or null |  |  |
| `main_changed` | boolean |  | The main category is different after the change (default `false`) |
| `target` | [gspamjudge__features__labeling__contracts__CategoryPath](#schema-gspamjudge-features-labeling-contracts-categorypath) or null |  | Intended category you gave (strength = 0, not a result) |
| `target_before` | string or null |  |  |
| `target_after` | string or null |  |  |
| `target_strength_before` | integer or null |  | Strength 0-100 of the intended category before, when it is in the result |
| `target_strength_after` | integer or null |  |  |

### TaxonomyLabels {#schema-taxonomylabels}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `taxonomy` | string | tak | one of `"iab"`, `"google"` |
| `taxonomy_name` | string | tak |  |
| `primary` | [Category-Output](#schema-category-output) or null |  | 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 |
| `primary_l1` | [Category-Output](#schema-category-output) or null |  | Main top-level category (the branch of `primary`) |
| `paths` | array of [gspamjudge__features__labeling__contracts__CategoryPath](#schema-gspamjudge-features-labeling-contracts-categorypath) |  | 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` | array of [CategoryLevel](#schema-categorylevel) |  | 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` | [Category-Output](#schema-category-output) or null |  | 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 |

### TierEvent {#schema-tierevent}

One step in the report upgrade history (same `rep_` id). Amounts in USD.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `at` | string (date-time) | tak | When. |
| `levels` | object (map of string) | tak | Scope after this step. |
| `steps` | object (map of string) |  | Steps run. (default `{}`) |
| `source` | string |  | Origin. (one of `"initial"`, `"upgrade"`, `"refresh"`; default `"upgrade"`) |
| `prompt_ver` | string or null |  |  |
| `charged_usd` | number | tak | Charged (USD). (read-only) |
| `refunded_usd` | number | tak | Refunded (USD). (read-only) |

### TierState {#schema-tierstate}

Current depth of a report per audit type and the amount paid for the page (without search intent).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak | Report id. |
| `levels` | object (map of string) | tak | Audit type -> scope bought. |
| `tier` | string or null | tak | Common scope; null = mixed. |
| `intent` | boolean |  | Report has search intent checks. (default `false`) |
| `inferred` | boolean |  | State read from an older report. (default `false`) |
| `history` | array of [TierEvent](#schema-tierevent) |  | Upgrades so far. (default `[]`) |
| `paid_usd` | number | tak | Paid in total (USD). (read-only) |

### TierTable {#schema-tiertable}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `audit_types` | array of [AuditTypePrice](#schema-audittypeprice) | tak | Audit types (spam, helpful, quality) with a per-page price |
| `page` | array of [PageTierPrice](#schema-pagetierprice) | tak | Check scope per page; `id` (lite\|basic\|premium) is the value of `tier` in upgrade requests, kept for compatibility. Names describe what each scope includes. |
| `intent` | array of [IntentTier](#schema-intenttier) | tak | Search intent tiers with prices per phrase. |

### TitlePattern {#schema-titlepattern}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url_pattern` | string | tak |  |
| `skeleton` | string | tak |  |
| `pages` | integer | tak |  |
| `variants` | array of string |  | default `[]` |
| `source` | string |  | one of `"url"`, `"title"`; default `"url"` |

### TopCategory {#schema-topcategory}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `taxonomy` | string | tak | `iab` or `google` |
| `taxonomy_name` | string | tak | Taxonomy name, e.g. IAB Content Taxonomy 3.1 |
| `id` | string | tak |  |
| `name` | string | tak | Category path or name from the taxonomy |
| `strength` | integer | tak | Signal strength 0-100 (ranking, not a probability) (min 0.0; max 100.0) |

### TopicAnchors {#schema-topicanchors}

Topicality against anchors: the home page (declared topic) and the centers of the strongest sections (topic from the content).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `ver` | string |  | default `"a1"` |
| `home` | string |  | one of `"measured"`, `"outside"`, `"missing"`; default `"missing"` |
| `anchors` | integer |  | default `0` |
| `focus` | number |  | default `0.0` |
| `radius_p50` | number |  | default `0.0` |
| `radius_p95` | number |  | default `0.0` |
| `alignment` | number or null |  |  |
| `home_radius` | number or null |  |  |
| `home_share` | number |  | default `0.0` |
| `clusters` | array of [AnchorCluster](#schema-anchorcluster) |  | default `[]` |

### TopicCluster {#schema-topiccluster}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | integer | tak |  |
| `pages` | integer | tak |  |
| `focus` | number | tak |  |
| `examples` | array of [PageRadius](#schema-pageradius) |  | default `[]` |
| `name` | string |  | default `""` |

### TopicMismatch {#schema-topicmismatch}

`foreign_linked`: a page from another topic cluster than most pages linking to it, yet strongly linked. `isolated`: a page in a cluster of 3 or more pages linked only from other clusters.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `url` | string | tak |  |
| `id` | string |  | default `""` |
| `kind` | string | tak | one of `"foreign_linked"`, `"isolated"` |
| `inlinks` | integer |  | default `0` |
| `topic_label` | string |  | default `""` |
| `linkers_label` | string |  | default `""` |

### TopupCreate {#schema-topupcreate}

Top-up order: amount in USD (whole cents), consent version accepted by a person, page language and an optional promotion code.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `amount_usd` | number | tak | max 1000000.0 |
| `consent_ver` | string | tak |  |
| `lang` | string |  | one of `"en"`, `"pl"`; default `"en"` |
| `promo_code` | string or null |  |  |

### TopupList {#schema-topuplist}

Top-up payments of the organization, newest first, with the payment mode of the server.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `mode` | string | tak | one of `"test"`, `"sandbox"`, `"live"` |
| `warning` | string or null |  |  |
| `items` | array of [CheckoutRead](#schema-checkoutread) | tak |  |

### TopupOptions {#schema-topupoptions}

Top-up rules for your organization and the consent text to show to the person who pays.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `min_usd` | number | tak |  |
| `max_usd` | number | tak |  |
| `fee_percent` | number | tak |  |
| `fee_fixed_usd` | number | tak |  |
| `valid_months` | integer | tak |  |
| `consent_ver` | string | tak |  |
| `consent_label` | string | tak |  |
| `consent_lines` | array of string | tak |  |
| `enabled` | boolean | tak |  |
| `mode` | string | tak | one of `"test"`, `"sandbox"`, `"live"` |
| `warning` | string or null |  |  |

### TopupStart {#schema-topupstart}

Link to the hosted payment page. The balance grows only after the payment is confirmed.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak |  |
| `url` | string | tak |  |
| `amount_usd` | number | tak |  |
| `fee_usd` | number | tak |  |
| `expires_in_s` | integer | tak |  |
| `mode` | string | tak | one of `"test"`, `"sandbox"`, `"live"` |
| `warning` | string or null |  |  |

### TotpConfirm {#schema-totpconfirm}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `code` | string | tak | max length 16 |

### TotpSetup {#schema-totpsetup}

Secret shown once, to scan (QR SVG) or type in.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `secret` | string | tak |  |
| `uri` | string | tak |  |
| `qr_svg` | string | tak |  |

### Trend {#schema-trend}

Search Console traffic of the page: last 28 days against the 28 days before, counted by code. `update` is a
date fact (the drop started during that Google update rollout), not a cause.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string | tak | one of `"gsc_unknown"`, `"low_volume"`, `"stable"`, `"growth"`, `"seasonal"`, `"decline"`, `"strong_decline"` |
| `pattern` | string or null |  |  |
| `yoy_unknown` | boolean |  | default `false` |
| `lost_clicks` | integer |  | default `0` |
| `change_pct` | integer or null |  |  |
| `clicks` | integer or null |  |  |
| `prev_clicks` | integer or null |  |  |
| `position` | number or null |  |  |
| `update` | string or null |  |  |
| `update_category` | string or null |  |  |
| `protected` | boolean |  | default `false` |

### TrendPoint {#schema-trendpoint}

One 28-day period of field data ending on `end`; null = no data for that period.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `end` | string (date) | tak |  |
| `lcp` | number or null |  |  |
| `inp` | number or null |  |  |
| `cls` | number or null |  |  |

### TwoFactorUpdate {#schema-twofactorupdate}

`POST /v1/account/two-factor`: turn e-mail codes on or off, confirmed with your password.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `enabled` | boolean | tak |  |
| `password` | string | tak | max length 256 |

### UnreadGroup {#schema-unreadgroup}

Top results of one kind that gave no text to read.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `kind` | string | tak | 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 (one of `"video"`, `"audio"`, `"login"`, `"pdf"`, `"js_only"`, `"little_text"`, `"not_fetched"`) |
| `count` | integer | tak | Number of top results of this kind |
| `domains` | array of string |  | Their domains, in ranking order, without duplicates (default `[]`) |

### UnreadableSummary {#schema-unreadablesummary}

Top results without text to read, and what the intent assessment is based on instead.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `top` | integer | tak | Top results (organic ranking) taken for reading |
| `readable` | integer | tak | Top results that gave text when fetched (fetch information; whether Ani analysed them is in `basis`) |
| `basis` | string |  | 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) (one of `"results_and_pages"`, `"results_only"`; default `"results_and_pages"`) |
| `groups` | array of [UnreadGroup](#schema-unreadgroup) |  | Top results without text, by kind (default `[]`) |
| `message` | string |  | The same in one or two sentences (English) (default `""`) |

### UpgradeEstimate {#schema-upgradeestimate}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `report_id` | string | tak | Report id. |
| `current` | [TierState](#schema-tierstate) | tak | What the report has now. |
| `target` | object (map of string) | tak | Scope after the upgrade. |
| `available` | boolean |  | False = cannot be upgraded (see `reason`). (default `true`) |
| `reason` | string or null |  | `nothing_to_add`, `private_mode` or `busy`. |
| `rules_missing` | integer |  | Rules that would be added. (default `0`) |
| `evidence_hits` | integer |  | Findings that would get evidence. (default `0`) |
| `refetch` | boolean |  | The page is fetched again (fetch fee). (default `false`) |
| `seconds` | integer |  | Estimated time. (default `0`) |
| `cost_usd` | number | tak | Price in USD. (read-only) |
| `steps_usd` | object (map of number) | tak | Price per step (rules, evidence, intent, fetch) in USD; sums to `cost_usd`. (read-only) |

### UpgradeRequest {#schema-upgraderequest}

`tier` = target depth (default: current); `categories` = audit types to add or deepen (default: those bought). `query` with `market` (or `location_code` and `language_code`) adds the search intent add-on.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY`, e.g. pl-PL (default en-US) |
| `location_code` | integer or null |  | Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market` |
| `language_code` | string or null |  | language_code from the supported markets list, e.g. pl; overrides the language of `market` |
| `tier` | string or null |  | Target scope for all categories: `lite`, `basic` or `premium`. |
| `categories` | array of string or null |  | Audit types to add: `spam`, `quality`, `helpful`. |
| `query` | string or null |  | Target phrase to add search intent checks. |

### UpgradeResult {#schema-upgraderesult}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `estimate` | [UpgradeEstimate](#schema-upgradeestimate) | tak | Estimate used. |
| `state` | [TierState](#schema-tierstate) | tak | State after the upgrade. |
| `failed_steps` | array of string |  | Steps that failed (refunded). (default `[]`) |
| `charged_usd` | number | tak | Charged (USD). (read-only) |
| `refunded_usd` | number | tak | Refunded (USD). (read-only) |

### UpgradeRun {#schema-upgraderun}

Background upgrade of audit pages (`POST /v1/audits/{audit_id}/upgrade` -> 202).

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Upgrade run id (`upg_…`). |
| `audit_id` | string | tak | Audit id. |
| `status` | string | tak | `running`, `done` or `failed`. (one of `"running"`, `"done"`, `"failed"`) |
| `total` | integer | tak | Pages. |
| `done` | integer |  | Pages done. (default `0`) |
| `failed` | integer |  | Pages failed (refunded). (default `0`) |
| `created_at` | string (date-time) | tak | Started. |
| `finished_at` | string (date-time) or null |  | Finished. |
| `reserved_usd` | number | tak | Reserved (USD). (read-only) |
| `refunded_usd` | number | tak | Refunded (USD). (read-only) |

### UsageCounter {#schema-usagecounter}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `used_usd` | number | tak | Spent (USD). (read-only) |
| `limit_usd` | number or null | tak | Limit (USD); null = no limit. (read-only) |
| `remaining_usd` | number or null | tak | Left before the limit (USD); null = no limit. (read-only) |

### UsageRead {#schema-usageread}

`GET /v1/usage`: spending in USD for you, the project and the organization (plan pool), and the pay-as-you-go balance.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `unit` | string |  | Always `usd`. (default `"usd"`) |
| `user` | [UsageScope](#schema-usagescope) or null |  | Your spending today and this month. |
| `project` | [UsageScope](#schema-usagescope) or null |  | Project spending. |
| `org` | [UsageScope](#schema-usagescope) or null |  | Organization spending (plan pool). |
| `plan` | [Plan](#schema-plan) or null |  | Organization plan and limits. |
| `balance` | [Balance](#schema-balance) or null |  | Pay-as-you-go balance. |
| `pricing` | [PriceFreeze](#schema-pricefreeze) or null |  |  |
| `billing_mode` | string |  | one of `"prepaid"`, `"postpaid"`; default `"prepaid"` |
| `credit` | [CreditStatus](#schema-creditstatus) or null |  |  |
| `exempt` | boolean |  | Admin account or internal organization: usage is counted, the balance does not block or get charged. (default `false`) |

### UsageScope {#schema-usagescope}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `subject` | [Subject](#schema-subject) | tak | `user`, `project` or `org`. |
| `subject_id` | string | tak | Id of the subject. |
| `day` | [UsageCounter](#schema-usagecounter) | tak | Today's spending. |
| `month` | [UsageCounter](#schema-usagecounter) | tak | This month's spending. |

### UserCreate {#schema-usercreate}

Sign-up: e-mail and password only. The role is assigned by an admin.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `email` | string (email) | tak |  |
| `password` | string | tak |  |
| `is_active` | boolean or null |  | default `true` |
| `is_superuser` | boolean or null |  | default `false` |
| `is_verified` | boolean or null |  | default `false` |

### UserRead {#schema-userread}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string (uuid) | tak |  |
| `email` | string (email) | tak |  |
| `is_active` | boolean |  | default `true` |
| `is_superuser` | boolean |  | default `false` |
| `is_verified` | boolean |  | default `false` |
| `role` | [Role](#schema-role) |  | default `"user"` |

### UserUpdate {#schema-userupdate}

`PATCH /v1/users/me` (e-mail, password) and `/v1/users/{user_id}`. The role is changed only with the role endpoint.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `password` | string or null |  |  |
| `email` | string (email) or null |  |  |
| `is_active` | boolean or null |  |  |
| `is_verified` | boolean or null |  |  |

### ValidationError {#schema-validationerror}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `loc` | array of string or integer | tak |  |
| `msg` | string | tak |  |
| `type` | string | tak |  |
| `input` | any |  |  |
| `ctx` | object |  |  |

### VisibilityMarket {#schema-visibilitymarket}

One market of the Visibility add-on: `market` (language-COUNTRY), or `country` and/or `language` with the rest chosen automatically after the audit.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY` for Google data, e.g. pl-PL. Empty = automatic: the main language of the checked pages, country from the domain ending. |
| `country` | string or null |  | Only with empty `market`: fixed country (ISO code or name); the language is detected from the pages. |
| `language` | string or null |  | Only with empty `market`: fixed language (code or name); the country comes from the domain ending or the main country of the language. |

### VisibilityOrder {#schema-visibilityorder}

Order of the Visibility add-on with a site audit. Empty `market` = chosen automatically after the audit; set `country` or `language` to fix part of it. For a multilingual domain use `markets` (up to 5, each charged separately) instead of the single fields.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `market` | string or null |  | Market `language-COUNTRY` for Google data, e.g. pl-PL. Empty = automatic: the main language of the checked pages, country from the domain ending. |
| `country` | string or null |  | Only with empty `market`: fixed country (ISO code or name); the language is detected from the pages. |
| `language` | string or null |  | Only with empty `market`: fixed language (code or name); the country comes from the domain ending or the main country of the language. |
| `markets` | array of [VisibilityMarket](#schema-visibilitymarket) |  | Several markets for a multilingual domain, up to 5. Each market is a separate visibility check and a separate charge (price per domain × markets), charged only when data is returned. The first market is the main one. Empty = one market from `market` / `country` / `language` (do not combine both forms). Repeated markets are counted once. (default `[]`; max items 5) |

### WebVitals {#schema-webvitals}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `status` | string | tak | ok = data for at least one device; no_data = page and origin not in CrUX (low traffic, not an error); unavailable = CrUX API error; pending = still being fetched in the background (try again shortly); disabled = not configured; private = private project, nothing was sent to Google (one of `"ok"`, `"no_data"`, `"unavailable"`, `"pending"`, `"disabled"`, `"private"`) |
| `scope` | string | tak | one of `"page"`, `"site"` |
| `target` | string or null |  | Requested public URL (page) or origin (site); null when private |
| `origin` | string or null |  | Origin used for the site record and the page fallback (scheme://host) |
| `origin_fallback` | boolean |  | Page report: the URL had no CrUX record, origin data shown instead (default `false`) |
| `devices` | array of [DeviceVitals](#schema-devicevitals) |  | default `[]` |
| `fixes` | array of [FixStep](#schema-fixstep) |  | default `[]` |
| `fetched_at` | string (date-time) or null |  |  |
| `source` | string |  | default `"Chrome UX Report (CrUX), last 28 days"` |

### gspamjudge__features__apikeys__contracts__Scope {#schema-gspamjudge-features-apikeys-contracts-scope}

Typ: string; one of `"judge"`, `"reports:read"`, `"jobs"`, `"reports:write"`, `"projects:read"`, `"feedback:write"`, `"labels:write"`, `"labels:read"`, `"context:write"`, `"billing:read"`, `"billing:write"`

### gspamjudge__features__audits__contracts__Scope {#schema-gspamjudge-features-audits-contracts-scope}

Which URLs may be sampled. Patterns are `pattern` values from the preview; text rules are globs only (`/blog/*` on the path; without a leading `/` the rule matches the full URL). Empty `include` = all URLs.

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `include_patterns` | array of string |  | Only these URL patterns (values of `pattern` from the preview). (default `[]`; max items 500) |
| `exclude_patterns` | array of string |  | Skip these URL patterns. (default `[]`; max items 500) |
| `include` | array of string |  | Glob rules on the path (`/blog/*`) or full URL; only matching URLs. (default `[]`; max items 20) |
| `exclude` | array of string |  | Glob rules; matching URLs are skipped. (default `[]`; max items 20) |
| `exclude_urls` | array of string |  | Exact URLs to skip. (default `[]`; max items 5000) |
| `sections` | array of string |  | Only these sections (first path segment, e.g. `/blog/`; `/` = home and root files). (default `[]`; max items 500) |
| `changed_days` | integer or null |  | Only pages whose sitemap lastmod is within the last N days; pages without lastmod are skipped; empty = no date filter |

### gspamjudge__features__labeling__contracts__CategoryPath {#schema-gspamjudge-features-labeling-contracts-categorypath}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `id` | string | tak | Id of the deepest category of the path |
| `path` | string | tak | Names from the top level down, joined with ' > ' |
| `strength` | integer | tak | Strength of the whole path 0-100 (ranking, not a probability) (min 0.0; max 100.0) |

### gspamjudge__features__topics__contracts__CategoryPath {#schema-gspamjudge-features-topics-contracts-categorypath}

| Pole | Typ | Wymagane | Opis |
|---|---|---|---|
| `nodes` | array of [CategoryNode](#schema-categorynode) | tak |  |
