Skip to main content
GET
/
v1
/
runs
/
{run_hash}
/
credits
Get Run Credits
curl --request GET \
  --url https://api.lobstr.io/v1/runs/{run_hash}/credits \
  --header 'Authorization: <authorization>'
{
  "run_id": "<string>",
  "total_credits": 123,
  "total_results": 123,
  "breakdown": [
    {
      "function": "<string>",
      "credits": 123,
      "attempts": 123
    }
  ],
  "rates": {
    "credits_per_row": 123,
    "[function_name]": 123
  },
  "function_colors": {
    "bg_color": "<string>",
    "txt_color": "<string>"
  },
  "base_function_label": {},
  "filter_breakdown": [
    {
      "name": "<string>",
      "display": "<string>",
      "rate": 123,
      "credits": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.lobstr.io/llms.txt

Use this file to discover all available pages before exploring further.

Returns a detailed credit breakdown for a single run, showing how credits were spent across base scraping and any enrichment functions (e.g. phone numbers, email extraction, images). Use this to understand the cost composition of a run and identify which functions drive the most spend.

Headers

Authorization
string
required
Your API authentication token. Value: Token YOUR_API_KEY

Path Parameters

run_hash
string
required
The unique identifier (hash) of the run. Example: 0393be3ea6f74986906153df1c3f9894

Response Fields

run_id
string
The hash ID of the run. Example: "0393be3ea6f74986906153df1c3f9894"
total_credits
float
Total credits consumed by the run. Example: 116
total_results
integer
Total number of results collected in the run. Example: 20
breakdown
array
List of per-function credit entries, sorted by credits descending.
rates
object
Credit rates for the run’s squid.
function_colors
object
Display color palette for each function, used by the dashboard UI.
base_function_label
string | null
Human-readable display name for the base scraping step, derived from the squid’s configuration. Example: "Export Listings (No Phone)". null if the squid has no labelled main function.
filter_breakdown
array
Per-filter credit detail when the squid charges for active filters (e.g. geo match, category match). Empty array if no filter costs apply.
Credits are only charged for results that were successfully collected. Results discarded by filters (e.g. closed businesses, website filter, geo/category mismatch) are not billed.

Code Examples

curl -X GET "https://api.lobstr.io/v1/runs/0393be3ea6f74986906153df1c3f9894/credits" \
  -H "Authorization: Token YOUR_API_KEY"

Response

200
{
  "run_id": "0393be3ea6f74986906153df1c3f9894",
  "total_credits": 116,
  "total_results": 20,
  "breakdown": [
    {
      "function": "base",
      "credits": 80,
      "attempts": 20
    },
    {
      "function": "get_phone_numbers",
      "credits": 36,
      "attempts": 20
    }
  ],
  "rates": {
    "credits_per_row": 4,
    "get_phone_numbers": 6
  },
  "function_colors": {
    "Export Listings (No Phone)": {
      "bg_color": "#EAFBF3",
      "txt_color": "#0F9F5F"
    },
    "get_phone_numbers": {
      "bg_color": "#EEF2F7",
      "txt_color": "#62748A"
    }
  },
  "base_function_label": "Export Listings (No Phone)",
  "filter_breakdown": []
}
404
{
  "detail": "Run not found."
}