Authentication
To use the API, you'll require an API key. You can obtain an API key by signing up for an account on the APITube website.
TIP
All requests may be GET or POST. The API key must be included in the request to authenticate the user. The API key can be passed as a query parameter in the URL or in the headers of the request. If you suspect that your API key has been compromised, you can regenerate it from the APITube website.
API Key in a query string
WARNING
This method is not recommended for production environments as the API key is exposed in the URL.
The API key can be passed as a query parameter in the URL. This is the simplest way to authenticate your requests.
Request Example:
curl https://api.apitube.io/v1/news/everything?per_page=10&api_key=YOUR_API_KEY ...API Key in headers
You can also pass the API key in the headers of your request. This is a more secure way to authenticate your requests. The API key must be included in the X-API-Key header of the request.
Headers:
X-API-Key(string): Your API key for authentication. This header is required for accessing the endpoint.
Request Example:
curl https://api.apitube.io/v1/news/everything?per_page=10 --header "x-api-key: YOUR_API_KEY" ...Bearer Token
You can also use a Bearer token to authenticate your requests. This is a more secure way to authenticate your requests. The Bearer token must be included in the Authorization header of the request. The Bearer token should be prefixed with Bearer.
Request Example:
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.apitube.io/v1/news/everything?per_page=10 ...Test mode
Every account has two kinds of API keys, so you can build and test an integration without spending your quota:
- Live keys (
api_live_...) — full access. Requests return complete article data and consume your plan quota / balance. - Test keys (
api_test_...) — for development. Requests hit the live API and return the real response structure, but each article's text is truncated and suffixed with...[Test mode — use a live key for full content], and no quota or balance is consumed.
This lets you wire up pagination, fields and error handling against the real API for free (including SSE/WebSocket streams). Switch to a live key — on a paid plan — to receive full article content.
TIP
Create and manage test keys in the dashboard: turn on Test mode (the toggle at the bottom of the sidebar), then create a key under API Keys. Live and test keys are listed separately per mode.
Request Example:
curl "https://api.apitube.io/v1/news/everything?per_page=10&api_key=api_test_YOUR_TEST_KEY"Detecting the mode
Every response includes an x-apitube-mode header so your integration can tell which mode a key is in without parsing the body:
x-apitube-mode: livex-apitube-mode: test
In test mode, aggregate endpoints are also limited: /v1/news/count and /v1/news/time-series return capped numbers, and /v1/news/trends hides the trending values.
WARNING
Test keys are rate-limited more strictly than live keys. Use them for development and integration checks, not for production traffic.