Most used endpoints
Beta 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
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- 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).
curl "https://api.socialscrape.io/v1/account/usage/routes" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY"import os
import requests
res = requests.get(
"https://api.socialscrape.io/v1/account/usage/routes",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const res = await fetch("https://api.socialscrape.io/v1/account/usage/routes", {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Most used endpoints",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/account/usage/routes",
"sendQuery": false,
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample with illustrative values. Status 200.
{
"ok": true,
"credits_charged": 0,
"credits_remaining": 5000,
"cached": false,
"cached_at": null,
"request_id": "req_e6047e082df3682e112c2256",
"data": {
"object": "list",
"items": [
{
"object": "usage_stat",
"date": null,
"endpoint": "/v1/github/user",
"requests": 60,
"credits_charged": 48
},
{
"object": "usage_stat",
"date": null,
"endpoint": "/v1/github/repository",
"requests": 31,
"credits_charged": 31
}
],
"cursor": null,
"has_more": false
},
"cursor": null,
"has_more": false
}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)