AlterLabAlterLab
PricingComparePlaygroundBlogDocsChangelog
    AlterLabAlterLab
    PricingComparePlaygroundBlogDocsChangelog
    IntroductionQuickstartInstallationYour First Request
    REST APIJob PollingAPI KeysSessions APINew
    OverviewPythonNode.js
    JavaScript RenderingOutput FormatsPDF & OCRCachingWebhooksJSON Schema FilteringWebSocket Real-TimeBring Your Own ProxyProAuthenticated ScrapingNewWeb CrawlingBatch ScrapingSchedulerChange DetectionCloud Storage ExportSpend LimitsOrganizations & TeamsAlerts & Notifications
    Structured ExtractionAIE-commerce ScrapingNews MonitoringPrice MonitoringMulti-Page CrawlingMonitoring DashboardAI Agent / MCPMCPData Pipeline to Cloud
    PricingRate LimitsError Codes
    From FirecrawlFrom ApifyFrom ScrapingBee / ScraperAPIFirecrawl v0 API ReferenceLegacy
    PlaygroundPricingStatus
    API Reference
    Auto-generated

    Keys

    API reference for keys endpoints.

    Auto-generated

    This page was generated from the OpenAPI spec. Runmake generate-docs to refresh after spec changes.

    POST /api/v1/api-keys/legacy-notice-shown

    POST
    /api/v1/api-keys/legacy-notice-shown

    Mark Legacy Notice Shown

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/api-keys/legacy-notice-shown \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    GET /api/v1/api-keys/legacy-status

    GET
    /api/v1/api-keys/legacy-status

    Get Legacy Keys Status

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/legacy-status \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "has_legacy_keys": true,
      "legacy_key_count": 0,
      "notice_shown": true
    }

    PATCH /api/v1/api-keys/{key_id}

    PATCH
    /api/v1/api-keys/{key_id}

    Rename an API key

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key id
    X-Organization-IdstringOptionalX-Organization-Id
    namestring
    Required
    New name for the API key

    Request Example

    Bash
    curl -X PATCH https://api.alterlab.io/api/v1/api-keys/<key_id> \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "example_name"
      }'

    Response Example

    JSON
    {
      "id": "example",
      "name": "example",
      "key_prefix": "example",
      "key": "example",
      "scopes": [],
      "created_at": "example"
    }

    GET /api/v1/api-keys/{key_id}/decrypt

    GET
    /api/v1/api-keys/{key_id}/decrypt

    Decrypt an API key

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key id
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/<key_id>/decrypt \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "key": "example"
    }

    GET /api/v1/api-keys/{key_id}/limits

    GET
    /api/v1/api-keys/{key_id}/limits

    Get Key Limits

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/<key_id>/limits \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "api_key_id": "example",
      "api_key_name": "example",
      "limits": "example",
      "has_limits": true
    }

    PUT /api/v1/api-keys/{key_id}/limits

    PUT
    /api/v1/api-keys/{key_id}/limits

    Set Key Limits

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    X-Organization-IdstringOptionalX-Organization-Id
    budget_limit_microcentsintegerOptionalbudget_limit_microcents
    request_limitintegerOptionalrequest_limit
    reset_period"daily" | "weekly" | "monthly"OptionalHow often the counters reset.Default: monthly
    enabledbooleanOptionalWhether this limit is active.Default: True

    Request Example

    Bash
    curl -X PUT https://api.alterlab.io/api/v1/api-keys/<key_id>/limits \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "reset_period": "...",
        "enabled": false
      }'

    Response Example

    JSON
    {
      "api_key_id": "example",
      "api_key_name": "example",
      "limits": "example",
      "has_limits": true
    }

    DELETE /api/v1/api-keys/{key_id}/limits

    DELETE
    /api/v1/api-keys/{key_id}/limits

    Delete Key Limits

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X DELETE https://api.alterlab.io/api/v1/api-keys/<key_id>/limits \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "status": "ok"
    }

    POST /api/v1/api-keys/{key_id}/regenerate

    POST
    /api/v1/api-keys/{key_id}/regenerate

    Regenerate an API key

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key id
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X POST https://api.alterlab.io/api/v1/api-keys/<key_id>/regenerate \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "id": "example",
      "name": "example",
      "key_prefix": "example",
      "key": "example",
      "scopes": [],
      "created_at": "example"
    }

    GET /api/v1/api-keys/{key_id}/usage

    GET
    /api/v1/api-keys/{key_id}/usage

    Get Key Usage

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    daysintegerOptionalDays of usage to queryDefault: 30
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/<key_id>/usage \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "api_key_id": "example",
      "api_key_name": "example",
      "total_requests": 0,
      "successful_requests": 0,
      "failed_requests": 0,
      "total_spend_microcents": 0
    }

    GET /api/v1/api-keys/{key_id}/usage/by-tier

    GET
    /api/v1/api-keys/{key_id}/usage/by-tier

    Get Key Usage By Tier

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    daysintegerOptionalDays of usage to queryDefault: 30
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/<key_id>/usage/by-tier \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "api_key_id": "example",
      "days": 0,
      "tiers": []
    }

    GET /api/v1/api-keys/{key_id}/usage/errors

    GET
    /api/v1/api-keys/{key_id}/usage/errors

    Get Key Usage Errors

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    daysintegerOptionalDays of usage to queryDefault: 30
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/<key_id>/usage/errors \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "api_key_id": "example",
      "days": 0,
      "total_errors": 0,
      "errors": []
    }

    GET /api/v1/api-keys/{key_id}/usage/requests

    GET
    /api/v1/api-keys/{key_id}/usage/requests

    Get Key Usage Requests

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    daysintegerOptionalDays of usage to queryDefault: 30
    pageintegerOptionalPage number (1-based)Default: 1
    page_sizeintegerOptionalRows per pageDefault: 50
    status"success" | "failed"OptionalFilter by request outcome
    tierstringOptionalFilter by tier_used value
    domainstringOptionalSubstring match on extracted domain
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/<key_id>/usage/requests \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "api_key_id": "example",
      "total": 0,
      "page": 0,
      "page_size": 0,
      "total_pages": 0,
      "items": []
    }

    GET /api/v1/api-keys/{key_id}/usage/timeseries

    GET
    /api/v1/api-keys/{key_id}/usage/timeseries

    Get Key Usage Timeseries

    Parameters

    NameTypeRequiredDescription
    key_idstring
    Required
    API key UUID
    daysintegerOptionalDays of usage to queryDefault: 30
    X-Organization-IdstringOptionalX-Organization-Id

    Request Example

    Bash
    curl -X GET https://api.alterlab.io/api/v1/api-keys/<key_id>/usage/timeseries \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Response Example

    JSON
    {
      "api_key_id": "example",
      "days": 0,
      "granularity": "example",
      "data": []
    }
    Last updated: March 2026

    On this page