> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keenable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Every page is listed in https://docs.keenable.ai/llms.txt. To pick a product for a job, read https://docs.keenable.ai/choose.md
> Setup steps for agents, covering the SDKs, the MCP server and the CLI: https://docs.keenable.ai/skill.md
> Keenable search and fetch work without an API key. To add them to code, use the official SDK for the project's language: https://docs.keenable.ai/sdks.md
> Without a key, call POST https://api.keenable.ai/v1/search/public or POST https://api.keenable.ai/v1/fetch/public with an X-Keenable-Title header that names your app.
> With a key, send it in the X-API-Key header and read it from the KEENABLE_API_KEY environment variable. Never ask a user to paste a key into chat. Every access method: https://docs.keenable.ai/auth.md
> To search and then read a page with a key, call POST https://api.keenable.ai/v1/search, then POST https://api.keenable.ai/v1/fetch with the result URLs. Check the fetch's HTTP status first, then each entry in results: a page that can't be read has error instead of content. A complete program, the request bodies and the response shapes are at the top of https://docs.keenable.ai/llms.txt
> To get an API key without the console, use device login: https://docs.keenable.ai/authentication.md#device-login
> MCP server: https://api.keenable.ai/mcp (no key, or X-API-Key; keyless Codex uses https://api.keenable.ai/mcp-public), or https://api.keenable.ai/mcp-oauth for OAuth sign-in. These docs are an MCP server at https://docs.keenable.ai/mcp and the OpenAPI spec is at https://docs.keenable.ai/api-reference/openapi.json
> Keenable searches and fetches public web pages. If a question needs no web information, skip the call.
> On 402 with an API key (code insufficient_credits), stop and ask a human to add credits; don't retry. On 429, wait the number of seconds in Retry-After, then retry. Before you ship, follow https://docs.keenable.ai/production.md
> Every error, with its cause and fix, is in https://docs.keenable.ai/errors.md and moving from another search API is covered in https://docs.keenable.ai/migrate.md
> Before you compare Keenable with another search API, read https://docs.keenable.ai/guides/evaluate-search-apis.md

# Usage API: requests and credits per key

> Read requests and credits for each API key of your organization, per UTC day, with GET /v1/usage. Reconcile each key's spend. Free and read-only.

