Most used endpoints API
The team's 20 most called endpoints with requests and credits charged each.
GET /v1/account/usage/routes
GET /v1/account/usage/routes
The team's 20 most called endpoints with requests and credits charged each. Defaults to the last 24 hours; custom ranges up to one year. Free.
- Cost: Free
- Cache: Not cached.
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
start_time | string | no | Start of the range, ISO 8601. Also accepted as startTime. |
end_time | string | no | End of the range, ISO 8601. Also accepted as endTime. |
Every request also accepts:
cursor: the cursor from the previous page (Pagination).
Example request#
Set your key in the environment first (see Authentication).
1curl "https://api.socialscrape.dev/v1/account/usage/routes" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY"1import os2import requests34res = requests.get(5 "https://api.socialscrape.dev/v1/account/usage/routes",6 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},7)8body = res.json()910if body["ok"]:11 print(body["data"])12else:13 print(body["error"]["code"], body["error"]["message"])1const res = await fetch("https://api.socialscrape.dev/v1/account/usage/routes", {2 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },3});4const body = await res.json();56if (body.ok) {7 console.log(body.data);8} else {9 console.error(body.error.code, body.error.message);10}1{2 "nodes": [3 {4 "name": "SocialScrape Most used endpoints",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/account/usage/routes",14 "sendQuery": false,15 "sendHeaders": true,16 "headerParameters": {17 "parameters": [18 {19 "name": "x-api-key",20 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"21 }22 ]23 }24 }25 }26 ],27 "connections": {}28}Example response#
This is a sample with illustrative values. Status 200.
1{2 "ok": true,3 "credits_charged": 0,4 "credits_remaining": 5000,5 "cached": false,6 "cached_at": null,7 "request_id": "req_e6047e082df3682e112c2256",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "usage_stat",13 "date": null,14 "endpoint": "/v1/github/user",15 "requests": 60,16 "credits_charged": 4817 },18 {19 "object": "usage_stat",20 "date": null,21 "endpoint": "/v1/github/repository",22 "requests": 31,23 "credits_charged": 3124 }25 ],26 "cursor": null,27 "has_more": false28 },29 "cursor": null,30 "has_more": false31}Response#
A list of UsageStat objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
Every request can also fail with the account and platform errors listed on the Errors page.
Also served at#
These paths answer the same request, so code written for other APIs keeps working: /v1/account/get-most-used-routes. See Switching from ScrapeCreators.
Related endpoints#
- Credit balance (
GET /v1/account/credits) - Request history (
GET /v1/account/usage) - Daily usage (
GET /v1/account/usage/daily)