TubeAnalyticsCreator intelligence

Developers

Developer API documentation, headers, and discovery

Published by TubeAnalytics, founded by Mike Holp. Data sources and limitations · Corrections and support.

The external API, API key workflow, MCP transport, and machine-readable discovery files are documented here with the live paths used by the product.

API keys

Create and revoke keys in Dashboard > Settings > API Keys, or use the signed-in management routes.

Professional and Enterprise only.

REST API

Call https://www.tubeanalytics.net/api/external/v1 with Bearer auth.

JSON responses with structured errors.

MCP transport

Connect agents to https://www.tubeanalytics.net/api/mcp or use npm run mcp:stdio.

Streamable HTTP and stdio supported.

Discovery files

Use /openapi.json, /mcp.json, /ai-pricing.json, and /ai.txt as the machine-readable source of truth.

Always current with the live routes.

Connected-channel metrics come from authorized YouTube accounts. Competitor endpoints use public data and do not expose private retention, revenue, traffic sources, or demographics. Review the data methodology, privacy policy, and security controls before integrating.

Quick start

Try a live endpoint. Replace channel_id and YOUR_API_KEY with real values:

curl -X GET "https://www.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://www.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.

How to connect

1

Connect a YouTube channel in the dashboard

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.

2

Create an API key

Open Dashboard > Settings > API Keys on a Professional or Enterprise account, or call POST /api/v1/keys from an authenticated session.

3

Send Bearer-authenticated requests

Use Authorization: Bearer <api_key> on every external request. Keep keys server-side and do not embed them in client code.

4

Use discovery files for tools and agents

Pull the OpenAPI spec, MCP manifest, ai-pricing manifest, and ai.txt file when generating clients, connecting agents, or validating integrations.

Reference endpoints

https://www.tubeanalytics.net/api/external/v1/channels
GET
List connected channels with name, YouTube ID, and connection status
https://www.tubeanalytics.net/api/external/v1/channels/:channelId
GET
Fetch one connected channel by internal ID or YouTube channel ID
https://www.tubeanalytics.net/api/external/v1/analytics?channel_id=...&range=28d
GET
Aggregate analytics: views, subscribers, watch time, CTR, traffic sources — filtered by range
https://www.tubeanalytics.net/api/external/v1/videos?channel_id=...&limit=20
GET
Paginated videos with per-video views, CTR, publish date — supports sort, limit, offset
https://www.tubeanalytics.net/api/external/v1/audience?channel_id=...
GET
Audience demographics (age, gender, geo), subscriber health, and segment breakdown
https://www.tubeanalytics.net/api/external/v1/competitors
GET
Tracked competitors with subscriber counts, avg views, and estimated RPM ranges
The discovery files at /openapi.json, /mcp.json, and /ai.txt are the machine-readable source of truth.

Query parameters

Most external API endpoints accept common query parameters for filtering, pagination, and sorting. The full schema per endpoint is in the OpenAPI spec.

channel_id
string
Required on analytics, videos, and audience. Accepts internal TubeAnalytics ID or YouTube channel ID.
range
string
Time window: 7d, 28d (default), 90d, 365d.
limit
integer
Results per page. Default 20, max 100.
offset
integer
Records to skip. Use with limit to paginate through result sets.
sort
string
Sort field (e.g. publishedAt, views, ctr). Prefix with - for descending.

Authentication and headers

External 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.

Authorization
Bearer <api_key>
Accept
application/json
Content-Type
application/json
Rate-limit headers
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Retry header
Retry-After on 429 responses

Signed-in management routes

These routes are for authenticated dashboard sessions, not server-to-server API clients:

  • GET /api/v1/keys list API keys
  • POST /api/v1/keys create a new API key
  • DELETE /api/v1/keys/:keyId revoke a key
  • GET /api/v1/users/profile and related dashboard session routes remain separate
API keys are available on Professional and Enterprise plans only. Starter users see an upgrade prompt in Settings.

Access and limits

The 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.

Starter
1 channel max channels
Unavailable
Upgrade required
No external API access
Professional
3 channels max channels
Enabled
5,000 calls / month
1,000 requests/hour
Enterprise
5 channels max channels
Enabled
20,000 calls / month
10,000 requests/hour

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.

Error format

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"
  }
}

Common statuses

  • 400 Missing or invalid request parameters
  • 401 Missing or invalid API key
  • 403 API key valid but the plan is not eligible
  • 404 Connected channel or resource not found
  • 429 Rate limit exceeded
  • 500 Unexpected server error

Ready to build?

Sign up for a Professional or Enterprise plan to get API access. Already have an account? Jump to the dashboard to create API keys.