Scraping APIhttps://scraping-api.datafuel.ai/api/v1
Help centerOpenAPI spec

Account

Balance and profile

GET/task/analytics/dashboard

Usage analytics of your tasks

Totals, success rate, average credits and duration per request, a time series, and breakdowns by task type, target host and HTTP status code over a date range. Pair it with GET /task to drill into the tasks behind a figure and with GET /users/@me/transactions for the credit movements.

Query
start_date
string
YYYY-MM-DD, default 30 days ago
end_date
string
YYYY-MM-DD inclusive, default today. The range may span at most 365 days.
interval
string
Default: "daily".
hourly daily weekly monthly
module
string
Restrict to one task type
Request
cURL
curl https://scraping-api.datafuel.ai/api/v1/task/analytics/dashboard \
  --header 'X-API-Key: df_key_your_key_here'
Response

Summary, time series and breakdowns

{
  "summary": {
    "total_tasks": 1240,
    "credits_used": 1873,
    "fulfilled_requests": 1196,
    "failed_requests": 44,
    "failed_percentage": 3.5,
    "success_rate": 96.5,
    "efficiency_score": 100,
    "avg_credits_per_request": 1.5,
    "avg_duration_ms": 1840.2,
    "previous_period": {
      "credits_used": 1502,
      "fulfilled_requests": 980,
      "failed_requests": 51,
      "failed_percentage": 4.9,
      "efficiency_score": 100,
      "credits_used_change": 24.7,
      "fulfilled_requests_change": 22,
      "failed_requests_change": -13.7,
      "efficiency_score_change": 0
    }
  },
  "timeseries": [
    {
      "period": "2026-09-28",
      "total": 620,
      "completed": 601,
      "failed": 19,
      "credits_used": 941
    }
  ],
  "by_module": [
    {
      "module": "unlocker",
      "total": 1240,
      "completed": 1196,
      "failed": 44,
      "credits_used": 1873,
      "success_rate": 96.5,
      "avg_credits_per_request": 1.5,
      "avg_duration_ms": 1840.2,
      "status_codes": [
        {
          "status_code": 200,
          "count": 1190,
          "completed": 1190,
          "failed": 0,
          "credits_used": 1861,
          "avg_credits_per_request": 1.6
        },
        {
          "status_code": 0,
          "count": 12,
          "completed": 0,
          "failed": 12,
          "credits_used": 0,
          "avg_credits_per_request": 0
        }
      ]
    }
  ],
  "top_targets": [
    {
      "target": "example.com",
      "total": 800,
      "completed": 790,
      "failed": 10,
      "credits_used": 790
    }
  ],
  "by_status_code": [
    {
      "status_code": 200,
      "count": 1190,
      "completed": 1190,
      "failed": 0,
      "credits_used": 1861,
      "avg_credits_per_request": 1.6
    },
    {
      "status_code": 0,
      "count": 12,
      "completed": 0,
      "failed": 12,
      "credits_used": 0,
      "avg_credits_per_request": 0
    }
  ]
}

Malformed request or invalid attributes

{
  "code": "INVALID_ATTRIBUTES",
  "message": "Invalid attributes for selected task type"
}

Missing or invalid API key

{
  "code": "UNAUTHORIZED",
  "message": "You are not authorized to perform this action"
}

GET/users/@me

Get my profile

Request
cURL
curl https://scraping-api.datafuel.ai/api/v1/users/@me \
  --header 'X-API-Key: df_key_your_key_here'
Response

Profile of the authenticated user

{
  "email": "dev@acme.io",
  "username": "acme-prod",
  "current_concurrency": 3,
  "concurrency_limit": 10,
  "credit_balance": 4820,
  "plan_credit_balance": 3820,
  "payg_credit_balance": 1000,
  "monthly_credit_limit": 100000
}

Missing or invalid API key

{
  "code": "UNAUTHORIZED",
  "message": "You are not authorized to perform this action"
}

GET/users/@me/balance

Get credit balance

