Loading...
Loading...
Developers
The external API, API key workflow, MCP transport, and machine-readable discovery files are documented here with the live paths used by the product.
Create and revoke keys in Dashboard > Settings > API Keys, or use the signed-in management routes.
Professional and Enterprise only.
Call https://tubeanalytics.net/api/external/v1 with Bearer auth.
JSON responses with structured errors.
Connect agents to https://tubeanalytics.net/api/mcp or use npm run mcp:stdio.
Streamable HTTP and stdio supported.
Use /openapi.json, /mcp.json, /ai-pricing.json, and /ai.txt as the machine-readable source of truth.
Always current with the live routes.
Try a live endpoint. Replace channel_id and YOUR_API_KEY with real values:
curl -X GET "https://tubeanalytics.net/api/external/v1/analytics?channel_id=<channel_id>&range=28d" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Accept: application/json"JavaScript
const res = await fetch("https://tubeanalytics.net/api/external/v1/analytics?channel_id=<id>&range=28d", {
headers: { Authorization: "Bearer <api_key>" }
});
const data = await res.json();Python
import httpx
res = httpx.get(
f"{apiBase}/analytics",
params={"channel_id": "<id>", "range": "28d"},
headers={"Authorization": "Bearer <api_key>"}
)
data = res.json()channel_id accepts either the TubeAnalytics channel ID or the YouTube channel ID. The same Bearer key works for every external endpoint below. API access requires a Professional or Enterprise plan.External API data comes from connected channels. Sign in, connect a channel, and wait for the initial sync to complete before making server-to-server calls.
Open Dashboard > Settings > API Keys on a Professional or Enterprise account, or call POST /api/v1/keys from an authenticated session.
Use Authorization: Bearer <api_key> on every external request. Keep keys server-side and do not embed them in client code.
Pull the OpenAPI spec, MCP manifest, ai-pricing manifest, and ai.txt file when generating clients, connecting agents, or validating integrations.
Most external API endpoints accept common query parameters for filtering, pagination, and sorting. The full schema per endpoint is in the OpenAPI spec.
channel_idrangelimitoffsetsortExternal requests use the Bearer API key scheme in the Authorization header. Keep the key server-side. Create and rotate keys from Dashboard > Settings > API Keys or the signed-in management routes.
These routes are for authenticated dashboard sessions, not server-to-server API clients:
GET /api/v1/keys list API keysPOST /api/v1/keys create a new API keyDELETE /api/v1/keys/:keyId revoke a keyGET /api/v1/users/profile and related dashboard session routes remain separateThe pricing surface advertises monthly API call allowances by plan, while the live external API enforces a sliding-window request limit and returns rate-limit headers on every response. Keep both in mind when building client retries and quota dashboards.
In the current implementation, the external API returns X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset on successful responses, plus Retry-After when a request is limited.
External API routes return structured JSON errors with error.code and error.message. Use the code to branch on error handling and the message for human-readable logs.
{
"error": {
"code": "BAD_REQUEST",
"message": "channel_id query parameter is required"
}
}Sign up for a Professional or Enterprise plan to get API access. Already have an account? Jump to the dashboard to create API keys.