The base URL for the export API is https://export-api.sctools.org.
This service exposes one route:
GET /api/:site/:type/:id
Currently supported values:
site:vidiqtype:channelorvideo
All successful responses return HTTP 200 with this wrapper:
{
"ok": true,
"site": "vidiq",
"type": "channel",
"id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"data": []
}data is an array of channel stat snapshots, sorted by ascending date:
[
{
"date": "2024-01-01",
"subscribers": 1000,
"views": 50000,
"videos": 42
}
]data is an array of hourly video stat snapshots:
[
{
"date": "2024-01-01T12:00:00.000Z",
"views": 1200,
"likes": 80,
"comments": 12
}
]Errors return:
{
"ok": false,
"error": {
"code": "invalid_request",
"message": "The request path must include site, type, and id.",
"details": {}
}
}details is optional. Common error codes include:
invalid_requestwith HTTP400unsupported_resourcewith HTTP404upstream_not_foundwith HTTP404upstream_rate_limitedwith HTTP429upstream_unreachablewith HTTP502upstream_server_errorwith HTTP502upstream_request_failedwith HTTP502invalid_upstream_responsewith HTTP502
- Success responses are cacheable for 3 hours:
Cache-Control: public, max-age=10800, s-maxage=10800 - Error responses are not cached:
Cache-Control: no-store - All responses include
Access-Control-Allow-Origin: *