APITube Help Center

Official APITube News API SDKs: Node, PHP, Python

Compare the three official clients — install commands, language requirements, and what each one wraps

Jacob Partington

Written by Jacob Partington

July 3, 2026

Official APITube News API SDKs

APITube maintains three official SDKs for the News API — Node.js, PHP and Python. Each one wraps the REST API behind a small typed Client: you install the package, create the client with your API key, and call news('everything', {...}) to get parsed articles back, so you skip manual URL building and JSON decoding. Install them from the standard registry for your language:

npm install @apitube/news-api        # Node.js
composer require apitube/news-api    # PHP
pip install apitube                  # Python

If your language is not one of the three, you do not need an SDK — the API is plain HTTPS and JSON, so any language that can make a web request can call it. See how to call the News API from Python, Java, Go and more.

Which official SDKs does APITube offer?

There are three, one per language, published on each ecosystem’s main package registry:

LanguagePackageInstall withRequires
Node.js@apitube/news-api (npm)npm install @apitube/news-apiNode.js 18+, TypeScript 5+ optional
PHPapitube/news-api (Packagist)composer require apitube/news-apiPHP 8.1+, a PSR-18 HTTP client
Pythonapitube (PyPI)pip install apitubePython 3.7+

The Node.js package is fully typed — TypeScript declarations ship inside it, so you get autocomplete and compile-time checks with no extra @types install. The PHP package needs a PSR-18 HTTP client and PSR-17 factory (Guzzle is the common choice) and is MIT-licensed. All three default their baseUrl to https://api.apitube.io, so you normally only pass your API key.

How do you use each SDK?

The shape is the same in every language: create a Client with your key, then call news(endpoint, params). You pass parameter names exactly as the API expects them, including dotted names like language.code. The client attaches your API key to every request for you, so you never build the auth header by hand.

// Node.js
import { Client } from '@apitube/news-api';
const client = new Client({ apiKey: 'your-api-key' });
const response = await client.news('everything', { title: 'artificial intelligence', 'language.code': 'en', per_page: 5 });
for (const article of response.articles) console.log(article.title, article.url);
// PHP
use APITube\Client;
$client = new Client(apiKey: 'your-api-key');
$response = $client->news('everything', ['title' => 'artificial intelligence', 'language.code' => 'en', 'per_page' => 5]);
foreach ($response->articles as $article) { echo $article->title . "\n"; }
# Python
from apitube import Client
client = Client(api_key="your-api-key")
response = client.news("everything", {"title": "artificial intelligence", "language.code": "en", "per_page": 5})
for article in response.articles:
    print(article.title, article.url)

The first argument to news() picks the endpoint — everything for search, plus top-headlines, story and article (the Node.js and PHP clients also accept raw) — and the second holds your filter parameters. For the full parameter list, see the official News API parameters reference.

What is the difference between the SDKs?

They cover the same core, but not the exact same surface. All three expose news() for articles, balance() to check your plan and remaining points, and ping() to test connectivity. The Node.js and PHP SDKs go further and also wrap the helper endpoints: count() for a match count, suggest() for autocomplete, and the directory and profile methods people(), companies() and journalists(). The Python SDK currently focuses on news(), balance() and ping().

So if you need count, autocomplete or the people/company/journalist directories with a typed method, reach for the Node.js or PHP client. From Python you can still hit those endpoints — just call them over plain HTTPS, exactly like any other REST request.

Which SDK should you pick?

Pick the SDK that matches your stack — there is no “best” one, they all talk to the same News API:

  • Node.js / TypeScript projects@apitube/news-api. Fully typed, ships both ESM and CommonJS builds. See how to install and use the Node.js SDK.
  • PHP / Laravel / Symfony appsapitube/news-api. Bring-your-own PSR-18 client. See how to install and use the PHP SDK.
  • Python scripts, data and ML workapitube. Small client for search, balance and health checks.
  • Any other language → no SDK; call the HTTPS endpoint directly. Ready-to-copy request snippets cover Java, Go, Ruby and C#.

Common Questions

Are the APITube SDKs free and open source?

Yes. All three official SDKs are open-source and MIT-licensed, published on their language’s standard registry — @apitube/news-api on npm, apitube/news-api on Packagist, and apitube on PyPI. You install them with the normal package manager (npm, composer, pip) and you still need an APITube API key to make requests.

Do I need an SDK to use the News API?

No. The SDKs are a convenience — they build URLs, attach your key and parse JSON for you. The News API itself is plain HTTPS plus JSON, so any language or tool that can send an HTTP request can call it directly. If there is no SDK for your language, send the request yourself and read the JSON back; calling the News API from any language shows the exact request.

Which SDK has the most features?

The Node.js and PHP SDKs currently wrap the widest surface: news(), count(), suggest(), the people()/companies()/journalists() directories, balance() and ping(). The Python SDK wraps news(), balance() and ping(). Every endpoint the SDKs don’t wrap is still reachable over plain HTTPS from any of these languages.

How do I authenticate with an SDK?

You pass your API key when you construct the client — new Client({ apiKey }) in Node.js, new Client(apiKey: ...) in PHP, Client(api_key=...) in Python — and the SDK attaches it to every request automatically. Keep the key out of source control by reading it from an environment variable. Grab a key from your dashboard first; see where to find and create your API key.


Related Articles