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

# API Key Stats

> Retrieve usage statistics for your API key

Retrieve usage statistics for your API key including request counts, webhook delivery stats, event counts, and tracked source breakdown.

## Response

<ResponseField name="data" type="object">
  API key usage statistics
</ResponseField>

<ResponseField name="data.name" type="string">
  Name of the API key
</ResponseField>

<ResponseField name="data.createdAt" type="string">
  ISO 8601 timestamp of when the key was created
</ResponseField>

<ResponseField name="data.totalRequests" type="number">
  Total number of API requests made
</ResponseField>

<ResponseField name="data.successRequests" type="number">
  Number of successful requests
</ResponseField>

<ResponseField name="data.errorRequests" type="number">
  Number of failed requests
</ResponseField>

<ResponseField name="data.webhooksDelivered" type="number">
  Total webhooks successfully delivered
</ResponseField>

<ResponseField name="data.webhooksFailed" type="number">
  Total webhooks that failed to deliver
</ResponseField>

<ResponseField name="data.sseEvents" type="number">
  Number of SSE events sent
</ResponseField>

<ResponseField name="data.wsEvents" type="number">
  Number of WebSocket events sent
</ResponseField>

<ResponseField name="data.endpointUsage" type="object">
  Breakdown of request counts per endpoint
</ResponseField>

<ResponseField name="data.lastUsedAt" type="string">
  ISO 8601 timestamp of last API key usage
</ResponseField>

<ResponseField name="data.trackedSources" type="object">
  Count of tracked sources per platform (`x`, `telegram`, `discord`, `web`,
  `rss`)
</ResponseField>

<ResponseField name="message" type="string">
  Status message
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X GET https://scrape.st/api-key/stats \
    -H "x-api-key: YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "name": "My Key",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "totalRequests": 15420,
      "successRequests": 15100,
      "errorRequests": 320,
      "webhooksDelivered": 8900,
      "webhooksFailed": 12,
      "sseEvents": 4200,
      "wsEvents": 3100,
      "endpointUsage": {
        "GET /x/user": 500,
        "POST /track/x": 200
      },
      "lastUsedAt": "2026-05-25T18:00:00.000Z",
      "trackedSources": {
        "x": 45,
        "telegram": 12,
        "discord": 3,
        "web": 5,
        "rss": 2
      }
    },
    "message": "API key statistics retrieved successfully."
  }
  ```
</ResponseExample>
