# Account & usage

> For AI agents: the index of these docs is at https://scrapelyserp.com/reference/llms.txt (every page it lists has a Markdown version like this one).

Balance, concurrency and daily usage for the key's account.

## Endpoints {#endpoints}

| Method | Path | Does |
| --- | --- | --- |
| `GET` | `/v1/account` | [Get account](#get-account) |
| `GET` | `/v1/monitoring/plans` | [List monitoring plans](#list-monitoring-plans) |
| `GET` | `/v1/monitoring/subscription` | [Get the monitoring subscription](#get-monitoring-subscription) |
| `POST` | `/v1/monitoring/subscription` | [Start a monitoring subscription](#subscribe-monitoring) |
| `POST` | `/v1/monitoring/subscription/portal` | [Open the billing portal](#open-billing-portal) |
| `GET` | `/v1/usage` | [Get usage](#get-usage) |

How it works, when to use what, and what it costs: [Tiers & credits](/docs/credits). Base URL, authentication and errors: [Overview](/reference/overview).

## GET /v1/account {#get-account}

**Get account.**

Balance, lifetime credits bought and credits spent (all in credits), concurrency limit (with the calls in flight now and the next tier), auto top-up, and which key made the call. Free.

**Request**

:::codeGroup{syncKey="lang"}
```bash title="cURL"
curl "https://api.scrapelyserp.com/v1/account" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY"
```
```python title="Python"
import os
import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}

r = requests.get(
    "https://api.scrapelyserp.com/v1/account",
    headers=HEADERS,
    timeout=30,
)
r.raise_for_status()
data = r.json()
```
```javascript title="Node.js"
const res = await fetch('https://api.scrapelyserp.com/v1/account', {
  headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
  signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
```
:::

**Response**

:::codeGroup
```json title="200 OK"
{
  "object": "account",
  "id": "acct_4d5e6f7a8b9c0d1e",
  "name": "Acme Retail",
  "email": "dev@example.com",
  "balance": 12.4408674,
  "balance_breakdown": {
    "subscription": 0,
    "purchased": 12.4408674,
    "total": 12.4408674
  },
  "subscription": null,
  "lifetime_credits": 60.2,
  "credits_spent": 47.7591326,
  "concurrency": {
    "limit": 50,
    "in_flight": 3,
    "next_tier": {
      "concurrency": 100,
      "at_lifetime_credits": 120
    }
  },
  "auto_topup": {
    "enabled": true,
    "threshold_credits": 5,
    "pack_id": "credits-20"
  },
  "webhook_endpoints": 1,
  "api_key": {
    "id": "key_9a8b7c6d5e4f",
    "name": "Production",
    "prefix": "sk_live_3f9a"
  },
  "created_at": "2026-09-01T12:00:00.000Z"
}
```
```json title="401 Unauthorized"
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or revoked API key.",
    "param": "api_key",
    "docs": "/docs/errors#unauthorized"
  }
}
```
:::

**Responses**

| Status | Meaning |
| --- | --- |
| `200` | The account the key belongs to. |
| `401` | `UNAUTHORIZED`: missing, unknown or revoked key. |
| `429` | `RATE_LIMITED` or `CONCURRENCY_LIMIT`. Honour `Retry-After`. |
| `500` | `INTERNAL`: our fault, not charged. Quote `X-Request-Id`. |

**Response fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` | "account" | — |
| `id` | string | — |
| `name` | string | — |
| `email` | string | — |
| `balance` | number | Credits you can spend now, fractional: monitoring subscription credits plus purchased credits (`balance_breakdown.total`). |
| `balance_breakdown` | object | Where `balance` comes from. Every charge spends subscription credits first, then purchased ones. |
| `balance_breakdown.subscription` | number | What is left of this period's monitoring plan credits. Reset (not added to) each paid period. |
| `balance_breakdown.purchased` | number | Credits from packs and the signup grant. They never expire. |
| `balance_breakdown.total` | number | The two together; equals `balance`. |
| `subscription` | object or null | The monitoring subscription (needed to create, resume or run watchlists), or null. |
| `subscription.plan` | string | — |
| `subscription.status` | string | One of: `active`, `past_due`, `canceled`, `expired`, `suspended`. |
| `subscription.period_end` | string (date-time) or null | — |
| `subscription.cancel_at_period_end` | boolean | — |
| `subscription.monthly_credits` | number or null | Credits each paid period allocates. |
| `subscription.credits_remaining` | number | This period's credits not yet spent (same as `balance_breakdown.subscription`). |
| `lifetime_credits` | number | Credits ever purchased, plus the signup grant. Sets your concurrency tier. |
| `credits_spent` | number | Credits charged so far, fractional. |
| `concurrency` | object | — |
| `concurrency.limit` | integer | — |
| `concurrency.in_flight` | integer | — |
| `concurrency.next_tier` | object or null | — |
| `auto_topup` | object or null | — |
| `auto_topup.enabled` | boolean | — |
| `auto_topup.threshold_credits` | number | A pack is bought when the balance falls below this many credits. |
| `auto_topup.pack_id` | string | — |
| `webhook_endpoints` | integer | Registered webhook endpoints (`GET /v1/webhook_endpoints` lists them). |
| `api_key` | object | — |
| `api_key.id` | string | — |
| `api_key.name` | string | — |
| `api_key.prefix` | string | — |
| `created_at` | string (date-time) | — |

## GET /v1/monitoring/plans {#list-monitoring-plans}

**List monitoring plans.**

The monitoring plans on offer. A subscription is needed to create, resume or run watchlists; each paid month allocates `monthly_credits`, spent before purchased credits and reset (no rollover) every period. `purchasable` is false while a plan cannot be bought yet. Free.

**Request**

:::codeGroup{syncKey="lang"}
```bash title="cURL"
curl "https://api.scrapelyserp.com/v1/monitoring/plans" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY"
```
```python title="Python"
import os
import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}

r = requests.get(
    "https://api.scrapelyserp.com/v1/monitoring/plans",
    headers=HEADERS,
    timeout=30,
)
r.raise_for_status()
data = r.json()
```
```javascript title="Node.js"
const res = await fetch('https://api.scrapelyserp.com/v1/monitoring/plans', {
  headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
  signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
```
:::

**Response**

:::codeGroup
```json title="200 OK"
{
  "object": "list",
  "data": [
    {
      "object": "monitoring_plan",
      "id": "starter",
      "name": "Starter",
      "price": {
        "amount": 50,
        "currency": "USD",
        "interval": "month"
      },
      "monthly_credits": 14.285714286,
      "max_monitors": null,
      "purchasable": true
    },
    {
      "object": "monitoring_plan",
      "id": "growth",
      "name": "Growth",
      "price": {
        "amount": 100,
        "currency": "USD",
        "interval": "month"
      },
      "monthly_credits": 28.571428571,
      "max_monitors": null,
      "purchasable": true
    }
  ]
}
```
```json title="401 Unauthorized"
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or revoked API key.",
    "param": "api_key",
    "docs": "/docs/errors#unauthorized"
  }
}
```
:::

**Responses**

| Status | Meaning |
| --- | --- |
| `200` | The enabled plans, cheapest first. |
| `401` | `UNAUTHORIZED`: missing, unknown or revoked key. |
| `429` | `RATE_LIMITED` or `CONCURRENCY_LIMIT`. Honour `Retry-After`. |
| `500` | `INTERNAL`: our fault, not charged. Quote `X-Request-Id`. |

**Response fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` | "list" | — |
| `data` | object[] | — |
| `data[].object` | "monitoring_plan" | — |
| `data[].id` | string | — |
| `data[].name` | string | — |
| `data[].price` | object | — |
| `data[].monthly_credits` | number | — |
| `data[].max_monitors` | integer or null | Most watchlists the plan allows; null = no plan limit. |
| `data[].purchasable` | boolean | — |

## GET /v1/monitoring/subscription {#get-monitoring-subscription}

**Get the monitoring subscription.**

Plan, status (`null`: none), whether monitors may run now (`entitled`), the period, and what is left of its credits. Free.

**Request**

:::codeGroup{syncKey="lang"}
```bash title="cURL"
curl "https://api.scrapelyserp.com/v1/monitoring/subscription" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY"
```
```python title="Python"
import os
import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}

r = requests.get(
    "https://api.scrapelyserp.com/v1/monitoring/subscription",
    headers=HEADERS,
    timeout=30,
)
r.raise_for_status()
data = r.json()
```
```javascript title="Node.js"
const res = await fetch('https://api.scrapelyserp.com/v1/monitoring/subscription', {
  headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
  signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
```
:::

**Response**

:::codeGroup
```json title="200 OK"
{
  "object": "monitoring_subscription",
  "status": "active",
  "entitled": true,
  "plan": {
    "id": "growth",
    "name": "Growth",
    "monthly_credits": 28.571428571,
    "max_monitors": null
  },
  "period_start": "2026-11-01T00:00:00.000Z",
  "period_end": "2026-12-01T00:00:00.000Z",
  "cancel_at_period_end": false,
  "credits_remaining": 21.5,
  "manage_url": "https://scrapelyserp.com/dashboard/monitors"
}
```
```json title="401 Unauthorized"
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or revoked API key.",
    "param": "api_key",
    "docs": "/docs/errors#unauthorized"
  }
}
```
:::

**Responses**

| Status | Meaning |
| --- | --- |
| `200` | The subscription. |
| `401` | `UNAUTHORIZED`: missing, unknown or revoked key. |
| `429` | `RATE_LIMITED` or `CONCURRENCY_LIMIT`. Honour `Retry-After`. |
| `500` | `INTERNAL`: our fault, not charged. Quote `X-Request-Id`. |

**Response fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` | "monitoring_subscription" | — |
| `status` | string or null | One of: `active`, `past_due`, `canceled`, `expired`, `suspended`. |
| `entitled` | boolean | Watchlists may be created, resumed and run. |
| `plan` | object or null | — |
| `plan.id` | string | — |
| `plan.name` | string or null | — |
| `plan.monthly_credits` | number or null | — |
| `plan.max_monitors` | integer or null | — |
| `period_start` | string (date-time) or null | — |
| `period_end` | string (date-time) or null | — |
| `cancel_at_period_end` | boolean | — |
| `credits_remaining` | number | This period's subscription credits not yet spent. |
| `manage_url` | string | The dashboard page for plans. |

## POST /v1/monitoring/subscription {#subscribe-monitoring}

**Start a monitoring subscription.**

A Stripe Checkout URL for the plan; open it to pay. The subscription starts once paid. An account with a live subscription changes it in the billing portal instead (409).

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `plan_id` | string | yes | — |

**Request**

:::codeGroup{syncKey="lang"}
```bash title="cURL"
curl -X POST "https://api.scrapelyserp.com/v1/monitoring/subscription" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan_id":"growth"}'
```
```python title="Python"
import os
import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}

r = requests.post(
    "https://api.scrapelyserp.com/v1/monitoring/subscription",
    headers=HEADERS,
    json={"plan_id": "growth"},
    timeout=30,
)
r.raise_for_status()
data = r.json()
```
```javascript title="Node.js"
const res = await fetch('https://api.scrapelyserp.com/v1/monitoring/subscription', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ plan_id: 'growth' }),
  signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
```
:::

**Response**

:::codeGroup
```json title="201 Created"
{
  "object": "checkout_session",
  "url": "https://checkout.stripe.com/c/pay/cs_test_example",
  "plan_id": "growth"
}
```
```json title="409 Conflict"
{
  "error": {
    "code": "CONFLICT",
    "message": "This workspace already has a monitoring subscription. Change or cancel it from the billing portal.",
    "param": "plan_id",
    "docs": "/docs/errors#conflict"
  }
}
```
:::

**Responses**

| Status | Meaning |
| --- | --- |
| `201` | Open `url` to pay. |
| `400` | `MISSING_PARAM` or `INVALID_PARAM`; `param` names the culprit. |
| `401` | `UNAUTHORIZED`: missing, unknown or revoked key. |
| `404` | `NOT_FOUND`. |
| `409` | `CONFLICT`: idempotent request in flight, a run already in progress, or a per-account limit. |
| `429` | `RATE_LIMITED` or `CONCURRENCY_LIMIT`. Honour `Retry-After`. |
| `500` | `INTERNAL`: our fault, not charged. Quote `X-Request-Id`. |
| `503` | `UNAVAILABLE`: a dependency (payments, Discord, Telegram) is not configured or not answering. Retry later. |

**Response fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` | "checkout_session" | — |
| `url` | string | — |
| `plan_id` | string | — |

## POST /v1/monitoring/subscription/portal {#open-billing-portal}

**Open the billing portal.**

A Stripe billing portal URL: change or cancel the monitoring plan, update the card, see invoices.

**Request**

:::codeGroup{syncKey="lang"}
```bash title="cURL"
curl -X POST "https://api.scrapelyserp.com/v1/monitoring/subscription/portal" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY"
```
```python title="Python"
import os
import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}

r = requests.post(
    "https://api.scrapelyserp.com/v1/monitoring/subscription/portal",
    headers=HEADERS,
    timeout=30,
)
r.raise_for_status()
data = r.json()
```
```javascript title="Node.js"
const res = await fetch('https://api.scrapelyserp.com/v1/monitoring/subscription/portal', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
  signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
```
:::

**Response**

:::codeGroup
```json title="201 Created"
{
  "object": "billing_portal_session",
  "url": "https://billing.stripe.com/p/session/test_example"
}
```
```json title="401 Unauthorized"
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or revoked API key.",
    "param": "api_key",
    "docs": "/docs/errors#unauthorized"
  }
}
```
:::

**Responses**

| Status | Meaning |
| --- | --- |
| `201` | Open `url`. |
| `401` | `UNAUTHORIZED`: missing, unknown or revoked key. |
| `429` | `RATE_LIMITED` or `CONCURRENCY_LIMIT`. Honour `Retry-After`. |
| `500` | `INTERNAL`: our fault, not charged. Quote `X-Request-Id`. |
| `503` | `UNAVAILABLE`: a dependency (payments, Discord, Telegram) is not configured or not answering. Retry later. |

**Response fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` | "billing_portal_session" | — |
| `url` | string | — |

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

**Get usage.**

Requests, successes, failures and credits charged per day for the last `days` days, oldest first, with totals for the window. Free.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `days` | integer | — | How many days to report. Default `30`. From 1 to 90. |

**Request**

:::codeGroup{syncKey="lang"}
```bash title="cURL"
curl -G "https://api.scrapelyserp.com/v1/usage" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY" \
  -d days=3
```
```python title="Python"
import os
import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SCRAPELY_API_KEY']}"}

r = requests.get(
    "https://api.scrapelyserp.com/v1/usage",
    headers=HEADERS,
    params={"days": "3"},
    timeout=30,
)
r.raise_for_status()
data = r.json()
```
```javascript title="Node.js"
const res = await fetch(`https://api.scrapelyserp.com/v1/usage?${new URLSearchParams({ days: '3' })}`, {
  headers: { Authorization: `Bearer ${process.env.SCRAPELY_API_KEY}` },
  signal: AbortSignal.timeout(30_000),
});
if (!res.ok) throw new Error((await res.json()).error.code);
const data = await res.json();
```
:::

**Response**

:::codeGroup
```json title="200 OK"
{
  "object": "usage",
  "days": 3,
  "totals": {
    "requests": 1294,
    "successful": 1288,
    "failed": 6,
    "credits": 0.8620107,
    "success_rate": 0.9954
  },
  "daily": [
    {
      "date": "2026-10-14",
      "requests": 431,
      "successful": 430,
      "failed": 1,
      "credits": 0.2804664
    },
    {
      "date": "2026-10-15",
      "requests": 442,
      "successful": 439,
      "failed": 3,
      "credits": 0.3037208
    },
    {
      "date": "2026-10-16",
      "requests": 421,
      "successful": 419,
      "failed": 2,
      "credits": 0.2778235
    }
  ]
}
```
```json title="401 Unauthorized"
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or revoked API key.",
    "param": "api_key",
    "docs": "/docs/errors#unauthorized"
  }
}
```
:::

**Responses**

| Status | Meaning |
| --- | --- |
| `200` | Daily requests and credits, oldest first. |
| `401` | `UNAUTHORIZED`: missing, unknown or revoked key. |
| `429` | `RATE_LIMITED` or `CONCURRENCY_LIMIT`. Honour `Retry-After`. |
| `500` | `INTERNAL`: our fault, not charged. Quote `X-Request-Id`. |

**Response fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` | "usage" | — |
| `days` | integer | — |
| `totals` | object | — |
| `totals.requests` | integer | — |
| `totals.successful` | integer | — |
| `totals.failed` | integer | — |
| `totals.credits` | number | Credits charged in the window, fractional. |
| `totals.success_rate` | number or null | — |
| `daily` | object[] | — |
| `daily[].date` | string | — |
| `daily[].requests` | integer | — |
| `daily[].successful` | integer | — |
| `daily[].failed` | integer | — |
| `daily[].credits` | number | Credits charged that day, fractional. |

---

## For AI agents

- This page for a human reader: https://scrapelyserp.com/reference/account
- The whole space as one Markdown file: https://scrapelyserp.com/reference/llms-full.txt
- Live search + fetch over MCP: https://scrapelyserp.com/reference/_api/public/orgs/affc5b0f-d3c2-423a-8143-9d10db5736ae/spaces/e4cbe065-c1c2-4572-b134-0292dedd9c39/mcp
  - Install (Claude CLI): `claude mcp add scrapely --transport http https://scrapelyserp.com/reference/_api/public/orgs/affc5b0f-d3c2-423a-8143-9d10db5736ae/spaces/e4cbe065-c1c2-4572-b134-0292dedd9c39/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