> [!NOTE]
>
> The Usage API is in beta. Its fields can change without notice. See [Versioning](https://docs.keenable.ai/versioning.md).

Read how many requests each API key of your organization made, and how many credits they spent, for each UTC day of a window you pick. Use it to check what your production key spent against your own cost tracking, apart from your staging or test keys. The call is free and read-only: it isn't billed and doesn't appear in the usage it reports.

## What it answers

The call answers for the whole organization of the key you send, all of its keys included. Any API key of the organization works, and so does a signed-in session's bearer token. Every member sees the same figures on the console's [Usage page](https://docs.keenable.ai/credits.md#usage-per-api-key).

It shares your organization's fixed limit of 20 requests per second for calls outside search, fetch and Time Machine. See [Rate limits](https://docs.keenable.ai/rate-limits.md).

## Pick a window

| Parameter | Format | What it does |
| - | - | - |
| `from` | `YYYY-MM-DD` | First UTC day of the window, included. |
| `to` | `YYYY-MM-DD` | Last UTC day of the window, included. On or after `from`. |
| `days` | Integer | The last this many UTC days, today included. Default `30`. Values outside 1 to 90 are clamped to that range. |

Send `from` and `to` together. They take precedence over `days`, and the window can be at most 92 days with both dates included, so any calendar quarter fits. `days` applies only when you send neither `from` nor `to`. The response always gives the window it used in `from`, `to` and `days`.

## Example

This call reads November 2026 for every key of your organization:

```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
curl "https://api.keenable.ai/v1/usage?from=2026-11-01&to=2026-11-30" \
  -H "X-API-Key: $KEENABLE_API_KEY"
```

The response has one entry per key and one entry per UTC day in each key's `daily` list. This example is shortened to two days:

```json Example response · shortened to two days theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
{
  "from": "2026-11-01",
  "to": "2026-11-02",
  "days": 2,
  "keys": [
    {
      "key_id": "abc",
      "label": "Production",
      "display": "keen_abc_…",
      "revoked": false,
      "total": 150,
      "credits_total": 150,
      "daily": [
        { "date": "2026-11-01", "search": 80, "fetch": 20, "select": 0, "extract": 0, "credits": { "search": 80, "fetch": 20, "select": 0, "extract": 0 } },
        { "date": "2026-11-02", "search": 40, "fetch": 10, "select": 0, "extract": 0, "credits": { "search": 40, "fetch": 10, "select": 0, "extract": 0 } }
      ]
    },
    {
      "key_id": null,
      "label": "Console",
      "display": null,
      "revoked": false,
      "total": 3,
      "credits_total": 3,
      "daily": [
        { "date": "2026-11-01", "search": 3, "fetch": 0, "select": 0, "extract": 0, "credits": { "search": 3, "fetch": 0, "select": 0, "extract": 0 } },
        { "date": "2026-11-02", "search": 0, "fetch": 0, "select": 0, "extract": 0, "credits": { "search": 0, "fetch": 0, "select": 0, "extract": 0 } }
      ]
    }
  ]
}
```

## Fields

* `keys` lists only the keys with requests or credits in the window, not every key of the organization. A key nobody used in the window is left out.
* Keys are sorted by `credits_total`, highest first, then by `total`, then by `label`.
* `key_id` is the key's id, the middle part of its masked form `display`. `label` is the name you gave the key, or `display` when it has none.
* `key_id: null`, labelled `Console`, is calls made without an API key: the console's playground, and apps you signed in to with OAuth, such as the [MCP server](https://docs.keenable.ai/mcp-server.md) at `/mcp-oauth`.
* A revoked key still appears if it was used in the window, with `revoked: true`. A key deleted from the organization appears as `Deleted key`, with `display: null` and `revoked: true`.
* `total` is the key's requests in the window, all products. `credits_total` is its credits, all products.
* `daily` has one entry for every day of the window, oldest first, days without calls included.

Each day splits requests and credits into four products:

| Product | Requests count | Credits also include |
| - | - | - |
| `search` | Searches in every mode, Time Machine searches included | Results past the first 10 in a search, when your plan charges for them |
| `fetch` | Pages fetched, Time Machine pages included | Nothing else |
| `select` | [SELECT](https://docs.keenable.ai/select.md) calls and searches in the `webql` mode | The SELECT cost and agent runs, which have no request count of their own |
| `extract` | Rows put through a semantic extract | Nothing else |

So a day can show `select` credits with 0 `select` requests. An operation your organization is measured on but not charged for shows its requests with 0 credits. Which operations count as charged follows your organization's current plan: if your plan started charging for an operation partway through the window, the earlier days show credits for it too.

## Credits and US dollars

1 credit is \$0.004 for every organization, so divide credits by 250 to get US dollars. At standard prices, a search or a fetched page costs 1 credit. If your organization has its own prices, a call spends a different number of credits, and a credit is still worth \$0.004. See [Balance and usage](https://docs.keenable.ai/credits.md#reading-usage-per-call).

Credits are what the calls cost **before** the free monthly allowance. The allowance belongs to the organization, not to a key, so it isn't split across keys. In a month your organization stayed within the allowance, every key still shows its credits, though nothing was taken from your prepaid balance.

## Reconcile a key's spend

To check one key's spend for a calendar month:

1. Call with `from` set to the first day of the month and `to` to the last, such as `from=2026-11-01&to=2026-11-30`. Days are UTC days.
2. Find the key by its `key_id` in `keys`. Don't match on `label`: it's display text, two keys can share it, and every deleted key is labelled `Deleted key`. If the key isn't listed, it had no requests or credits that month.
3. Read its `credits_total` and divide by 250 for US dollars.

For a cost tracker that books spend per day, read each key's `daily` entries: one row per day, with requests and credits per product.

Credits are JSON numbers with up to 8 decimal places, and most JSON parsers read them as binary floats, which pick up rounding errors when you add them. Parse and add them with a decimal type instead. In Python:

```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
import json, os, urllib.request
from decimal import Decimal

request = urllib.request.Request(
    "https://api.keenable.ai/v1/usage?from=2026-11-01&to=2026-11-30",
    headers={"X-API-Key": os.environ["KEENABLE_API_KEY"]},
)
with urllib.request.urlopen(request) as response:
    usage = json.load(response, parse_float=Decimal)

for key in usage["keys"]:
    credits = Decimal(key["credits_total"])
    print(key["label"], credits, "credits =", credits / 250, "USD")
```

It prints one line per key with its credits and their value in US dollars, such as `Production 150 credits = 0.6 USD`.

## Errors

| Status | `code` | When |
| - | - | - |
| `400` | [`invalid_parameter`](https://docs.keenable.ai/errors#invalid-parameter) | `from` or `to` isn't a real `YYYY-MM-DD` date (such as `2026-02-30`), only one of them was sent, `to` is before `from`, or the window is longer than 92 days. `param` names the parameter to fix. |
| `400` | [`unknown_parameter`](https://docs.keenable.ai/errors#unknown-parameter) | The request has a query parameter other than `from`, `to` and `days`. |
| `401` | [`missing_api_key`](https://docs.keenable.ai/errors#missing-api-key) | The request has no API key and no bearer token. |
| `401` | [`invalid_api_key`](https://docs.keenable.ai/errors#invalid-api-key) | The key is malformed, unknown or expired. |
| `401` | [`invalid_bearer_token`](https://docs.keenable.ai/errors#invalid-bearer-token) | The bearer token isn't accepted. |
| `403` | [`credentials_forbidden`](https://docs.keenable.ai/errors#credentials-forbidden) | The key was revoked. |
| `409` | [`no_active_organization`](https://docs.keenable.ai/errors#no-active-organization) | You signed in, but your account has no active organization. Select one in the console. |
| `429` | [`rate_limit_per_second`](https://docs.keenable.ai/errors#rate-limit-per-second) | Your organization's calls outside search, fetch and Time Machine, this one included, went over 20 in a second. Wait for `Retry-After`. |
| `500` | [`internal_error`](https://docs.keenable.ai/errors#internal-error) | The usage couldn't be read. Wait for `Retry-After` and retry up to 3 times, then contact support with the `request_id`. |
| `503` | [`auth_unavailable`](https://docs.keenable.ai/errors#auth-unavailable) | Keenable couldn't check your credentials at that moment. The key may be fine: wait for `Retry-After` and send the same request again. |

Retrying a `400` unchanged returns the same error.

## Related pages

* [Balance and usage](https://docs.keenable.ai/credits.md) explains the free allowance, the prepaid balance and the console's Usage page.
* [Billing API](https://docs.keenable.ai/api-reference/billing.md) returns your prices and your organization's balance.


## OpenAPI

````yaml GET /v1/usage
openapi: 3.0.3
info:
  title: Keenable API
  version: 0.1.64
  description: Web search, page fetching, Time Machine and monitors API.
servers:
  - url: https://api.keenable.ai
    description: Production
security:
  - apiKey: []
paths:
  /v1/usage:
    get:
      tags:
        - Billing
      summary: Get usage by API key
      description: >-
        Requests and credits for each API key of your organization, per UTC day,
        so you can reconcile what each key (for example production and staging)
        used against your own records. Answers for the whole organization of the
        key or signed-in session, all of its keys included. Pick the window with
        `from` and `to` (a calendar month, for example), or with `days` for the
        last days up to today; without either you get the last 30 days. Credits
        are what each call is priced at before the free monthly allowance is
        applied, since that allowance belongs to the organization as a whole,
        not to a key; 1 credit is one search at the base rate. An operation your
        organization is measured on but not charged for shows its requests with
        0 credits. Calls made from the console without a key are listed under
        `key_id: null` (label "Console"). Read-only and free: this call is not
        billed and does not appear in the usage it reports.
      operationId: usage
      parameters:
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date
            example: '2026-11-01'
          description: >-
            First UTC day of the window, YYYY-MM-DD, included. Send together
            with `to`; the window is at most 92 days. Takes precedence over
            `days`.
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date
            example: '2026-11-30'
          description: >-
            Last UTC day of the window, YYYY-MM-DD, included. Send together with
            `from`, on or after it.
        - name: days
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 90
            default: 30
          description: >-
            The last this many UTC days, today included. Values outside 1–90 are
            clamped. Ignored when `from` and `to` are sent.
      responses:
        '200':
          description: Usage by API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageByKey'
              examples:
                two_days:
                  summary: Two days, one entry for each
                  value:
                    from: '2026-11-01'
                    to: '2026-11-02'
                    days: 2
                    keys:
                      - key_id: abc
                        label: Production
                        display: keen_abc_…
                        revoked: false
                        total: 15
                        credits_total: 17.25
                        daily:
                          - date: '2026-11-01'
                            search: 10
                            fetch: 2
                            select: 0
                            extract: 0
                            credits:
                              search: 12
                              fetch: 2
                              select: 0
                              extract: 0
                          - date: '2026-11-02'
                            search: 3
                            fetch: 0
                            select: 0
                            extract: 0
                            credits:
                              search: 3.25
                              fetch: 0
                              select: 0
                              extract: 0
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          description: >-
            A parameter is invalid (code invalid_parameter, with `param`):
            `from` or `to` is not a YYYY-MM-DD date, only one of them was sent,
            `to` is before `from`, or the window is longer than 92 days. An
            unknown query parameter returns code unknown_parameter. Fix the
            request; retrying unchanged returns the same error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The API key was revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '409':
          description: >-
            The signed-in user has no active organization
            (`no_active_organization`). Select one in the console.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '429':
          $ref: '#/components/responses/FixedRateLimitExceeded'
        '500':
          description: >-
            Internal server error. code internal_error, retryable: wait
            retry_after_seconds and retry up to 3 times, then report the
            request_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '503':
          $ref: '#/components/responses/AuthUnavailable'
      security:
        - apiKey: []
        - bearerAuth: []
components:
  schemas:
    UsageByKey:
      type: object
      required:
        - from
        - to
        - days
        - keys
      properties:
        from:
          type: string
          format: date
          description: First UTC day of the window, included.
        to:
          type: string
          format: date
          description: Last UTC day of the window, included.
        days:
          type: integer
          minimum: 1
          description: Days in the window.
        keys:
          type: array
          items:
            $ref: '#/components/schemas/UsageByKeyKey'
          description: >-
            Keys with requests or credits in the window, most credits first,
            then most requests.
    ApiError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error category (e.g. "Bad request", "Not found")
          example: Invalid parameter
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - permission_error
            - billing_error
            - rate_limit_error
            - target_error
            - api_error
          description: >-
            Closed category of the error, set together with code:
            invalid_request_error (fix the request), authentication_error
            (missing or rejected credentials), permission_error (valid
            credentials, not allowed), billing_error (credits or payment),
            rate_limit_error (slow down, retry after retry_after_seconds),
            target_error (the page being fetched failed, not Keenable) and
            api_error (our fault, retry). The mapping is per code, not per
            status. This set does not grow casually.
        message:
          type: string
          description: >-
            Human-readable detail about what went wrong. Always present; when
            nothing more specific applies it repeats `error`.
          example: '"max_results": must be an integer between 1 and 50'
        details:
          description: Structured details (validation errors, etc.)
        code:
          type: string
          enum:
            - admin_required
            - allowance_unavailable
            - api_key_required
            - auth_internal_error
            - auth_unavailable
            - authorization_pending
            - balance_check_unavailable
            - billing_account_not_found
            - card_expired
            - card_not_found
            - card_storage_unavailable
            - card_too_large
            - company_email_required
            - content_not_extracted
            - credentials_forbidden
            - device_code_already_used
            - device_code_client_mismatch
            - device_code_denied
            - device_code_expired
            - device_login_unavailable
            - dns_lookup_failed
            - domain_record_missing
            - domain_taken
            - fetch_mode_unavailable
            - fetch_rate_limited
            - fetcher_unavailable
            - forbidden
            - run_in_progress
            - idempotency_conflict
            - insufficient_credits
            - internal_error
            - internal_route_not_public
            - invalid_api_key
            - invalid_authorization_header
            - invalid_bearer_token
            - invalid_json
            - invalid_or_expired_promo_code
            - invalid_parameter
            - invalid_request
            - invalid_session_token
            - last_admin
            - mcp_host_not_allowed
            - mcp_message_too_complex
            - mcp_not_acceptable
            - mcp_origin_not_allowed
            - member_roles_not_enabled
            - method_not_allowed
            - missing_api_key
            - missing_app_title
            - missing_parameter
            - missing_session_token
            - mode_requires_api_key
            - monitor_limit_reached
            - monitor_option_not_supported
            - monitors_not_enabled
            - monitors_unavailable
            - no_active_organization
            - not_found
            - not_stored
            - page_not_found
            - paid_rate_limit_per_second
            - payment_facilitator_error
            - payment_rejected
            - payment_required
            - payment_settlement_failed
            - payment_verification_unavailable
            - payments_region_unavailable
            - payments_unavailable
            - private_url_not_allowed
            - promo_card_required
            - promo_card_reused
            - promo_code_not_active
            - promo_new_accounts_only
            - public_domain_requires_api_key
            - public_rate_limit_domain
            - public_rate_limit_hourly
            - public_rate_limit_per_second
            - query_rejected
            - rate_limit_per_second
            - rate_limited
            - remove_self
            - request_rejected
            - request_too_large
            - route_not_found
            - search_failed_upstream
            - search_overloaded
            - search_rate_limited
            - search_rejected_upstream
            - search_upstream_error
            - select_concurrency_limited
            - select_disabled
            - select_internal_error
            - select_query_failed
            - select_query_invalid
            - select_timeout
            - select_unavailable
            - service_not_configured
            - sign_in_required
            - slow_down
            - target_blocked
            - target_http_error
            - target_paywalled
            - target_rate_limited
            - target_timeout
            - target_unreachable
            - target_wrong_page
            - time_machine_not_enabled
            - endpoint_moved
            - time_machine_versions_unavailable
            - unauthenticated
            - unknown_parameter
            - unknown_tool
            - unprocessable
            - unsupported_content_encoding
            - unsupported_grant_type
            - user_code_not_found
            - user_code_used
            - version_not_found
            - zdr_prompt_unsupported
            - zdr_unsupported_profile
            - zeroclick_allowance_denied
            - zeroclick_request_id_missing
            - zeroclick_signature_expired
            - zeroclick_signature_invalid
            - zeroclick_signature_malformed
            - zeroclick_signature_missing
            - zeroclick_signing_key_unknown
          description: >-
            Stable machine-readable code, one per entry in the error catalog
            (docs/error-catalog.json). Every error response from the endpoints
            in this document carries one; branch on it (or on type) rather than
            on `error` or `message`. Rate limits: rate_limit_per_second (your
            organization), public_rate_limit_per_second and
            public_rate_limit_hourly (keyless, per IP), public_rate_limit_domain
            (keyless requests that target a restricted site, shared by all
            callers), paid_rate_limit_per_second (x402);
            public_domain_requires_api_key (keyless requests that target a
            restricted site need an API key; not retryable). Our own capacity:
            search_rate_limited, fetch_rate_limited, search_overloaded. Credits
            and payment: insufficient_credits, payment_required,
            payment_settlement_failed, payments_unavailable,
            payments_region_unavailable, payment_facilitator_error. Fetch
            target: target_unreachable, target_timeout, target_blocked,
            target_rate_limited, page_not_found, target_paywalled,
            target_wrong_page, content_not_extracted, target_http_error,
            private_url_not_allowed. Validation: missing_parameter,
            invalid_parameter, unknown_parameter, missing_app_title,
            invalid_request, request_too_large. Authentication: missing_api_key,
            invalid_api_key, invalid_bearer_token, credentials_forbidden,
            auth_unavailable. Fallbacks for anything else: forbidden, not_found,
            unprocessable, unauthenticated, rate_limited, request_rejected,
            internal_error. New codes may be added; existing ones are never
            renamed.
        fix:
          type: string
          description: >-
            One sentence on what to do next, including whether retrying helps.
            Set together with code. Never echoes the API key or the request
            body.
        keyless:
          type: string
          description: >-
            The keyless alternative: /v1/search/public and /v1/fetch/public work
            without a key, rate-limited per IP, and need the X-Keenable-Title
            header (or keenable_title query parameter) naming the app. Set only
            on 401s from /v1/search and /v1/fetch, which have a public
            equivalent; time_machine 401s leave it out.
        api_keys_url:
          type: string
          format: uri
          description: >-
            Where to create or copy an API key. Set on authentication errors and
            on payment_required.
        docs_url:
          type: string
          format: uri
          description: >-
            The section of https://docs.keenable.ai/errors that covers this
            code: the code with underscores replaced by hyphens, for example
            #invalid-api-key, #rate-limit-per-second or #target-paywalled. Set
            together with code.
        request_id:
          type: string
          description: >-
            Request id for support. Same value as the X-Request-Id response
            header, which every response carries.
        retryable:
          type: boolean
          description: >-
            Whether the same request can succeed if sent again unchanged. When
            true, wait retry_after_seconds (or Retry-After) first. When false,
            change the request or follow fix.
        retry_after_seconds:
          type: integer
          minimum: 1
          description: >-
            Seconds to wait before retrying; the same value as the Retry-After
            header. Set on retryable errors.
        retryAfter:
          type: integer
          description: >-
            Deprecated alias of retry_after_seconds, kept on 429s from Keenable
            rate limits for existing clients.
        limit:
          type: object
          description: 'On 429s from a Keenable rate limit: which limit was hit.'
          required:
            - scope
            - window
            - max
            - resets_at
          properties:
            scope:
              type: string
              enum:
                - organization
                - user
                - ip
                - payer
                - agent
                - site
              description: >-
                What the limit counts: your organization (all its keys), your
                signed-in user (session requests without an organization), your
                IP address (keyless), the paying wallet or agent (pay per
                request), or every keyless request that targets a restricted
                site.
            window:
              type: string
              enum:
                - second
                - minute
                - hour
            max:
              type: integer
              description: Requests allowed per window.
            resets_at:
              type: string
              format: date-time
              description: When you can send the next request.
        param:
          type: string
          description: 'On validation errors: the parameter (or header) that failed.'
        allowed:
          type: array
          items:
            type: string
          description: 'On unknown_parameter: the parameters the endpoint accepts.'
        did_you_mean:
          type: object
          additionalProperties:
            type: string
          description: >-
            On unknown_parameter, when an unknown name looks like a supported
            parameter: maps that name to the parameter to rename it to, for
            example {"count": "max_results"}. Left out when nothing is close.
        billing_url:
          type: string
          format: uri
          description: 'On insufficient_credits: where to buy credits.'
        auto_top_up_url:
          type: string
          format: uri
          description: >-
            On insufficient_credits: how to turn on auto top-up so the balance
            refills itself.
        pay_per_request:
          type: string
          description: >-
            On insufficient_credits, when pay-per-request is enabled: the x402
            alternative, which needs no key or credits.
        feature:
          type: string
          description: >-
            On time_machine_not_enabled: the feature the request needs
            (time_machine).
        field:
          type: string
          description: 'On invalid_filter: the rejected filter parameter (exclude_domains).'
        value:
          type: string
          description: >-
            On invalid_filter: what was rejected. One entry as sent (its first
            64 characters and "..." when it is over 2,048 bytes), "<n> entries"
            when the list has more than 2,000 entries as sent, or "more than
            1000 distinct hosts" when it names more than 1,000 distinct hosts
            after clean-up.
        reason:
          type: string
          description: >-
            On invalid_filter: why the entry or list was rejected and how to fix
            it. On payment_rejected and zeroclick_allowance_denied: why the
            payment or allowance was refused, as reported by the facilitator or
            ZeroClick.
        select_request_id:
          type: string
          description: >-
            On select_* refusals: the SELECT service's own request id, when it
            sent one. request_id is always Keenable's.
    UsageByKeyKey:
      type: object
      required:
        - key_id
        - label
        - display
        - revoked
        - total
        - credits_total
        - daily
      properties:
        key_id:
          type: string
          nullable: true
          description: >-
            The key's id, the middle part of its masked form. null for calls
            made from the console without a key.
        label:
          type: string
          description: >-
            The key's name, its masked form when it has none, "Console" for
            key_id null, or "Deleted key" for a key no longer in the
            organization.
        display:
          type: string
          nullable: true
          description: >-
            The masked key, such as keen_abc_…; null for the console and deleted
            keys.
        revoked:
          type: boolean
          description: true for a revoked or deleted key.
        total:
          type: integer
          minimum: 0
          description: Requests in the window, all products.
        credits_total:
          type: number
          minimum: 0
          description: >-
            Credits in the window, all products, before the free monthly
            allowance.
        daily:
          type: array
          items:
            $ref: '#/components/schemas/UsageByKeyDay'
          description: >-
            One entry per day of the window, oldest first, days without calls
            included.
    UsageByKeyDay:
      type: object
      required:
        - date
        - search
        - fetch
        - select
        - extract
        - credits
      properties:
        date:
          type: string
          format: date
          description: The UTC day, YYYY-MM-DD.
        search:
          type: integer
          minimum: 0
          description: Searches in every mode, Time Machine searches included.
        fetch:
          type: integer
          minimum: 0
          description: Fetched pages.
        select:
          type: integer
          minimum: 0
          description: SELECT calls and WebQL-mode searches.
        extract:
          type: integer
          minimum: 0
          description: Rows put through a semantic extract.
        credits:
          $ref: '#/components/schemas/UsageByKeyCredits'
    UsageByKeyCredits:
      type: object
      required:
        - search
        - fetch
        - select
        - extract
      properties:
        search:
          type: number
          description: >-
            Searches in every mode, Time Machine searches included, and extra
            search results.
        fetch:
          type: number
          description: Fetched pages.
        select:
          type: number
          description: >-
            SELECT calls and what they run: WebQL-mode searches, the SELECT cost
            and agent runs.
        extract:
          type: number
          description: Rows put through a semantic extract.
      description: >-
        Credits per product, before the free monthly allowance. 0 for an
        operation your organization is not charged for.
  headers:
    RateLimitLimit:
      description: >-
        The most requests allowed in the window of the per-IP limit this
        response counted against: hourly on /v1/search/public and
        /v1/fetch/public, per minute on keyless GET /v1/billing. Sent on every
        keyless response once that limit has counted the request, errors and
        429s included. Absent on a 400 missing_app_title and a
        public_rate_limit_per_second 429 sent before the request was counted, on
        a body the API rejects before routing (malformed JSON, 413), and on
        keyed responses.
      schema:
        type: integer
      example: 1000
    RateLimitRemaining:
      description: Requests left in the current window of that per-IP limit.
      schema:
        type: integer
      example: 997
    RateLimitReset:
      description: >-
        When the current window of that per-IP limit resets, as an ISO 8601 UTC
        timestamp (not Unix seconds).
      schema:
        type: string
        format: date-time
      example: '2026-11-30T15:00:00.000Z'
    XRequestId:
      description: >-
        ID of this request, a UUID v7 the API sets on every response, errors
        included. The same value as request_id in an error body. Include it when
        you report a problem.
      schema:
        type: string
      example: 019ad4c2-7f3e-7b21-9c4d-2f1e8a6b0c35
    RetryAfter:
      description: >-
        Seconds to wait before retrying, as delta-seconds (never an HTTP date).
        The same value as retry_after_seconds in the body.
      schema:
        type: integer
        minimum: 1
      example: 1
  responses:
    Unauthorized:
      description: >-
        Missing or invalid API key or bearer token. `code` says which
        (missing_api_key, invalid_api_key, invalid_bearer_token), and `fix` what
        to do.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    FixedRateLimitExceeded:
      description: >-
        Rate limit exceeded (code rate_limit_per_second). This endpoint has a
        fixed limit of 20 requests per second per organization, for API keys and
        signed-in sessions alike, separate from the /v1/search and /v1/fetch
        limit and not raised by your plan or top-ups. `limit` gives its scope,
        window and max. Wait for `Retry-After`, then retry, and space out these
        calls.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    AuthUnavailable:
      description: >-
        Keenable could not check the credentials just now; the key itself may be
        fine. code auth_unavailable, retryable: wait Retry-After and retry the
        same request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Obtain one from the Keenable dashboard.
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Two kinds of token go in `Authorization: Bearer <token>`. (1) An API
        key: a key sent this way is accepted wherever `X-API-Key` is, and is
        billed and limited the same way. (2) The access token of a signed-in
        Keenable user, as issued by our OAuth sign-in, accepted on /v1/search,
        /v1/fetch, /v1/billing, /v1/time-machine and /v1/monitors so a hosted
        MCP client can call them on the caller's behalf. Usage bills the
        organization the user is currently in; an org_id query parameter is not
        honored on these endpoints. GET /v1/auth/user takes only an API key
        (`apiKey`, or `apiKeyBearer` for a key in this header): a user access
        token there answers 401 `api_key_required`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.