Get credit usage over a date range

Return the authenticated account's current credit balance and its consumption over a range of UTC days: requests, billable requests and credits used, in total, per endpoint (split by HTTP status) and per day. Use it to reconcile an invoice or to feed your own billing and monitoring. Days are UTC calendar days, both ends included; from defaults to the first day of the current month and to to today, and a range covers at most 366 days. A request is billable when it cost credits: a delivered response, or a 404 for a record that does not exist; refusals (402, 429) and server errors never are. This endpoint is free - it does not consume credits - and answers even when your credits are exhausted. Calls to it and to /api/v1/subscription are left out of the figures it reports. Like /api/v1/subscription, it is metered on its OWN budget of 1 request per second per account, separate from your plan's per-second limit and from /subscription's: it returns X-RateLimit-Cost: 0 and carries no X-RateLimit-Remaining or X-RateLimit-Reset. Today's figures are live, within about a minute. Consumption is recorded from 2026-07-16; earlier days report 0.

get/api/v1/usage

Request

  • Base URL: https://api.fetchin.io
  • URL: https://api.fetchin.io/api/v1/usage
  • Auth: API key in header X-API-Key

Query parameters

fromstring date
Example:2026-10-01

First UTC day of the range, YYYY-MM-DD, included. Defaults to the first day of the current month.

tostring date
Example:2026-10-31

Last UTC day of the range, YYYY-MM-DD, included (the whole day is counted). Defaults to today. The range covers at most 366 days.

Response

Current balance and consumption over the range

fromstring date required

First UTC day covered.

tostring date required

Last UTC day covered.

creditsRemaininginteger required

Your balance now, whatever the range: plan allowance plus pay-as-you-go credits. Same figure as on /api/v1/subscription.

subscriptionCreditsRemaininginteger required

The plan half of creditsRemaining.

paygCreditsRemaininginteger required

The pay-as-you-go half of creditsRemaining.

requestsinteger required

Every request made with your API keys over the range, whatever its outcome: refusals (402, 429) and errors included. Calls to /subscription and /usage are not counted.

billableRequestsinteger required

The requests that cost credits: a delivered response, or a 404 for a record that does not exist.

creditsUsedinteger required

Credits used by the billable requests. Higher than billableRequests when endpoints costing more than one credit were called.

Example response

{
  "from": "2026-10-01",
  "to": "2026-10-03",
  "creditsRemaining": 684230,
  "subscriptionCreditsRemaining": 184230,
  "paygCreditsRemaining": 500000,
  "requests": 30482,
  "billableRequests": 30214,
  "creditsUsed": 32154,
  "endpoints": [
    {
      "endpoint": "/api/v1/profile",
      "requests": 28377,
      "billableRequests": 28154,
      "creditsUsed": 28154,
      "statusCodes": {
        "200": 26401,
        "404": 1753,
        "429": 211,
        "503": 12
      }
    }
  ],
  "days": [
    {
      "date": "2026-10-01",
      "requests": 9850,
      "billableRequests": 9771,
      "creditsUsed": 10411
    }
  ]
}

Changes