balance is what you can spend. It is made of plan credits and pay-as-you-go credits. Plan credits are spent first; unused ones roll over when the plan renews and expire if it is not renewed. Pay-as-you-go credits are spent after them and never expire.

Request
cURL
curl https://scraping-api.datafuel.ai/api/v1/users/@me/balance \
  --header 'X-API-Key: df_key_your_key_here'
Response

Current credit balance

{
  "balance": 4820,
  "plan_balance": 3820,
  "payg_balance": 1000
}

Missing or invalid API key

{
  "code": "UNAUTHORIZED",
  "message": "You are not authorized to perform this action"
}

GET/users/@me/transactions

List your credit transactions

Every credit movement on your account, newest first: plan assignments, credit pack purchases (purchase) and top-ups, usage (negative amount), refunds of failed tasks, expiry and manual adjustments. plan_amount is the part of amount that moved plan credits; the rest moved pay-as-you-go credits. sums totals each operation over the whole filtered range, not just the page. Paged with page and limit.

Query
operation
string
plan_assignment purchase usage refund topup expiry adjustment
start_date
string
YYYY-MM-DD (UTC), created on or after this day. Wrong format answers 400 INVALID_DATE_FORMAT.
end_date
string
YYYY-MM-DD (UTC), created on or before this day (inclusive). Before start_date answers 400 INVALID_DATE_RANGE.
page
integer
1-based page number. Negative or not a number answers 400 INVALID_QUERY_PARAM. Default: 1.
limit
integer
Transactions per page; values above 200 are capped. Negative or not a number answers 400 INVALID_QUERY_PARAM. Default: 10.
Request
cURL
curl https://scraping-api.datafuel.ai/api/v1/users/@me/transactions \
  --header 'X-API-Key: df_key_your_key_here'
Response

One page of transactions and the per-operation totals

{
  "transactions": [
    {
      "id": 48213,
      "amount": 100,
      "plan_amount": 100,
      "operation": "refund",
      "reference_type": "task_id",
      "reference_id": "9c1f2e3d-4b5a-4c6d-8e7f-a0b1c2d3e4f5",
      "balance_after": 4820,
      "created_at": "2026-09-29T09:58:40Z"
    },
    {
      "id": 48190,
      "amount": -100,
      "plan_amount": -100,
      "operation": "usage",
      "reference_type": "task_id",
      "reference_id": "9c1f2e3d-4b5a-4c6d-8e7f-a0b1c2d3e4f5",
      "balance_after": 4720,
      "created_at": "2026-09-29T09:58:11Z"
    }
  ],
  "total_count": 312,
  "sums": [
    {
      "operation": "usage",
      "total": -2240,
      "count": 290
    },
    {
      "operation": "refund",
      "total": 380,
      "count": 21
    },
    {
      "operation": "purchase",
      "total": 5000,
      "count": 1
    }
  ]
}

A query parameter is malformed

{
  "code": "INVALID_QUERY_PARAM",
  "message": "limit, page and job_id must be valid values"
}

Missing or invalid API key

{
  "code": "UNAUTHORIZED",
  "message": "You are not authorized to perform this action"
}

POST/users/@me/api-key/reset

Reset my API key

Rotates the API key that authenticated this request. The previous key stops working immediately and the new key is returned only here — it cannot be retrieved again afterwards.

Request
cURL
curl https://scraping-api.datafuel.ai/api/v1/users/@me/api-key/reset \
  --request POST \
  --header 'X-API-Key: df_key_your_key_here'
Response

The newly issued API key

{
  "api_key": "df_key_3kQpZ8vNw2LxR7yTfB1jHdC4mS6aG0eU"
}

Missing or invalid API key

{
  "code": "UNAUTHORIZED",
  "message": "You are not authorized to perform this action"
}

The key could not be rotated and the existing key is still valid.

{
  "code": "API_KEY_RESET_FAILED",
  "message": "The API key could not be reset. Your existing key is still valid, please try again."
}