Get an article by ID with /v1/news/article
/v1/news/article returns articles by their APITube IDs. Pass a single id or up to 100 comma-separated IDs in one request — the IDs are combined with OR logic, so one call can rehydrate a whole batch you stored earlier.
Each request costs 1 point, whether it fetches one article or a hundred.
Endpoint
GET /v1/news/article
POST /v1/news/articleBase URL: https://api.apitube.io.
Where article IDs come from
Every article in every response carries an id. The usual sources are:
- the
idfield of any article returned by/v1/news/everythingor/v1/news/top-headlines; - the
article_idyou stored when you first ingested an article; - the SSE and WebSocket streams, which deliver the same
idin real time.
Store the id alongside anything else you keep — it is the only value this endpoint accepts as a lookup key.
Batch lookup
GET /v1/news/article?id=3036291250,3036291251,3036291252Up to 100 IDs per request. Anything past the hundredth is silently dropped, not rejected — split larger batches yourself rather than relying on an error.
Unknown IDs are simply absent from results; there is no 404 for them and the request still succeeds. Compare the IDs you asked for against the IDs you got back rather than relying on the result count.
TIP
prompt is not accepted here. It is silently ignored on /v1/news/article and /v1/news/story, because both address articles directly rather than searching for them.
Parameters
Title and full-text search
Search inside article titles. Limited to a 31-day published_at window.
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.title | string | No | Exclude articles containing this text in the title. Range: 2–100 characters. |
query | string | No | Boolean query language over the same fields as the flat filters: AND / OR / NOT, parentheses, field:value predicates, quoted phrases with proximity, ranges [a TO b] and target-aware entity blocks {{...}}. A bare term searches the title. Combined with any flat filters through AND. Same 31-day published_at window as title. Parse errors return ER0701–ER0712. Range: 0–4000 characters. Example: bitcoin AND NOT (etf OR futures). Accepted by the API but not part of the published OpenAPI specification, so generated SDKs do not expose it. |
title | string | No | Search in article titles. Supports phrase search with proximity: "climate change"~2. Title search is limited to a 31-day published_at window: without published_at.start / published_at.end the last 31 days are searched, a wider explicit range returns ER0110. Range: 2–100 characters. |
title_ends_with | string | No | Filter articles whose title ends with the given text. Same 31-day window limit as title. Range: 2–100 characters. |
title_pattern | string | No | Filter articles whose title matches the given pattern. Same 31-day window limit as title. Range: 2–200 characters. |
title_starts_with | string | No | Filter articles whose title starts with the given text. Same 31-day window limit as title. Range: 2–100 characters. |
Request for Articles with a Specific Title Keyword
This request retrieves news articles with "technology" in their titles.
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=technology&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "technology",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "technology", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "technology", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "technology")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=technology&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=technology
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Articles with Multiple Title Keywords
This request retrieves news articles that contain both "AI" and "innovation" in their titles. Multiple comma- or space-separated keywords use AND logic — every word must be present (order does not matter). To match articles containing either word, send one request per keyword and merge the results.
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=AI,innovation&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "AI,innovation",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "AI,innovation", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "AI,innovation", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "AI,innovation")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=AI,innovation&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=AI,innovation
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Articles with Titles Excluding Certain Words
This request retrieves news articles that do not have "celebrity" in their titles.
curl "https://api.apitube.io/v1/news/article?id=3036291250&ignore.title=celebrity&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"ignore.title": "celebrity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "ignore.title": "celebrity", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "ignore.title" => "celebrity", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("ignore.title", "celebrity")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&ignore.title=celebrity&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&ignore.title=celebrity
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCombined Title Filters for Specific News
This request combines title filters to find articles about AI but not about job losses.
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=AI&ignore.title=layoffs,job%20losses&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "AI",
"ignore.title": "layoffs,job losses",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "AI", "ignore.title": "layoffs,job losses", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "AI", "ignore.title" => "layoffs,job losses", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "AI")
q.Set("ignore.title", "layoffs,job losses")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=AI&ignore.title=layoffs,job%20losses&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=AI&ignore.title=layoffs,job%20losses
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleExact Phrase Search (Solr Style)
This request finds articles with the exact phrase "breaking news" in the title.
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22breaking%20news%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"breaking news\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"breaking news\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"breaking news\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"breaking news\"")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22breaking%20news%22&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22breaking%20news%22
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleExact Phrase Search (Solr Style)
This request finds articles with the exact phrase "breaking news" in the title.
Search for exact organization or person names:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22Federal%20Reserve%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"Federal Reserve\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"Federal Reserve\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"Federal Reserve\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"Federal Reserve\"")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22Federal%20Reserve%22&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22Federal%20Reserve%22
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleExact Phrase Search (Solr Style)
This request finds articles with the exact phrase "breaking news" in the title.
Search for exact organization or person names:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22United%20Nations%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"United Nations\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"United Nations\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"United Nations\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"United Nations\"")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22United%20Nations%22&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22United%20Nations%22
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleProximity Search with Slop (Solr Style)
Find articles where "Apple" and "iPhone" appear near each other:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22Apple%20iPhone%22~5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"Apple iPhone\"~5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"Apple iPhone\"~5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"Apple iPhone\"~5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"Apple iPhone\"~5")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22Apple%20iPhone%22~5&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22Apple%20iPhone%22~5
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleComparison: Regular vs. Phrase vs. Proximity
Regular search (finds keywords in any order, with synonyms):
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=artificial%20intelligence&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "artificial intelligence",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "artificial intelligence", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "artificial intelligence", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "artificial intelligence")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=artificial%20intelligence&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=artificial%20intelligence
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleComparison: Regular vs. Phrase vs. Proximity
Regular search (finds keywords in any order, with synonyms):
Matches: "Artificial Intelligence" "Intelligence in Artificial Systems", "AI", "intelligent artificial systems"
Phrase search (exact phrase only):
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22artificial%20intelligence%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"artificial intelligence\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"artificial intelligence\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"artificial intelligence\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"artificial intelligence\"")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22artificial%20intelligence%22&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22artificial%20intelligence%22
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleComparison: Regular vs. Phrase vs. Proximity
Regular search (finds keywords in any order, with synonyms):
Matches: "Artificial Intelligence" "Intelligence in Artificial Systems", "AI", "intelligent artificial systems"
Phrase search (exact phrase only):
Matches only: "Artificial Intelligence", "artificial intelligence" (exact phrase)
Proximity search (words near each other):
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22artificial%20intelligence%22~3&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"artificial intelligence\"~3",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"artificial intelligence\"~3", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"artificial intelligence\"~3", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"artificial intelligence\"~3")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22artificial%20intelligence%22~3&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22artificial%20intelligence%22~3
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCompany + Product Proximity Search
Find articles mentioning company and product name near each other:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22Tesla%20Cybertruck%22~3&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"Tesla Cybertruck\"~3",
"published_at.start": "NOW-7DAYS",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"Tesla Cybertruck\"~3", "published_at.start": "NOW-7DAYS", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"Tesla Cybertruck\"~3", "published_at.start" => "NOW-7DAYS", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"Tesla Cybertruck\"~3")
q.Set("published_at.start", "NOW-7DAYS")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22Tesla%20Cybertruck%22~3&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22Tesla%20Cybertruck%22~3&published_at.start=NOW-7DAYS
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEvent Names with Exact Match
Search for specific event names:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22Super%20Bowl%202024%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"Super Bowl 2024\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"Super Bowl 2024\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"Super Bowl 2024\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"Super Bowl 2024\"")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22Super%20Bowl%202024%22&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22Super%20Bowl%202024%22
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEvent Names with Exact Match
Search for specific event names:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=%22World%20Cup%20Final%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "\"World Cup Final\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "\"World Cup Final\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "\"World Cup Final\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "\"World Cup Final\"")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=%22World%20Cup%20Final%22&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=%22World%20Cup%20Final%22
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleArticle lookup
| Parameter | Type | Required | Description |
|---|---|---|---|
article.id | string | No | Comma-separated article IDs (max 5). Example: 12345. |
id | string | Yes | Comma-separated article IDs (max 100). Required. Example: 12345. |
Date and time
| Parameter | Type | Required | Description |
|---|---|---|---|
published_at | string | No | Exact date (creates 24-hour range). Format: YYYY-MM-DD or ISO 8601. Example: 2025-01-15. |
published_at.end | string | No | End of date range. Format: YYYY-MM-DD or ISO 8601. Combined with a title search the range may not exceed 31 days (ER0110). Example: 2025-01-31. |
published_at.start | string | No | Start of date range. Format: YYYY-MM-DD or ISO 8601. Combined with a title search the range may not exceed 31 days (ER0110). Example: 2025-01-01. |
Request to get news articles within a specific date range
curl "https://api.apitube.io/v1/news/article?id=3036291250&published_at.start=2022-01-01&published_at.end=2022-01-31&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"published_at.start": "2022-01-01",
"published_at.end": "2022-01-31",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "published_at.start": "2022-01-01", "published_at.end": "2022-01-31", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "published_at.start" => "2022-01-01", "published_at.end" => "2022-01-31", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("published_at.start", "2022-01-01")
q.Set("published_at.end", "2022-01-31")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&published_at.start=2022-01-01&published_at.end=2022-01-31&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&published_at.start=2022-01-01&published_at.end=2022-01-31
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news using a relative time range
curl "https://api.apitube.io/v1/news/article?id=3036291250&published_at.start=NOW-7DAYS&published_at.end=NOW&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"published_at.start": "NOW-7DAYS",
"published_at.end": "NOW",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "published_at.start": "NOW-7DAYS", "published_at.end": "NOW", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "published_at.start" => "NOW-7DAYS", "published_at.end" => "NOW", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("published_at.start", "NOW-7DAYS")
q.Set("published_at.end", "NOW")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&published_at.start=NOW-7DAYS&published_at.end=NOW&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&published_at.start=NOW-7DAYS&published_at.end=NOW
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleComplex Date-Range Analysis with Precise Timestamps
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&published_at.start=2025-03-01T14:00:00Z&published_at.end=2025-03-02T14:00:00Z&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Google",
"published_at.start": "2025-03-01T14:00:00Z",
"published_at.end": "2025-03-02T14:00:00Z",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Google", "published_at.start": "2025-03-01T14:00:00Z", "published_at.end": "2025-03-02T14:00:00Z", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Google", "published_at.start" => "2025-03-01T14:00:00Z", "published_at.end" => "2025-03-02T14:00:00Z", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Google")
q.Set("published_at.start", "2025-03-01T14:00:00Z")
q.Set("published_at.end", "2025-03-02T14:00:00Z")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&published_at.start=2025-03-01T14:00:00Z&published_at.end=2025-03-02T14:00:00Z&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&published_at.start=2025-03-01T14:00:00Z&published_at.end=2025-03-02T14:00:00Z&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleLanguages
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.language.code | string | No | Exclude articles in these languages (comma-separated, max 3). Example: zh,ar. |
language.code | string | No | Comma-separated ISO 639-1 language codes (max 3). Example: en. |
Request to get news articles excluding those from France and in the French language
curl "https://api.apitube.io/v1/news/article?id=3036291250&ignore.source.country.code=fr&ignore.language.code=fr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"ignore.source.country.code": "fr",
"ignore.language.code": "fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "ignore.source.country.code": "fr", "ignore.language.code": "fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "ignore.source.country.code" => "fr", "ignore.language.code" => "fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("ignore.source.country.code", "fr")
q.Set("ignore.language.code", "fr")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&ignore.source.country.code=fr&ignore.language.code=fr&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&ignore.source.country.code=fr&ignore.language.code=fr
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles in the English and French languages
curl "https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,fr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"language.code": "en,fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "language.code": "en,fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "language.code" => "en,fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("language.code", "en,fr")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,fr&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,fr
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMulti-language Analysis with Source Filtering
curl "https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,ja,de&source.rank.opr.min=6&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"language.code": "en,ja,de",
"source.rank.opr.min": "6",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "language.code": "en,ja,de", "source.rank.opr.min": "6", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "language.code" => "en,ja,de", "source.rank.opr.min" => "6", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("language.code", "en,ja,de")
q.Set("source.rank.opr.min", "6")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,ja,de&source.rank.opr.min=6&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,ja,de&source.rank.opr.min=6&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleLanguage-Specific Business News
curl "https://api.apitube.io/v1/news/article?id=3036291250&language.code=zh,ko&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"language.code": "zh,ko",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "language.code": "zh,ko", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "language.code" => "zh,ko", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("language.code", "zh,ko")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&language.code=zh,ko&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&language.code=zh,ko&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMultilingual Organization Sentiment Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,fr,de&organization.name=Netflix&sentiment.overall.polarity=positive&sort.by=published_at&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"language.code": "en,fr,de",
"organization.name": "Netflix",
"sentiment.overall.polarity": "positive",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "language.code": "en,fr,de", "organization.name": "Netflix", "sentiment.overall.polarity": "positive", "sort.by": "published_at", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "language.code" => "en,fr,de", "organization.name" => "Netflix", "sentiment.overall.polarity" => "positive", "sort.by" => "published_at", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("language.code", "en,fr,de")
q.Set("organization.name", "Netflix")
q.Set("sentiment.overall.polarity", "positive")
q.Set("sort.by", "published_at")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,fr,de&organization.name=Netflix&sentiment.overall.polarity=positive&sort.by=published_at&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&language.code=en,fr,de&organization.name=Netflix&sentiment.overall.polarity=positive&sort.by=published_at
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRegional Language News Comparison
curl "https://api.apitube.io/v1/news/article?id=3036291250&language.code=ar,he&category.id=medtop:11000000&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"language.code": "ar,he",
"category.id": "medtop:11000000",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "language.code": "ar,he", "category.id": "medtop:11000000", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "language.code" => "ar,he", "category.id" => "medtop:11000000", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("language.code", "ar,he")
q.Set("category.id", "medtop:11000000")
q.Set("sort.by", "sentiment.overall.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&language.code=ar,he&category.id=medtop:11000000&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&language.code=ar,he&category.id=medtop:11000000&sort.by=sentiment.overall.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSource
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.source.bias | string | No | Exclude sources with this media bias (comma-separated). Values: left, center, right. Example: right. |
ignore.source.country.code | string | No | Exclude sources from these countries (comma-separated, max 3). Example: us. |
ignore.source.domain | string | No | Exclude these source domains (comma-separated, max 3). |
ignore.source.id | string | No | Exclude these source IDs (comma-separated, max 3). |
is_premium_source | boolean | No | Filter by premium source status. |
is_verified_source | boolean | No | Filter by verified source status. |
source.bias | string | No | Filter by media bias (comma-separated). Values: left, center, right. Example: left. |
source.country.code | string | No | Filter by source country ISO 3166-1 alpha-2 codes (comma-separated, max 3). Example: us. |
source.domain | string | No | Comma-separated source domains (max 3). Example: nytimes.com. |
source.id | string | No | Comma-separated source IDs (max 3). Example: 100. |
source.rank.opr.max | integer | No | Maximum Open PageRank score. Range: min 0. |
source.rank.opr.min | integer | No | Minimum Open PageRank score. Range: min 0. |
Request to get news articles from a specific source (e.g., "theguardian.com")
curl "https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"source.domain": "theguardian.com",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "source.domain": "theguardian.com", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "source.domain" => "theguardian.com", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("source.domain", "theguardian.com")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles from multiple sources (e.g., "theguardian.com" and "nytimes.com")
curl "https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com,nytimes.com&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"source.domain": "theguardian.com,nytimes.com",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "source.domain": "theguardian.com,nytimes.com", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "source.domain" => "theguardian.com,nytimes.com", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("source.domain", "theguardian.com,nytimes.com")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com,nytimes.com&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com,nytimes.com
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles from a specific source and in a specific language (e.g., "theguardian.com" and "English")
curl "https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"source.domain": "theguardian.com",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "source.domain": "theguardian.com", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "source.domain" => "theguardian.com", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("source.domain", "theguardian.com")
q.Set("language.code", "en")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com&language.code=en&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&source.domain=theguardian.com&language.code=en
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles with rank between 0.5 and 0.9
curl "https://api.apitube.io/v1/news/article?id=3036291250&source.rank.opr.min=5&source.rank.opr.max=9&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"source.rank.opr.min": "5",
"source.rank.opr.max": "9",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "source.rank.opr.min": "5", "source.rank.opr.max": "9", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "source.rank.opr.min" => "5", "source.rank.opr.max" => "9", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("source.rank.opr.min", "5")
q.Set("source.rank.opr.max", "9")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&source.rank.opr.min=5&source.rank.opr.max=9&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&source.rank.opr.min=5&source.rank.opr.max=9
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCross-Regional Media Bias Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&source.country.code=us,gb,de&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.green_energy_news",
"source.country.code": "us,gb,de",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.green_energy_news", "source.country.code": "us,gb,de", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.green_energy_news", "source.country.code" => "us,gb,de", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.green_energy_news")
q.Set("source.country.code", "us,gb,de")
q.Set("sort.by", "sentiment.overall.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&source.country.code=us,gb,de&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&source.country.code=us,gb,de&sort.by=sentiment.overall.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for premium source articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_premium_source=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_premium_source": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_premium_source": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_premium_source" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_premium_source", "1")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_premium_source=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_premium_source=1&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for verified source articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_verified_source=1&published_at.start=2024-01-01&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_verified_source": "1",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_verified_source": "1", "published_at.start": "2024-01-01", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_verified_source" => "1", "published_at.start" => "2024-01-01", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_verified_source", "1")
q.Set("published_at.start", "2024-01-01")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_verified_source=1&published_at.start=2024-01-01&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_verified_source=1&published_at.start=2024-01-01
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleAuthors
| Parameter | Type | Required | Description |
|---|---|---|---|
author.id | string | No | Comma-separated author IDs (max 3). |
author.name | string | No | Filter by author name (comma-separated, max 3). Range: 0–100 characters. |
has_author | boolean | No | Filter articles with/without author. |
ignore.author.id | string | No | Exclude these author IDs (comma-separated, max 3). |
ignore.author.name | string | No | Exclude articles by these authors (comma-separated, max 3). Range: 0–100 characters. |
Request to get news articles by a specific author (e.g., "AFP")
curl "https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"author.name": "AFP",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "author.name": "AFP", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "author.name" => "AFP", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("author.name", "AFP")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles by multiple authors (e.g., "AFP" and "Reuters")
curl "https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP,Reuters&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"author.name": "AFP,Reuters",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "author.name": "AFP,Reuters", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "author.name" => "AFP,Reuters", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("author.name", "AFP,Reuters")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP,Reuters&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP,Reuters
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles by a specific author and in a specific language (e.g., "AFP" and "English")
curl "https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"author.name": "AFP",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "author.name": "AFP", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "author.name" => "AFP", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("author.name", "AFP")
q.Set("language.code", "en")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP&language.code=en&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP&language.code=en
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleAuthor Expertise Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&author.name=Ezra%20Klein&category.id=medtop:11000000&sort.by=published_at&sort.order=desc&per_page=10&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"author.name": "Ezra Klein",
"category.id": "medtop:11000000",
"sort.by": "published_at",
"sort.order": "desc",
"per_page": "10",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "author.name": "Ezra Klein", "category.id": "medtop:11000000", "sort.by": "published_at", "sort.order": "desc", "per_page": "10", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "author.name" => "Ezra Klein", "category.id" => "medtop:11000000", "sort.by" => "published_at", "sort.order" => "desc", "per_page" => "10", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("author.name", "Ezra Klein")
q.Set("category.id", "medtop:11000000")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("per_page", "10")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&author.name=Ezra%20Klein&category.id=medtop:11000000&sort.by=published_at&sort.order=desc&per_page=10&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&author.name=Ezra%20Klein&category.id=medtop:11000000&sort.by=published_at&sort.order=desc&per_page=10
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleAuthor Sentiment Bias Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP,Reuters&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"author.name": "AFP,Reuters",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "author.name": "AFP,Reuters", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "author.name" => "AFP,Reuters", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("author.name", "AFP,Reuters")
q.Set("sort.by", "sentiment.overall.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP,Reuters&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&author.name=AFP,Reuters&sort.by=sentiment.overall.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleAuthor Topic Evolution Tracking
curl "https://api.apitube.io/v1/news/article?id=3036291250&author.name=Reuters&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"author.name": "Reuters",
"sort.by": "published_at",
"sort.order": "asc",
"per_page": "100",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "author.name": "Reuters", "sort.by": "published_at", "sort.order": "asc", "per_page": "100", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "author.name" => "Reuters", "sort.by" => "published_at", "sort.order" => "asc", "per_page" => "100", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("author.name", "Reuters")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("per_page", "100")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&author.name=Reuters&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&author.name=Reuters&sort.by=published_at&sort.order=asc&per_page=100
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for articles with attributed authors
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_author=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_author": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_author": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_author" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_author", "1")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_author=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_author=1&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for articles without authors
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_author=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_author": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_author": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_author" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_author", "0")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_author=0&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_author=0
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCategories
| Parameter | Type | Required | Description |
|---|---|---|---|
category.id | string | No | Comma-separated category IDs (max 3). Example: iab-1. |
ignore.category.id | string | No | Exclude these categories (comma-separated, max 3). |
Request to get news articles from a specific category (e.g., "Sport")
This request retrieves news articles that fall under the "sport" category.
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:15000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:15000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:15000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:15000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:15000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:15000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:15000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Articles in the Finance Category
This request retrieves news articles in the "finance" category.
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Articles in a Category and Filtered by Language
This request retrieves news articles in the "politics" category that are in French.
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:11000000&language.code=fr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:11000000",
"language.code": "fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:11000000", "language.code": "fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:11000000", "language.code" => "fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:11000000")
q.Set("language.code", "fr")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:11000000&language.code=fr&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:11000000&language.code=fr
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCategory Time-Series Analysis
This request enables time-series analysis of articles in the "finance" category over a specific time period.
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&published_at.start=NOW-30DAY&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:04000000",
"published_at.start": "NOW-30DAY",
"sort.by": "published_at",
"sort.order": "asc",
"per_page": "100",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:04000000", "published_at.start": "NOW-30DAY", "sort.by": "published_at", "sort.order": "asc", "per_page": "100", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:04000000", "published_at.start" => "NOW-30DAY", "sort.by" => "published_at", "sort.order" => "asc", "per_page" => "100", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:04000000")
q.Set("published_at.start", "NOW-30DAY")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("per_page", "100")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&published_at.start=NOW-30DAY&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&published_at.start=NOW-30DAY&sort.by=published_at&sort.order=asc&per_page=100
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCategory-Based Media Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:01000000&media.images.count=3&source.rank.opr.min=6&sort.by=media.images.count&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:01000000",
"media.images.count": "3",
"source.rank.opr.min": "6",
"sort.by": "media.images.count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:01000000", "media.images.count": "3", "source.rank.opr.min": "6", "sort.by": "media.images.count", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:01000000", "media.images.count" => "3", "source.rank.opr.min" => "6", "sort.by" => "media.images.count", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:01000000")
q.Set("media.images.count", "3")
q.Set("source.rank.opr.min", "6")
q.Set("sort.by", "media.images.count")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:01000000&media.images.count=3&source.rank.opr.min=6&sort.by=media.images.count&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:01000000&media.images.count=3&source.rank.opr.min=6&sort.by=media.images.count&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCross-Category Sentiment Comparison
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&sort.by=category.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:20000003,medtop:11000000,medtop:20000607",
"sentiment.overall.polarity": "positive",
"sort.by": "category.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:20000003,medtop:11000000,medtop:20000607", "sentiment.overall.polarity": "positive", "sort.by": "category.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:20000003,medtop:11000000,medtop:20000607", "sentiment.overall.polarity" => "positive", "sort.by" => "category.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:20000003,medtop:11000000,medtop:20000607")
q.Set("sentiment.overall.polarity", "positive")
q.Set("sort.by", "category.id")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&sort.by=category.id&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&sort.by=category.id
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleTopics
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.topic.id | string | No | Exclude these topics (comma-separated, max 3). |
topic.id | string | No | Comma-separated topic IDs (max 3). Example: technology. |
Request to get news articles from a specific topic (e.g., "crypto_news")
This request retrieves news articles that fall under the "crypto news" topic.
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.crypto_news&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.crypto_news",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.crypto_news", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.crypto_news", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.crypto_news")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.crypto_news&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.crypto_news
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMulti-Topic Sentiment Analysis
This request analyzes sentiment across multiple related topics.
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news,industry.energy_news&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.green_energy_news,industry.energy_news",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.green_energy_news,industry.energy_news", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.green_energy_news,industry.energy_news", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.green_energy_news,industry.energy_news")
q.Set("sentiment.overall.polarity", "positive")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news,industry.energy_news&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news,industry.energy_news&sentiment.overall.polarity=positive
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleComparative Topic Analysis with Language Filtering
This request compares coverage of different topics across specific languages.
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&language.code=en,de,ja&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.ai_news",
"language.code": "en,de,ja",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.ai_news", "language.code": "en,de,ja", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.ai_news", "language.code" => "en,de,ja", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.ai_news")
q.Set("language.code", "en,de,ja")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&language.code=en,de,ja&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&language.code=en,de,ja&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleTopic and Entity Intersection Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.crypto_news&entity.id=326,327&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.crypto_news",
"entity.id": "326,327",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.crypto_news", "entity.id": "326,327", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.crypto_news", "entity.id" => "326,327", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.crypto_news")
q.Set("entity.id", "326,327")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.crypto_news&entity.id=326,327&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.crypto_news&entity.id=326,327&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleTopic-Based Expert Opinion Tracking
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.technology_news&language.code=en&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.technology_news",
"language.code": "en",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.technology_news", "language.code": "en", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.technology_news", "language.code" => "en", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.technology_news")
q.Set("language.code", "en")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.technology_news&language.code=en&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.technology_news&language.code=en&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleIndustries
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.industry.id | string | No | Exclude these industries (comma-separated, max 3). |
industry.id | string | No | Comma-separated industry IDs (max 3). Example: 1. |
Industry Sector Performance Tracking
curl "https://api.apitube.io/v1/news/article?id=3036291250&industry.id=400,438&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"industry.id": "400,438",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "industry.id": "400,438", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "industry.id" => "400,438", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("industry.id", "400,438")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&industry.id=400,438&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&industry.id=400,438&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCross-Industry Innovation Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&industry.id=400,438&title=innovation&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"industry.id": "400,438",
"title": "innovation",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "industry.id": "400,438", "title": "innovation", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "industry.id" => "400,438", "title" => "innovation", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("industry.id", "400,438")
q.Set("title", "innovation")
q.Set("sentiment.overall.polarity", "positive")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&industry.id=400,438&title=innovation&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&industry.id=400,438&title=innovation&sentiment.overall.polarity=positive
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEntities, people, organizations, brands
| Parameter | Type | Required | Description |
|---|---|---|---|
brand.name | string | No | Filter by brand name (comma-separated, max 3). Range: 0–120 characters. |
disaster.name | string | No | Filter by natural disaster name (comma-separated, max 3). Range: 0–120 characters. |
disease.name | string | No | Filter by disease name (comma-separated, max 3). Range: 0–120 characters. |
entity.id | string | No | Comma-separated entity IDs (max 3). Example: 12345. |
event.name | string | No | Filter by event name (comma-separated, max 3). Range: 0–120 characters. |
ignore.brand.name | string | No | Exclude articles mentioning these brands (comma-separated, max 3). Range: 0–120 characters. |
ignore.disaster.name | string | No | Exclude articles mentioning these disasters (comma-separated, max 3). Range: 0–120 characters. |
ignore.disease.name | string | No | Exclude articles mentioning these diseases (comma-separated, max 3). Range: 0–120 characters. |
ignore.entity.id | string | No | Exclude these entity IDs (comma-separated, max 3). |
ignore.event.name | string | No | Exclude articles mentioning these events (comma-separated, max 3). Range: 0–120 characters. |
ignore.location.name | string | No | Exclude articles mentioning these locations (comma-separated, max 3). Range: 0–120 characters. |
ignore.organization.name | string | No | Exclude articles mentioning these organizations (comma-separated, max 3). Range: 0–120 characters. |
ignore.person.name | string | No | Exclude articles mentioning these persons (comma-separated, max 3). Range: 0–120 characters. |
ignore.sport.name | string | No | Exclude articles mentioning these sports (comma-separated, max 3). Range: 0–120 characters. |
location.name | string | No | Filter by location name (comma-separated, max 3). Range: 0–120 characters. Example: New York. |
organization.name | string | No | Filter by organization name (comma-separated, max 3). Range: 0–120 characters. Example: Google. |
person.name | string | No | Filter by person name (comma-separated, max 3). Range: 0–120 characters. Example: Elon Musk. |
sport.name | string | No | Filter by sport name (comma-separated, max 3). Range: 0–120 characters. |
Request to get news articles about a specific entity (e.g., "Brad Pitt")
curl "https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"entity.id": "1278268",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "entity.id": "1278268", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "entity.id" => "1278268", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("entity.id", "1278268")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple entities (e.g., "Brad Pitt" and "Angelina Jolie")
curl "https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"entity.id": "1278268,1282301",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "entity.id": "1278268,1282301", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "entity.id" => "1278268,1282301", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("entity.id", "1278268,1282301")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about an entity while ignoring another
curl "https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&ignore.entity.id=315&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"entity.id": "1278268",
"ignore.entity.id": "315",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "entity.id": "1278268", "ignore.entity.id": "315", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "entity.id" => "1278268", "ignore.entity.id" => "315", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("entity.id", "1278268")
q.Set("ignore.entity.id", "315")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&ignore.entity.id=315&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&ignore.entity.id=315
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEntity Correlation Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"entity.id": "1278268,1282301",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "entity.id": "1278268,1282301", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "entity.id" => "1278268,1282301", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("entity.id", "1278268,1282301")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEntity Mention Tracking Over Time
curl "https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&per_page=100&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"entity.id": "1278268",
"per_page": "100",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "entity.id": "1278268", "per_page": "100", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "entity.id" => "1278268", "per_page" => "100", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("entity.id", "1278268")
q.Set("per_page", "100")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&per_page=100&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&per_page=100&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEntity Co-occurrence Network Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&sort.by=published_at&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"entity.id": "1278268",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "entity.id": "1278268", "sort.by": "published_at", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "entity.id" => "1278268", "sort.by" => "published_at", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("entity.id", "1278268")
q.Set("sort.by", "published_at")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&sort.by=published_at&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268&sort.by=published_at
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEntity Impact on Market Sentiment
curl "https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&category.id=medtop:04000000&sentiment.overall.score.min=0.7&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"entity.id": "1278268,1282301",
"category.id": "medtop:04000000",
"sentiment.overall.score.min": "0.7",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "entity.id": "1278268,1282301", "category.id": "medtop:04000000", "sentiment.overall.score.min": "0.7", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "entity.id" => "1278268,1282301", "category.id" => "medtop:04000000", "sentiment.overall.score.min" => "0.7", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("entity.id", "1278268,1282301")
q.Set("category.id", "medtop:04000000")
q.Set("sentiment.overall.score.min", "0.7")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&category.id=medtop:04000000&sentiment.overall.score.min=0.7&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&entity.id=1278268,1282301&category.id=medtop:04000000&sentiment.overall.score.min=0.7&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a specific person (e.g., "Elon Musk")
curl "https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"person.name": "Elon Musk",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "person.name": "Elon Musk", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "person.name" => "Elon Musk", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("person.name", "Elon Musk")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple people (e.g., "Elon Musk" and "Donald Trump")
curl "https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk,Donald%20Trump&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"person.name": "Elon Musk,Donald Trump",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "person.name": "Elon Musk,Donald Trump", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "person.name" => "Elon Musk,Donald Trump", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("person.name", "Elon Musk,Donald Trump")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk,Donald%20Trump&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk,Donald%20Trump
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articlePerson Sentiment Analysis Across Sources
curl "https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&source.domain=theguardian.com,foxnews.com,nytimes.com&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"person.name": "Elon Musk",
"source.domain": "theguardian.com,foxnews.com,nytimes.com",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "person.name": "Elon Musk", "source.domain": "theguardian.com,foxnews.com,nytimes.com", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "person.name" => "Elon Musk", "source.domain" => "theguardian.com,foxnews.com,nytimes.com", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("person.name", "Elon Musk")
q.Set("source.domain", "theguardian.com,foxnews.com,nytimes.com")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&source.domain=theguardian.com,foxnews.com,nytimes.com&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&source.domain=theguardian.com,foxnews.com,nytimes.com&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCross-reference Person with Organizations
curl "https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&organization.name=Tesla&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"person.name": "Elon Musk",
"organization.name": "Tesla",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "person.name": "Elon Musk", "organization.name": "Tesla", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "person.name" => "Elon Musk", "organization.name" => "Tesla", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("person.name", "Elon Musk")
q.Set("organization.name", "Tesla")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&organization.name=Tesla&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&organization.name=Tesla&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articlePublic Figure Controversy Timeline
curl "https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"person.name": "Elon Musk",
"sentiment.overall.polarity": "negative",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "person.name": "Elon Musk", "sentiment.overall.polarity": "negative", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "person.name" => "Elon Musk", "sentiment.overall.polarity" => "negative", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("person.name", "Elon Musk")
q.Set("sentiment.overall.polarity", "negative")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articlePerson Mention in Research Publications
curl "https://api.apitube.io/v1/news/article?id=3036291250&person.name=Stephen%20Hawking&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"person.name": "Stephen Hawking",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "person.name": "Stephen Hawking", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "person.name" => "Stephen Hawking", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("person.name", "Stephen Hawking")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&person.name=Stephen%20Hawking&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&person.name=Stephen%20Hawking&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a specific organization (e.g., "Google")
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Google")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple organizations (e.g., "Google" and "Apple")
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google,Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Google,Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Google,Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Google,Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Google,Apple")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google,Apple&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google,Apple
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about an organization while ignoring another (e.g., "Google" and excluding "Apple")
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&ignore.organization.name=Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Google",
"ignore.organization.name": "Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Google", "ignore.organization.name": "Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Google", "ignore.organization.name" => "Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Google")
q.Set("ignore.organization.name", "Apple")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&ignore.organization.name=Apple&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&ignore.organization.name=Apple
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCompetitive Intelligence Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla,Meta,Netflix&category.id=medtop:13000000&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Tesla,Meta,Netflix",
"category.id": "medtop:13000000",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Tesla,Meta,Netflix", "category.id": "medtop:13000000", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Tesla,Meta,Netflix", "category.id" => "medtop:13000000", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Tesla,Meta,Netflix")
q.Set("category.id", "medtop:13000000")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla,Meta,Netflix&category.id=medtop:13000000&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla,Meta,Netflix&category.id=medtop:13000000&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleOrganization Sentiment Tracking During Financial Events
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&sort.by=published_at&sort.order=asc&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Google",
"sort.by": "published_at",
"sort.order": "asc",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Google", "sort.by": "published_at", "sort.order": "asc", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Google", "sort.by" => "published_at", "sort.order" => "asc", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Google")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&sort.by=published_at&sort.order=asc&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&sort.by=published_at&sort.order=asc&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCorporate Social Responsibility Coverage
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Microsoft,Google,Amazon&title=sustainability,ESG,green&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Microsoft,Google,Amazon",
"title": "sustainability,ESG,green",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Microsoft,Google,Amazon", "title": "sustainability,ESG,green", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Microsoft,Google,Amazon", "title" => "sustainability,ESG,green", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Microsoft,Google,Amazon")
q.Set("title", "sustainability,ESG,green")
q.Set("sentiment.overall.polarity", "positive")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Microsoft,Google,Amazon&title=sustainability,ESG,green&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Microsoft,Google,Amazon&title=sustainability,ESG,green&sentiment.overall.polarity=positive
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleExecutive Leadership Transition Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&title=CEO&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Google",
"title": "CEO",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Google", "title": "CEO", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Google", "title" => "CEO", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Google")
q.Set("title", "CEO")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&title=CEO&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Google&title=CEO&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a specific disaster (e.g., "Earthquake")
curl "https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disaster.name": "earthquake",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disaster.name": "earthquake", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disaster.name" => "earthquake", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disaster.name", "earthquake")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple disasters (e.g., "Earthquake" and "Tsunami")
curl "https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake,tsunami&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disaster.name": "earthquake,tsunami",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disaster.name": "earthquake,tsunami", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disaster.name" => "earthquake,tsunami", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disaster.name", "earthquake,tsunami")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake,tsunami&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake,tsunami
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a disaster while ignoring another
curl "https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=hurricane&ignore.disaster.name=tornado&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disaster.name": "hurricane",
"ignore.disaster.name": "tornado",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disaster.name": "hurricane", "ignore.disaster.name": "tornado", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disaster.name" => "hurricane", "ignore.disaster.name" => "tornado", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disaster.name", "hurricane")
q.Set("ignore.disaster.name", "tornado")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=hurricane&ignore.disaster.name=tornado&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=hurricane&ignore.disaster.name=tornado
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleDisaster Impact Analysis by Region
curl "https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake&location.name=Japan&sort.by=published_at&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disaster.name": "earthquake",
"location.name": "Japan",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disaster.name": "earthquake", "location.name": "Japan", "sort.by": "published_at", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disaster.name" => "earthquake", "location.name" => "Japan", "sort.by" => "published_at", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disaster.name", "earthquake")
q.Set("location.name", "Japan")
q.Set("sort.by", "published_at")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake&location.name=Japan&sort.by=published_at&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disaster.name=earthquake&location.name=Japan&sort.by=published_at
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a specific disease (e.g., "COVID-19")
curl "https://api.apitube.io/v1/news/article?id=3036291250&disease.name=COVID-19&category.id=medtop:07000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disease.name": "COVID-19",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disease.name": "COVID-19", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disease.name" => "COVID-19", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disease.name", "COVID-19")
q.Set("category.id", "medtop:07000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disease.name=COVID-19&category.id=medtop:07000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disease.name=COVID-19&category.id=medtop:07000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple diseases
curl "https://api.apitube.io/v1/news/article?id=3036291250&disease.name=COVID-19,Influenza&category.id=medtop:07000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disease.name": "COVID-19,Influenza",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disease.name": "COVID-19,Influenza", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disease.name" => "COVID-19,Influenza", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disease.name", "COVID-19,Influenza")
q.Set("category.id", "medtop:07000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disease.name=COVID-19,Influenza&category.id=medtop:07000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disease.name=COVID-19,Influenza&category.id=medtop:07000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a disease while ignoring another
curl "https://api.apitube.io/v1/news/article?id=3036291250&disease.name=malaria&ignore.disease.name=dengue&category.id=medtop:07000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disease.name": "malaria",
"ignore.disease.name": "dengue",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disease.name": "malaria", "ignore.disease.name": "dengue", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disease.name" => "malaria", "ignore.disease.name" => "dengue", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disease.name", "malaria")
q.Set("ignore.disease.name", "dengue")
q.Set("category.id", "medtop:07000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disease.name=malaria&ignore.disease.name=dengue&category.id=medtop:07000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disease.name=malaria&ignore.disease.name=dengue&category.id=medtop:07000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleDisease Outbreak Tracking
curl "https://api.apitube.io/v1/news/article?id=3036291250&disease.name=measles&category.id=medtop:07000000&published_at.start=2024-01-01&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"disease.name": "measles",
"category.id": "medtop:07000000",
"published_at.start": "2024-01-01",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "disease.name": "measles", "category.id": "medtop:07000000", "published_at.start": "2024-01-01", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "disease.name" => "measles", "category.id" => "medtop:07000000", "published_at.start" => "2024-01-01", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("disease.name", "measles")
q.Set("category.id", "medtop:07000000")
q.Set("published_at.start", "2024-01-01")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&disease.name=measles&category.id=medtop:07000000&published_at.start=2024-01-01&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&disease.name=measles&category.id=medtop:07000000&published_at.start=2024-01-01&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a specific brand (e.g., "Apple")
curl "https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"brand.name": "Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "brand.name": "Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "brand.name" => "Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("brand.name", "Apple")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple brands (e.g., "Apple" and "Google")
curl "https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple,Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"brand.name": "Apple,Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "brand.name": "Apple,Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "brand.name" => "Apple,Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("brand.name", "Apple,Google")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple,Google&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple,Google
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a brand while ignoring another (e.g., "Apple" and excluding "Google")
curl "https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple&ignore.brand.name=Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"brand.name": "Apple",
"ignore.brand.name": "Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "brand.name": "Apple", "ignore.brand.name": "Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "brand.name" => "Apple", "ignore.brand.name" => "Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("brand.name", "Apple")
q.Set("ignore.brand.name", "Google")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple&ignore.brand.name=Google&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Apple&ignore.brand.name=Google
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBrand Reputation Analysis Across Markets
curl "https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Tesla&source.country.code=us,de,gb&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"brand.name": "Tesla",
"source.country.code": "us,de,gb",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "brand.name": "Tesla", "source.country.code": "us,de,gb", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "brand.name" => "Tesla", "source.country.code" => "us,de,gb", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("brand.name", "Tesla")
q.Set("source.country.code", "us,de,gb")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Tesla&source.country.code=us,de,gb&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Tesla&source.country.code=us,de,gb&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBrand Sponsorship Impact Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Google,Microsoft,Amazon&title=sponsorship,tournament,championship&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"brand.name": "Google,Microsoft,Amazon",
"title": "sponsorship,tournament,championship",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "brand.name": "Google,Microsoft,Amazon", "title": "sponsorship,tournament,championship", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "brand.name" => "Google,Microsoft,Amazon", "title" => "sponsorship,tournament,championship", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("brand.name", "Google,Microsoft,Amazon")
q.Set("title", "sponsorship,tournament,championship")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Google,Microsoft,Amazon&title=sponsorship,tournament,championship&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Google,Microsoft,Amazon&title=sponsorship,tournament,championship&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBrand Crisis Management Tracking
curl "https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Tesla&title=recall&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"brand.name": "Tesla",
"title": "recall",
"sentiment.overall.polarity": "negative",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "brand.name": "Tesla", "title": "recall", "sentiment.overall.polarity": "negative", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "brand.name" => "Tesla", "title" => "recall", "sentiment.overall.polarity" => "negative", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("brand.name", "Tesla")
q.Set("title", "recall")
q.Set("sentiment.overall.polarity", "negative")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Tesla&title=recall&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&brand.name=Tesla&title=recall&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a specific sport (e.g., "Football")
curl "https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sport.name": "Football",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sport.name": "Football", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sport.name" => "Football", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sport.name", "Football")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple sports
curl "https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football,Basketball&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sport.name": "Football,Basketball",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sport.name": "Football,Basketball", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sport.name" => "Football,Basketball", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sport.name", "Football,Basketball")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football,Basketball&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football,Basketball
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about a sport while ignoring another
curl "https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football&ignore.sport.name=Cricket&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sport.name": "Football",
"ignore.sport.name": "Cricket",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sport.name": "Football", "ignore.sport.name": "Cricket", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sport.name" => "Football", "ignore.sport.name" => "Cricket", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sport.name", "Football")
q.Set("ignore.sport.name", "Cricket")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football&ignore.sport.name=Cricket&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sport.name=Football&ignore.sport.name=Cricket
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEvent types
| Parameter | Type | Required | Description |
|---|---|---|---|
event.category | string | No | Filter by event category. One of: business, society, environment. |
event.type | string | No | Comma-separated event types (max 5). Values: merger-acquisition, ipo, layoffs, bankruptcy, product-launch, funding-round, earnings, partnership, executive-change, lawsuit, data-breach, recall, expansion, closure, stock-movement, contract-award, spin-off, regulatory-action, election, protest, crime, terrorism, accident, policy-change, scandal, death, award-ceremony, conflict, diplomacy, health-crisis, migration, human-rights, earthquake, hurricane, flood, wildfire, tornado, tsunami, volcanic-eruption, drought, climate-event, pollution, wildlife-event, avalanche. Example: ipo. |
ignore.event.type | string | No | Exclude these event types (comma-separated, max 5). |
Request to get news articles about a specific event (e.g., "Black Friday")
curl "https://api.apitube.io/v1/news/article?id=3036291250&event.name=Black%20Friday&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"event.name": "Black Friday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "event.name": "Black Friday", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "event.name" => "Black Friday", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("event.name", "Black Friday")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&event.name=Black%20Friday&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&event.name=Black%20Friday
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about multiple events
curl "https://api.apitube.io/v1/news/article?id=3036291250&event.name=Black%20Friday,Cyber%20Monday&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"event.name": "Black Friday,Cyber Monday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "event.name": "Black Friday,Cyber Monday", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "event.name" => "Black Friday,Cyber Monday", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("event.name", "Black Friday,Cyber Monday")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&event.name=Black%20Friday,Cyber%20Monday&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&event.name=Black%20Friday,Cyber%20Monday
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles about an event while ignoring another
curl "https://api.apitube.io/v1/news/article?id=3036291250&event.name=Grammy%20Awards&ignore.event.name=Oscar&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"event.name": "Grammy Awards",
"ignore.event.name": "Oscar",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "event.name": "Grammy Awards", "ignore.event.name": "Oscar", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "event.name" => "Grammy Awards", "ignore.event.name" => "Oscar", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("event.name", "Grammy Awards")
q.Set("ignore.event.name", "Oscar")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&event.name=Grammy%20Awards&ignore.event.name=Oscar&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&event.name=Grammy%20Awards&ignore.event.name=Oscar
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEvent Coverage Sentiment Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&event.name=CES&sentiment.overall.polarity=positive&published_at.start=2024-01-01&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"event.name": "CES",
"sentiment.overall.polarity": "positive",
"published_at.start": "2024-01-01",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "event.name": "CES", "sentiment.overall.polarity": "positive", "published_at.start": "2024-01-01", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "event.name" => "CES", "sentiment.overall.polarity" => "positive", "published_at.start" => "2024-01-01", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("event.name", "CES")
q.Set("sentiment.overall.polarity", "positive")
q.Set("published_at.start", "2024-01-01")
q.Set("sort.by", "sentiment.overall.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&event.name=CES&sentiment.overall.polarity=positive&published_at.start=2024-01-01&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&event.name=CES&sentiment.overall.polarity=positive&published_at.start=2024-01-01&sort.by=sentiment.overall.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSentiment
| Parameter | Type | Required | Description |
|---|---|---|---|
entity.sentiment.polarity | string | No | Filter by sentiment polarity toward the entity (combine with entity.id or *.name; standalone = any entity). One of: positive, negative, neutral. |
entity.sentiment.score.max | number | No | Maximum sentiment score toward the entity. Range: -1–1. |
entity.sentiment.score.min | number | No | Minimum sentiment score toward the entity. Range: -1–1. |
is_clickbait | boolean | No | Filter by clickbait detection. |
sentiment.body.polarity | string | No | Body sentiment polarity. One of: positive, negative, neutral. |
sentiment.body.score | number | No | Exact body sentiment score. Range: -1–1. |
sentiment.body.score.max | number | No | Maximum body sentiment score. Range: -1–1. |
sentiment.body.score.min | number | No | Minimum body sentiment score. Range: -1–1. |
sentiment.consistent | boolean | No | Filter for consistent sentiment (title polarity == body polarity). |
sentiment.mixed | boolean | No | Filter for mixed sentiment (title polarity != body polarity). |
sentiment.overall.polarity | string | No | Overall sentiment polarity. One of: positive, negative, neutral. |
sentiment.overall.score | number | No | Exact overall sentiment score. Range: -1–1. |
sentiment.overall.score.max | number | No | Maximum overall sentiment score. Range: -1–1. |
sentiment.overall.score.min | number | No | Minimum overall sentiment score. Range: -1–1. |
sentiment.title.polarity | string | No | Title sentiment polarity. One of: positive, negative, neutral. |
sentiment.title.score | number | No | Exact title sentiment score. Range: -1–1. |
sentiment.title.score.max | number | No | Maximum title sentiment score. Range: -1–1. |
sentiment.title.score.min | number | No | Minimum title sentiment score. Range: -1–1. |
sentiment_gap.max | number | No | Maximum sentiment gap between title and body. Range: 0–2. |
sentiment_gap.min | number | No | Minimum sentiment gap between title and body. Range: 0–2. |
Request for Positive Sentiment News
This request retrieves news articles that have been classified with a positive sentiment.
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.overall.polarity", "positive")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Positive Sentiment News from a Specific Country
This request fetches news articles with positive sentiment specifically from Japan
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&source.country.code=jp&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.overall.polarity": "positive",
"source.country.code": "jp",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.overall.polarity": "positive", "source.country.code": "jp", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.overall.polarity" => "positive", "source.country.code" => "jp", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.overall.polarity", "positive")
q.Set("source.country.code", "jp")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&source.country.code=jp&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&source.country.code=jp
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Positive Sentiment News in the Last 24 Hours
This request retrieves news articles with positive sentiment published in the last 24 hours.
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&published_at.start=2024-12-02&published_at.end=2024-12-03&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.overall.polarity": "positive",
"published_at.start": "2024-12-02",
"published_at.end": "2024-12-03",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.overall.polarity": "positive", "published_at.start": "2024-12-02", "published_at.end": "2024-12-03", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.overall.polarity" => "positive", "published_at.start" => "2024-12-02", "published_at.end" => "2024-12-03", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.overall.polarity", "positive")
q.Set("published_at.start", "2024-12-02")
q.Set("published_at.end", "2024-12-03")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&published_at.start=2024-12-02&published_at.end=2024-12-03&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&published_at.start=2024-12-02&published_at.end=2024-12-03
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Articles with Positive Sentiment and a Specific Title
This request retrieves news articles with positive sentiment that have "technology" in their titles.
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&title=technology&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.overall.polarity": "positive",
"title": "technology",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.overall.polarity": "positive", "title": "technology", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.overall.polarity" => "positive", "title" => "technology", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.overall.polarity", "positive")
q.Set("title", "technology")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&title=technology&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=positive&title=technology
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMulti-dimensional Sentiment Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.score.min=0.7&category.id=medtop:04000000&organization.name=Google,Microsoft&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.overall.score.min": "0.7",
"category.id": "medtop:04000000",
"organization.name": "Google,Microsoft",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.overall.score.min": "0.7", "category.id": "medtop:04000000", "organization.name": "Google,Microsoft", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.overall.score.min" => "0.7", "category.id" => "medtop:04000000", "organization.name" => "Google,Microsoft", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.overall.score.min", "0.7")
q.Set("category.id", "medtop:04000000")
q.Set("organization.name", "Google,Microsoft")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.score.min=0.7&category.id=medtop:04000000&organization.name=Google,Microsoft&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.score.min=0.7&category.id=medtop:04000000&organization.name=Google,Microsoft&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleComparative Sentiment Analysis Across Markets
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=negative&source.country.code=us,gb,de&category.id=medtop:07000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.overall.polarity": "negative",
"source.country.code": "us,gb,de",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.overall.polarity": "negative", "source.country.code": "us,gb,de", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.overall.polarity" => "negative", "source.country.code" => "us,gb,de", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.overall.polarity", "negative")
q.Set("source.country.code", "us,gb,de")
q.Set("category.id", "medtop:07000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=negative&source.country.code=us,gb,de&category.id=medtop:07000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.overall.polarity=negative&source.country.code=us,gb,de&category.id=medtop:07000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSentiment Divergence Analysis by Source Type
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&sentiment.overall.polarity=positive&source.domain=theguardian.com,nytimes.com&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.green_energy_news",
"sentiment.overall.polarity": "positive",
"source.domain": "theguardian.com,nytimes.com",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.green_energy_news", "sentiment.overall.polarity": "positive", "source.domain": "theguardian.com,nytimes.com", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.green_energy_news", "sentiment.overall.polarity" => "positive", "source.domain" => "theguardian.com,nytimes.com", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.green_energy_news")
q.Set("sentiment.overall.polarity", "positive")
q.Set("source.domain", "theguardian.com,nytimes.com")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&sentiment.overall.polarity=positive&source.domain=theguardian.com,nytimes.com&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&sentiment.overall.polarity=positive&source.domain=theguardian.com,nytimes.com
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleProduct Review Sentiment Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=review&organization.name=Apple&sentiment.overall.score.min=-1.0&sentiment.overall.score.max=1.0&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "review",
"organization.name": "Apple",
"sentiment.overall.score.min": "-1.0",
"sentiment.overall.score.max": "1.0",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "review", "organization.name": "Apple", "sentiment.overall.score.min": "-1.0", "sentiment.overall.score.max": "1.0", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "review", "organization.name" => "Apple", "sentiment.overall.score.min" => "-1.0", "sentiment.overall.score.max" => "1.0", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "review")
q.Set("organization.name", "Apple")
q.Set("sentiment.overall.score.min", "-1.0")
q.Set("sentiment.overall.score.max", "1.0")
q.Set("sort.by", "sentiment.overall.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=review&organization.name=Apple&sentiment.overall.score.min=-1.0&sentiment.overall.score.max=1.0&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=review&organization.name=Apple&sentiment.overall.score.min=-1.0&sentiment.overall.score.max=1.0&sort.by=sentiment.overall.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for articles with mixed sentiment
This request finds articles where the title sentiment differs from body sentiment, useful for detecting clickbait or controversial framing.
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.mixed=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.mixed": "1",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.mixed": "1", "category.id": "medtop:11000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.mixed" => "1", "category.id" => "medtop:11000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.mixed", "1")
q.Set("category.id", "medtop:11000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.mixed=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.mixed=1&category.id=medtop:11000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for articles with consistent sentiment
This request finds articles where the title and body sentiment align, indicating more straightforward reporting.
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment.consistent=1&has_author=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment.consistent": "1",
"has_author": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment.consistent": "1", "has_author": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment.consistent" => "1", "has_author" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment.consistent", "1")
q.Set("has_author", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment.consistent=1&has_author=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment.consistent=1&has_author=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for clickbait articles
This request finds articles where the headline is sensationalized – title sentiment differs from body content and has a strong emotional charge.
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_clickbait": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_clickbait": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_clickbait" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_clickbait", "1")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=1&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for non-clickbait, trustworthy articles
This request finds articles with consistent headline-to-content sentiment from verified sources.
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=0&is_verified_source=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_clickbait": "0",
"is_verified_source": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_clickbait": "0", "is_verified_source": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_clickbait" => "0", "is_verified_source" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_clickbait", "0")
q.Set("is_verified_source", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=0&is_verified_source=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=0&is_verified_source=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFilter by sentiment gap – find articles with significant title/body mismatch
This request finds articles where the sentiment score differs by at least 0.5 between title and body.
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment_gap.min=0.5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment_gap.min": "0.5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment_gap.min": "0.5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment_gap.min" => "0.5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment_gap.min", "0.5")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment_gap.min=0.5&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment_gap.min=0.5
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFilter by sentiment gap – find editorially consistent articles
This request finds articles with minimal sentiment difference (gap < 0.2) between title and body.
curl "https://api.apitube.io/v1/news/article?id=3036291250&sentiment_gap.max=0.2&source.rank.opr.min=5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sentiment_gap.max": "0.2",
"source.rank.opr.min": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sentiment_gap.max": "0.2", "source.rank.opr.min": "5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sentiment_gap.max" => "0.2", "source.rank.opr.min" => "5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sentiment_gap.max", "0.2")
q.Set("source.rank.opr.min", "5")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sentiment_gap.max=0.2&source.rank.opr.min=5&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sentiment_gap.max=0.2&source.rank.opr.min=5
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCombined clickbait analysis for political news
This request analyzes clickbait patterns in political coverage.
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=1&category.id=medtop:11000000&sentiment_gap.min=0.3&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_clickbait": "1",
"category.id": "medtop:11000000",
"sentiment_gap.min": "0.3",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_clickbait": "1", "category.id": "medtop:11000000", "sentiment_gap.min": "0.3", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_clickbait" => "1", "category.id" => "medtop:11000000", "sentiment_gap.min" => "0.3", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_clickbait", "1")
q.Set("category.id", "medtop:11000000")
q.Set("sentiment_gap.min", "0.3")
q.Set("sort.by", "sentiment.overall.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=1&category.id=medtop:11000000&sentiment_gap.min=0.3&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_clickbait=1&category.id=medtop:11000000&sentiment_gap.min=0.3&sort.by=sentiment.overall.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMedia
| Parameter | Type | Required | Description |
|---|---|---|---|
has_4k_images | boolean | No | Filter articles with 4K images (>= 3840px width). |
has_consistent_image_sizes | boolean | No | Filter articles with consistent image dimensions. |
has_fullhd_images | boolean | No | Filter articles with Full HD images (>= 1920px width). |
has_hq_images | boolean | No | Filter articles with high-quality images (>= 1200px width). |
has_image | boolean | No | Filter articles with/without images. |
has_mixed_media | boolean | No | Filter articles with both image and video media types. |
has_mobile_optimized_images | boolean | No | Filter articles with mobile-optimized images (320-800px width). |
has_multiple_images | boolean | No | Filter articles with 2+ images. |
has_social_share_image | boolean | No | Filter articles with social share images (>= 1200x630px). |
has_thumbnail | boolean | No | Filter articles with thumbnail images (<= 300px width). |
has_video | boolean | No | Filter articles with/without videos. |
is_instagram_ready | boolean | No | Filter articles with Instagram-ready images (>= 1080px + aspect ratio). |
is_landscape_media | boolean | No | Filter articles with landscape-oriented media. |
is_media_rich | boolean | No | Filter articles with both images and videos. |
is_portrait_media | boolean | No | Filter articles with portrait-oriented media. |
is_twitter_card_ready | boolean | No | Filter articles with Twitter Card-ready images (>= 800px + landscape). |
media.images.count | integer | No | Exact number of images. Range: min 0. |
media.images.count.max | integer | No | Maximum number of images. Range: min 0. |
media.images.count.min | integer | No | Minimum number of images. Range: min 0. |
media.images.height.max | integer | No | Maximum image height in pixels. Range: min 0. |
media.images.height.min | integer | No | Minimum image height in pixels. Range: min 0. |
media.images.width.max | integer | No | Maximum image width in pixels. Range: min 0. |
media.images.width.min | integer | No | Minimum image width in pixels. Range: min 0. |
media.videos.count | integer | No | Exact number of videos. Range: min 0. |
media.videos.count.max | integer | No | Maximum number of videos. Range: min 0. |
media.videos.count.min | integer | No | Minimum number of videos. Range: min 0. |
Request to get news articles with a specific number of images and videos
curl "https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=2&media.videos.count=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"media.images.count": "2",
"media.videos.count": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "media.images.count": "2", "media.videos.count": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "media.images.count" => "2", "media.videos.count" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("media.images.count", "2")
q.Set("media.videos.count", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=2&media.videos.count=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=2&media.videos.count=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles with images of a specific size
curl "https://api.apitube.io/v1/news/article?id=3036291250&media.images.width.min=200&media.images.width.max=800&media.images.height.min=200&media.images.height.max=800&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"media.images.width.min": "200",
"media.images.width.max": "800",
"media.images.height.min": "200",
"media.images.height.max": "800",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "media.images.width.min": "200", "media.images.width.max": "800", "media.images.height.min": "200", "media.images.height.max": "800", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "media.images.width.min" => "200", "media.images.width.max" => "800", "media.images.height.min" => "200", "media.images.height.max" => "800", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("media.images.width.min", "200")
q.Set("media.images.width.max", "800")
q.Set("media.images.height.min", "200")
q.Set("media.images.height.max", "800")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&media.images.width.min=200&media.images.width.max=800&media.images.height.min=200&media.images.height.max=800&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&media.images.width.min=200&media.images.width.max=800&media.images.height.min=200&media.images.height.max=800
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRich Media Content Curation
curl "https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=3&media.videos.count=1&category.id=medtop:13000000&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"media.images.count": "3",
"media.videos.count": "1",
"category.id": "medtop:13000000",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "media.images.count": "3", "media.videos.count": "1", "category.id": "medtop:13000000", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "media.images.count" => "3", "media.videos.count" => "1", "category.id" => "medtop:13000000", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("media.images.count", "3")
q.Set("media.videos.count", "1")
q.Set("category.id", "medtop:13000000")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=3&media.videos.count=1&category.id=medtop:13000000&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=3&media.videos.count=1&category.id=medtop:13000000&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleHigh-Quality Visual News Aggregation
curl "https://api.apitube.io/v1/news/article?id=3036291250&media.images.width.min=1200&media.images.height.min=800&media.images.count=2&sentiment.overall.polarity=positive&category.id=medtop:13000000&source.rank.opr.min=6&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"media.images.width.min": "1200",
"media.images.height.min": "800",
"media.images.count": "2",
"sentiment.overall.polarity": "positive",
"category.id": "medtop:13000000",
"source.rank.opr.min": "6",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "media.images.width.min": "1200", "media.images.height.min": "800", "media.images.count": "2", "sentiment.overall.polarity": "positive", "category.id": "medtop:13000000", "source.rank.opr.min": "6", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "media.images.width.min" => "1200", "media.images.height.min" => "800", "media.images.count" => "2", "sentiment.overall.polarity" => "positive", "category.id" => "medtop:13000000", "source.rank.opr.min" => "6", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("media.images.width.min", "1200")
q.Set("media.images.height.min", "800")
q.Set("media.images.count", "2")
q.Set("sentiment.overall.polarity", "positive")
q.Set("category.id", "medtop:13000000")
q.Set("source.rank.opr.min", "6")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&media.images.width.min=1200&media.images.height.min=800&media.images.count=2&sentiment.overall.polarity=positive&category.id=medtop:13000000&source.rank.opr.min=6&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&media.images.width.min=1200&media.images.height.min=800&media.images.count=2&sentiment.overall.polarity=positive&category.id=medtop:13000000&source.rank.opr.min=6
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleVideo Content Analysis for Educational Topics
curl "https://api.apitube.io/v1/news/article?id=3036291250&media.videos.count=2&title=education,learning,tutorial&sort.by=media.videos.count&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"media.videos.count": "2",
"title": "education,learning,tutorial",
"sort.by": "media.videos.count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "media.videos.count": "2", "title": "education,learning,tutorial", "sort.by": "media.videos.count", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "media.videos.count" => "2", "title" => "education,learning,tutorial", "sort.by" => "media.videos.count", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("media.videos.count", "2")
q.Set("title", "education,learning,tutorial")
q.Set("sort.by", "media.videos.count")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&media.videos.count=2&title=education,learning,tutorial&sort.by=media.videos.count&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&media.videos.count=2&title=education,learning,tutorial&sort.by=media.videos.count&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for media-rich articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_media_rich=1&category.id=medtop:13000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_media_rich": "1",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_media_rich": "1", "category.id": "medtop:13000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_media_rich" => "1", "category.id" => "medtop:13000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_media_rich", "1")
q.Set("category.id", "medtop:13000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_media_rich=1&category.id=medtop:13000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_media_rich=1&category.id=medtop:13000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for articles with high-quality images
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_hq_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_hq_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_hq_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_hq_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_hq_images", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_hq_images=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_hq_images=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for multimedia-rich content
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&has_video=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_image": "1",
"has_video": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_image": "1", "has_video": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_image" => "1", "has_video" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_image", "1")
q.Set("has_video", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&has_video=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&has_video=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for landscape-oriented images (ideal for headers/banners)
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_landscape_media=1&has_fullhd_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_landscape_media": "1",
"has_fullhd_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_landscape_media": "1", "has_fullhd_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_landscape_media" => "1", "has_fullhd_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_landscape_media", "1")
q.Set("has_fullhd_images", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_landscape_media=1&has_fullhd_images=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_landscape_media=1&has_fullhd_images=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for portrait-oriented images (ideal for mobile)
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_portrait_media=1&has_mobile_optimized_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_portrait_media": "1",
"has_mobile_optimized_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_portrait_media": "1", "has_mobile_optimized_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_portrait_media" => "1", "has_mobile_optimized_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_portrait_media", "1")
q.Set("has_mobile_optimized_images", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_portrait_media=1&has_mobile_optimized_images=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_portrait_media=1&has_mobile_optimized_images=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Instagram-ready content
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_instagram_ready=1&category.id=medtop:08000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_instagram_ready": "1",
"category.id": "medtop:08000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_instagram_ready": "1", "category.id": "medtop:08000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_instagram_ready" => "1", "category.id" => "medtop:08000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_instagram_ready", "1")
q.Set("category.id", "medtop:08000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_instagram_ready=1&category.id=medtop:08000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_instagram_ready=1&category.id=medtop:08000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for Twitter Card optimized content
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_twitter_card_ready=1&has_social_share_image=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_twitter_card_ready": "1",
"has_social_share_image": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_twitter_card_ready": "1", "has_social_share_image": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_twitter_card_ready" => "1", "has_social_share_image" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_twitter_card_ready", "1")
q.Set("has_social_share_image", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_twitter_card_ready=1&has_social_share_image=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_twitter_card_ready=1&has_social_share_image=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for 4K image galleries
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_4k_images=1&has_multiple_images=1&category.id=medtop:01000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_4k_images": "1",
"has_multiple_images": "1",
"category.id": "medtop:01000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_4k_images": "1", "has_multiple_images": "1", "category.id": "medtop:01000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_4k_images" => "1", "has_multiple_images" => "1", "category.id" => "medtop:01000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_4k_images", "1")
q.Set("has_multiple_images", "1")
q.Set("category.id", "medtop:01000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_4k_images=1&has_multiple_images=1&category.id=medtop:01000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_4k_images=1&has_multiple_images=1&category.id=medtop:01000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for consistent visual content (curated galleries)
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_consistent_image_sizes=1&has_multiple_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_consistent_image_sizes": "1",
"has_multiple_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_consistent_image_sizes": "1", "has_multiple_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_consistent_image_sizes" => "1", "has_multiple_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_consistent_image_sizes", "1")
q.Set("has_multiple_images", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_consistent_image_sizes=1&has_multiple_images=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_consistent_image_sizes=1&has_multiple_images=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for mixed media articles (images + videos)
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_mixed_media=1&sort.by=media.images.count&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_mixed_media": "1",
"sort.by": "media.images.count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_mixed_media": "1", "sort.by": "media.images.count", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_mixed_media" => "1", "sort.by" => "media.images.count", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_mixed_media", "1")
q.Set("sort.by", "media.images.count")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_mixed_media=1&sort.by=media.images.count&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_mixed_media=1&sort.by=media.images.count&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleReadability
| Parameter | Type | Required | Description |
|---|---|---|---|
is_difficult_read | boolean | No | Filter for difficult-to-read articles (Flesch Reading Ease < 40). |
is_easy_read | boolean | No | Filter for easy-to-read articles (Flesch Reading Ease >= 60). |
readability.age | integer | No | Exact reading age. Range: 6–22. |
readability.age.max | integer | No | Maximum reading age. Range: 6–22. |
readability.age.min | integer | No | Minimum reading age. Range: 6–22. |
readability.ari | number | No | Exact Automated Readability Index. Range: 0–30. |
readability.ari.max | number | No | Maximum Automated Readability Index. Range: 0–30. |
readability.ari.min | number | No | Minimum Automated Readability Index. Range: 0–30. |
readability.audience | string | No | Target audience. One of: children, general, professional, academic. |
readability.difficulty | string | No | Difficulty level. One of: beginner, intermediate, advanced, expert. |
readability.ease | number | No | Exact Flesch Reading Ease score. Range: 0–100. |
readability.ease.max | number | No | Maximum Flesch Reading Ease score. Range: 0–100. |
readability.ease.min | number | No | Minimum Flesch Reading Ease score. Range: 0–100. |
readability.fk_grade | number | No | Exact Flesch-Kincaid grade level. Range: 0–30. |
readability.fk_grade.max | number | No | Maximum Flesch-Kincaid grade level. Range: 0–30. |
readability.fk_grade.min | number | No | Minimum Flesch-Kincaid grade level. Range: 0–30. |
Read time
| Parameter | Type | Required | Description |
|---|---|---|---|
is_deep_dive | boolean | No | Filter for deep dives (>= 10 minutes). |
is_long_read | boolean | No | Filter for long reads (>= 5 minutes). |
is_medium_read | boolean | No | Filter for medium-length reads (3-7 minutes). |
is_quick_read | boolean | No | Filter for quick reads (<= 2 minutes). |
is_short_read | boolean | No | Filter for short reads (< 3 minutes). |
read_time | integer | No | Exact read time in minutes. Range: 0–1000. |
read_time.max | integer | No | Maximum read time in minutes. Range: 0–1000. |
read_time.min | integer | No | Minimum read time in minutes. Range: 0–1000. |
Geo and local
| Parameter | Type | Required | Description |
|---|---|---|---|
has_location_geo | boolean | No | Filter articles with/without geo-location data. |
location.bbox | string | No | Bounding box: minLat,maxLat,minLng,maxLng. Example: 40.0,41.0,-74.5,-73.5. |
location.lat | number | No | Latitude for radius search. Range: -90–90. |
location.lng | number | No | Longitude for radius search. Range: -180–180. |
location.radius | number | No | Search radius in kilometers (requires location.lat and location.lng). Range: max 20000, > 0. |
location.radius.min | number | No | Minimum distance from point in km. Range: 0–20000. |
Request to get news articles from a specific location (e.g., "Tokyo")
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.name=Tokyo&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.name": "Tokyo",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.name": "Tokyo", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.name" => "Tokyo", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.name", "Tokyo")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.name=Tokyo&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.name=Tokyo
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles from multiple locations (e.g., "London" and "Paris")
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Paris&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.name": "London,Paris",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.name": "London,Paris", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.name" => "London,Paris", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.name", "London,Paris")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Paris&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Paris
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles from a specific location and in a specific language (e.g., "London" and "English") and ignore articles from "Ontario"
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.name=London&language.code=en&ignore.location.name=Ontario&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.name": "London",
"language.code": "en",
"ignore.location.name": "Ontario",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.name": "London", "language.code": "en", "ignore.location.name": "Ontario", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.name" => "London", "language.code" => "en", "ignore.location.name" => "Ontario", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.name", "London")
q.Set("language.code", "en")
q.Set("ignore.location.name", "Ontario")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.name=London&language.code=en&ignore.location.name=Ontario&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.name=London&language.code=en&ignore.location.name=Ontario
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSearch for news within 50 km of Berlin (geo-coordinates)
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.lat=52.52&location.lng=13.40&location.radius=50&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.lat": "52.52",
"location.lng": "13.40",
"location.radius": "50",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.lat": "52.52", "location.lng": "13.40", "location.radius": "50", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.lat" => "52.52", "location.lng" => "13.40", "location.radius" => "50", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.lat", "52.52")
q.Set("location.lng", "13.40")
q.Set("location.radius", "50")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.lat=52.52&location.lng=13.40&location.radius=50&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.lat=52.52&location.lng=13.40&location.radius=50
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleLocal news with positive sentiment (geo-coordinates)
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.lat=40.7128&location.lng=-74.0060&location.radius=25&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.lat": "40.7128",
"location.lng": "-74.0060",
"location.radius": "25",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.lat": "40.7128", "location.lng": "-74.0060", "location.radius": "25", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.lat" => "40.7128", "location.lng" => "-74.0060", "location.radius" => "25", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.lat", "40.7128")
q.Set("location.lng", "-74.0060")
q.Set("location.radius", "25")
q.Set("sentiment.overall.polarity", "positive")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.lat=40.7128&location.lng=-74.0060&location.radius=25&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.lat=40.7128&location.lng=-74.0060&location.radius=25&sentiment.overall.polarity=positive
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRegional breaking news (geo-coordinates)
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.lat=51.5074&location.lng=-0.1278&location.radius=100&is_breaking=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.lat": "51.5074",
"location.lng": "-0.1278",
"location.radius": "100",
"is_breaking": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.lat": "51.5074", "location.lng": "-0.1278", "location.radius": "100", "is_breaking": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.lat" => "51.5074", "location.lng" => "-0.1278", "location.radius" => "100", "is_breaking" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.lat", "51.5074")
q.Set("location.lng", "-0.1278")
q.Set("location.radius", "100")
q.Set("is_breaking", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.lat=51.5074&location.lng=-0.1278&location.radius=100&is_breaking=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.lat=51.5074&location.lng=-0.1278&location.radius=100&is_breaking=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleGeopolitical Event Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.name=France,Italy&category.id=medtop:11000000&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.name": "France,Italy",
"category.id": "medtop:11000000",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.name": "France,Italy", "category.id": "medtop:11000000", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.name" => "France,Italy", "category.id" => "medtop:11000000", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.name", "France,Italy")
q.Set("category.id", "medtop:11000000")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.name=France,Italy&category.id=medtop:11000000&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.name=France,Italy&category.id=medtop:11000000&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMulti-Location Business Impact Study
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Berlin,Paris&category.id=medtop:04000000&organization.name=Google,Microsoft,Amazon&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.name": "London,Berlin,Paris",
"category.id": "medtop:04000000",
"organization.name": "Google,Microsoft,Amazon",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.name": "London,Berlin,Paris", "category.id": "medtop:04000000", "organization.name": "Google,Microsoft,Amazon", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.name" => "London,Berlin,Paris", "category.id" => "medtop:04000000", "organization.name" => "Google,Microsoft,Amazon", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.name", "London,Berlin,Paris")
q.Set("category.id", "medtop:04000000")
q.Set("organization.name", "Google,Microsoft,Amazon")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Berlin,Paris&category.id=medtop:04000000&organization.name=Google,Microsoft,Amazon&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Berlin,Paris&category.id=medtop:04000000&organization.name=Google,Microsoft,Amazon
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleNatural Disaster Coverage Analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.name=Japan,Israel&title=earthquake&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.name": "Japan,Israel",
"title": "earthquake",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.name": "Japan,Israel", "title": "earthquake", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.name" => "Japan,Israel", "title" => "earthquake", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.name", "Japan,Israel")
q.Set("title", "earthquake")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.name=Japan,Israel&title=earthquake&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.name=Japan,Israel&title=earthquake&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleTourism Sentiment Analysis by Location
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Paris,Berlin&sentiment.overall.polarity=positive&sort.by=published_at&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.name": "London,Paris,Berlin",
"sentiment.overall.polarity": "positive",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.name": "London,Paris,Berlin", "sentiment.overall.polarity": "positive", "sort.by": "published_at", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.name" => "London,Paris,Berlin", "sentiment.overall.polarity" => "positive", "sort.by" => "published_at", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.name", "London,Paris,Berlin")
q.Set("sentiment.overall.polarity", "positive")
q.Set("sort.by", "published_at")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Paris,Berlin&sentiment.overall.polarity=positive&sort.by=published_at&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.name=London,Paris,Berlin&sentiment.overall.polarity=positive&sort.by=published_at
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSearch within the bounding box (New York City area)
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=40.4774,40.9176,-74.2591,-73.7004&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.bbox": "40.4774,40.9176,-74.2591,-73.7004",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.bbox": "40.4774,40.9176,-74.2591,-73.7004", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.bbox" => "40.4774,40.9176,-74.2591,-73.7004", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.bbox", "40.4774,40.9176,-74.2591,-73.7004")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=40.4774,40.9176,-74.2591,-73.7004&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=40.4774,40.9176,-74.2591,-73.7004
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBounding box with category filter (tech news in Silicon Valley)
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=37.0,38.0,-123.0,-121.0&category.id=medtop:13000000&published_at.start=2024-01-01&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.bbox": "37.0,38.0,-123.0,-121.0",
"category.id": "medtop:13000000",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.bbox": "37.0,38.0,-123.0,-121.0", "category.id": "medtop:13000000", "published_at.start": "2024-01-01", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.bbox" => "37.0,38.0,-123.0,-121.0", "category.id" => "medtop:13000000", "published_at.start" => "2024-01-01", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.bbox", "37.0,38.0,-123.0,-121.0")
q.Set("category.id", "medtop:13000000")
q.Set("published_at.start", "2024-01-01")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=37.0,38.0,-123.0,-121.0&category.id=medtop:13000000&published_at.start=2024-01-01&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=37.0,38.0,-123.0,-121.0&category.id=medtop:13000000&published_at.start=2024-01-01
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRing search – articles between 100 km and 500 km from Berlin
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.lat=52.52&location.lng=13.40&location.radius.min=100&location.radius=500&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.lat": "52.52",
"location.lng": "13.40",
"location.radius.min": "100",
"location.radius": "500",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.lat": "52.52", "location.lng": "13.40", "location.radius.min": "100", "location.radius": "500", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.lat" => "52.52", "location.lng" => "13.40", "location.radius.min" => "100", "location.radius" => "500", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.lat", "52.52")
q.Set("location.lng", "13.40")
q.Set("location.radius.min", "100")
q.Set("location.radius", "500")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.lat=52.52&location.lng=13.40&location.radius.min=100&location.radius=500&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.lat=52.52&location.lng=13.40&location.radius.min=100&location.radius=500
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleExclude center area - articles more than 50km from Paris
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.lat=48.8566&location.lng=2.3522&location.radius.min=50&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.lat": "48.8566",
"location.lng": "2.3522",
"location.radius.min": "50",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.lat": "48.8566", "location.lng": "2.3522", "location.radius.min": "50", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.lat" => "48.8566", "location.lng" => "2.3522", "location.radius.min" => "50", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.lat", "48.8566")
q.Set("location.lng", "2.3522")
q.Set("location.radius.min", "50")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.lat=48.8566&location.lng=2.3522&location.radius.min=50&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.lat=48.8566&location.lng=2.3522&location.radius.min=50
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleArticles with geographic coordinates only
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_location_geo=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_location_geo": "1",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_location_geo": "1", "category.id": "medtop:11000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_location_geo" => "1", "category.id" => "medtop:11000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_location_geo", "1")
q.Set("category.id", "medtop:11000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_location_geo=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_location_geo=1&category.id=medtop:11000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleArticles without coordinates (text-based location only)
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_location_geo=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_location_geo": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_location_geo": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_location_geo" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_location_geo", "0")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_location_geo=0&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_location_geo=0
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRegional disaster tracking with a bounding box
curl "https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=25.0,35.0,-120.0,-80.0&title=hurricane&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"location.bbox": "25.0,35.0,-120.0,-80.0",
"title": "hurricane",
"published_at.start": "NOW-7DAYS",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "location.bbox": "25.0,35.0,-120.0,-80.0", "title": "hurricane", "published_at.start": "NOW-7DAYS", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "location.bbox" => "25.0,35.0,-120.0,-80.0", "title" => "hurricane", "published_at.start" => "NOW-7DAYS", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("location.bbox", "25.0,35.0,-120.0,-80.0")
q.Set("title", "hurricane")
q.Set("published_at.start", "NOW-7DAYS")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=25.0,35.0,-120.0,-80.0&title=hurricane&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&location.bbox=25.0,35.0,-120.0,-80.0&title=hurricane&published_at.start=NOW-7DAYS
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleArticle flags
| Parameter | Type | Required | Description |
|---|---|---|---|
is_breaking | boolean | No | Filter breaking news articles. |
is_duplicate | boolean | No | Filter duplicate/unique articles. |
is_high_quality | boolean | No | Filter high-quality articles (not duplicate, rank >= 5, has images, has author). |
is_paywall | boolean | No | Filter paywalled articles. |
Get easy-to-read articles for the general audience
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_easy_read=1&readability.audience=general&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_easy_read": "1",
"readability.audience": "general",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_easy_read": "1", "readability.audience": "general", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_easy_read" => "1", "readability.audience" => "general", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_easy_read", "1")
q.Set("readability.audience", "general")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_easy_read=1&readability.audience=general&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_easy_read=1&readability.audience=general
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleGet beginner-level content about technology
curl "https://api.apitube.io/v1/news/article?id=3036291250&readability.difficulty=beginner&topic.id=industry.technology_news&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"readability.difficulty": "beginner",
"topic.id": "industry.technology_news",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "readability.difficulty": "beginner", "topic.id": "industry.technology_news", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "readability.difficulty" => "beginner", "topic.id" => "industry.technology_news", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("readability.difficulty", "beginner")
q.Set("topic.id", "industry.technology_news")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&readability.difficulty=beginner&topic.id=industry.technology_news&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&readability.difficulty=beginner&topic.id=industry.technology_news
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleGet articles suitable for teenagers (age 12–16)
curl "https://api.apitube.io/v1/news/article?id=3036291250&readability.age.min=12&readability.age.max=16&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"readability.age.min": "12",
"readability.age.max": "16",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "readability.age.min": "12", "readability.age.max": "16", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "readability.age.min" => "12", "readability.age.max" => "16", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("readability.age.min", "12")
q.Set("readability.age.max", "16")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&readability.age.min=12&readability.age.max=16&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&readability.age.min=12&readability.age.max=16
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleGet professional-level business news
curl "https://api.apitube.io/v1/news/article?id=3036291250&readability.audience=professional&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"readability.audience": "professional",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "readability.audience": "professional", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "readability.audience" => "professional", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("readability.audience", "professional")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&readability.audience=professional&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&readability.audience=professional&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleGet highly readable content (FRE 70–90) for content curation
curl "https://api.apitube.io/v1/news/article?id=3036291250&readability.ease.min=70&readability.ease.max=90&is_duplicate=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"readability.ease.min": "70",
"readability.ease.max": "90",
"is_duplicate": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "readability.ease.min": "70", "readability.ease.max": "90", "is_duplicate": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "readability.ease.min" => "70", "readability.ease.max" => "90", "is_duplicate" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("readability.ease.min", "70")
q.Set("readability.ease.max", "90")
q.Set("is_duplicate", "0")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&readability.ease.min=70&readability.ease.max=90&is_duplicate=0&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&readability.ease.min=70&readability.ease.max=90&is_duplicate=0
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleGet academic-level articles about science
curl "https://api.apitube.io/v1/news/article?id=3036291250&readability.difficulty=expert&readability.audience=academic&category.id=medtop:13000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"readability.difficulty": "expert",
"readability.audience": "academic",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "readability.difficulty": "expert", "readability.audience": "academic", "category.id": "medtop:13000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "readability.difficulty" => "expert", "readability.audience" => "academic", "category.id" => "medtop:13000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("readability.difficulty", "expert")
q.Set("readability.audience", "academic")
q.Set("category.id", "medtop:13000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&readability.difficulty=expert&readability.audience=academic&category.id=medtop:13000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&readability.difficulty=expert&readability.audience=academic&category.id=medtop:13000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCombine with grade level for educational content
curl "https://api.apitube.io/v1/news/article?id=3036291250&readability.fk_grade.min=8&readability.fk_grade.max=12&category.id=medtop:13000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"readability.fk_grade.min": "8",
"readability.fk_grade.max": "12",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "readability.fk_grade.min": "8", "readability.fk_grade.max": "12", "category.id": "medtop:13000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "readability.fk_grade.min" => "8", "readability.fk_grade.max" => "12", "category.id" => "medtop:13000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("readability.fk_grade.min", "8")
q.Set("readability.fk_grade.max", "12")
q.Set("category.id", "medtop:13000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&readability.fk_grade.min=8&readability.fk_grade.max=12&category.id=medtop:13000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&readability.fk_grade.min=8&readability.fk_grade.max=12&category.id=medtop:13000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleHigh-Quality Content Filtering
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_duplicate=0&is_paywall=0&source.rank.opr.min=6&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_duplicate": "0",
"is_paywall": "0",
"source.rank.opr.min": "6",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_duplicate": "0", "is_paywall": "0", "source.rank.opr.min": "6", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_duplicate" => "0", "is_paywall" => "0", "source.rank.opr.min" => "6", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_duplicate", "0")
q.Set("is_paywall", "0")
q.Set("source.rank.opr.min", "6")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_duplicate=0&is_paywall=0&source.rank.opr.min=6&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_duplicate=0&is_paywall=0&source.rank.opr.min=6&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for long-read articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_long_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_long_read": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_long_read": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_long_read" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_long_read", "1")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_long_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_long_read=1&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for quick-read articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_short_read=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_short_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_short_read": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_short_read" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_short_read", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_short_read=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_short_read=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for quick news briefs (≤2 minutes)
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_quick_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_quick_read": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_quick_read": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_quick_read" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_quick_read", "1")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_quick_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_quick_read=1&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for standard-length articles (3-7 minutes)
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_medium_read=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_medium_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_medium_read": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_medium_read" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_medium_read", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_medium_read=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_medium_read=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for in-depth analysis articles (≥10 minutes)
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_deep_dive=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_deep_dive": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_deep_dive": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_deep_dive" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_deep_dive", "1")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_deep_dive=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_deep_dive=1&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for high-quality curated content
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_high_quality=1&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_high_quality": "1",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_high_quality": "1", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_high_quality" => "1", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_high_quality", "1")
q.Set("language.code", "en")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_high_quality=1&language.code=en&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_high_quality=1&language.code=en
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest for media-rich articles sorted by media content
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&sort.by=media_richness&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_image": "1",
"sort.by": "media_richness",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_image": "1", "sort.by": "media_richness", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_image" => "1", "sort.by" => "media_richness", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_image", "1")
q.Set("sort.by", "media_richness")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&sort.by=media_richness&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&sort.by=media_richness&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleOnly Breaking News Monitoring
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_breaking": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_breaking": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_breaking" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_breaking", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSorting
| Parameter | Type | Required | Description |
|---|---|---|---|
sort.by | string | No | Field to sort results by. One of: published_at, relevance, engagement, quality, controversy, trust, id, new, created_at, source.rank.opr, sentiment.overall.score, sentiment.title.score and 18 more. Default: published_at. |
sort.order | string | No | Sort order. One of: asc, desc. Default: desc. |
Request to get news articles sorted by the published date in ascending order
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get news articles sorted by the overall sentiment magnitude in descending order
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get the most viral/engaging articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "engagement",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "engagement", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "engagement", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "engagement")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=engagement&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get engaging breaking news with media
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&media.images.count.min=2&sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_breaking": "1",
"media.images.count.min": "2",
"sort.by": "engagement",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_breaking": "1", "media.images.count.min": "2", "sort.by": "engagement", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_breaking" => "1", "media.images.count.min" => "2", "sort.by" => "engagement", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_breaking", "1")
q.Set("media.images.count.min", "2")
q.Set("sort.by", "engagement")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&media.images.count.min=2&sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&media.images.count.min=2&sort.by=engagement&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get the most media-rich articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=media_richness&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "media_richness",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "media_richness", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "media_richness", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "media_richness")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=media_richness&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=media_richness&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get articles from high-ranking sources sorted by source rank
curl "https://api.apitube.io/v1/news/article?id=3036291250&source.rank.opr.min=5&sort.by=source.rank.opr&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"source.rank.opr.min": "5",
"sort.by": "source.rank.opr",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "source.rank.opr.min": "5", "sort.by": "source.rank.opr", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "source.rank.opr.min" => "5", "sort.by" => "source.rank.opr", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("source.rank.opr.min", "5")
q.Set("sort.by", "source.rank.opr")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&source.rank.opr.min=5&sort.by=source.rank.opr&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&source.rank.opr.min=5&sort.by=source.rank.opr&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get quick-read articles sorted by read time
curl "https://api.apitube.io/v1/news/article?id=3036291250&read_time.max=5&sort.by=read_time&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"read_time.max": "5",
"sort.by": "read_time",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "read_time.max": "5", "sort.by": "read_time", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "read_time.max" => "5", "sort.by" => "read_time", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("read_time.max", "5")
q.Set("sort.by", "read_time")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&read_time.max=5&sort.by=read_time&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&read_time.max=5&sort.by=read_time&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get high-quality visual content sorted by image dimensions
curl "https://api.apitube.io/v1/news/article?id=3036291250&media.images.count.min=3&sort.by=media.images.width.max&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"media.images.count.min": "3",
"sort.by": "media.images.width.max",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "media.images.count.min": "3", "sort.by": "media.images.width.max", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "media.images.count.min" => "3", "sort.by" => "media.images.width.max", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("media.images.count.min", "3")
q.Set("sort.by", "media.images.width.max")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&media.images.count.min=3&sort.by=media.images.width.max&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&media.images.count.min=3&sort.by=media.images.width.max&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMulti-dimensional Content Ranking
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:13000000&source.rank.opr.min=6&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:13000000",
"source.rank.opr.min": "6",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:13000000", "source.rank.opr.min": "6", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:13000000", "source.rank.opr.min" => "6", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:13000000")
q.Set("source.rank.opr.min", "6")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:13000000&source.rank.opr.min=6&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:13000000&source.rank.opr.min=6&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMedia-Rich Content Prioritization
curl "https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=2&media.videos.count=1&sort.by=media.images.count&sort.order=desc&category.id=medtop:13000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"media.images.count": "2",
"media.videos.count": "1",
"sort.by": "media.images.count",
"sort.order": "desc",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "media.images.count": "2", "media.videos.count": "1", "sort.by": "media.images.count", "sort.order": "desc", "category.id": "medtop:13000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "media.images.count" => "2", "media.videos.count" => "1", "sort.by" => "media.images.count", "sort.order" => "desc", "category.id" => "medtop:13000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("media.images.count", "2")
q.Set("media.videos.count", "1")
q.Set("sort.by", "media.images.count")
q.Set("sort.order", "desc")
q.Set("category.id", "medtop:13000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=2&media.videos.count=1&sort.by=media.images.count&sort.order=desc&category.id=medtop:13000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&media.images.count=2&media.videos.count=1&sort.by=media.images.count&sort.order=desc&category.id=medtop:13000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleIn-Depth Analysis Articles
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&sort.by=paragraphs_count&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:04000000",
"sort.by": "paragraphs_count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:04000000", "sort.by": "paragraphs_count", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:04000000", "sort.by" => "paragraphs_count", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:04000000")
q.Set("sort.by", "paragraphs_count")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&sort.by=paragraphs_count&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&sort.by=paragraphs_count&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSentiment-Based Content Discovery
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&sort.by=sentiment.title.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.ai_news",
"sort.by": "sentiment.title.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.ai_news", "sort.by": "sentiment.title.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.ai_news", "sort.by" => "sentiment.title.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.ai_news")
q.Set("sort.by", "sentiment.title.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&sort.by=sentiment.title.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&sort.by=sentiment.title.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleHigh-Quality Long-Form Content
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=quality&sort.order=desc&is_long_read=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "quality",
"sort.order": "desc",
"is_long_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "quality", "sort.order": "desc", "is_long_read": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "quality", "sort.order" => "desc", "is_long_read" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "quality")
q.Set("sort.order", "desc")
q.Set("is_long_read", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=quality&sort.order=desc&is_long_read=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=quality&sort.order=desc&is_long_read=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleControversial/Polarizing Topics
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=controversy&sort.order=desc&category.id=medtop:11000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "controversy",
"sort.order": "desc",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "controversy", "sort.order": "desc", "category.id": "medtop:11000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "controversy", "sort.order" => "desc", "category.id" => "medtop:11000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "controversy")
q.Set("sort.order", "desc")
q.Set("category.id", "medtop:11000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=controversy&sort.order=desc&category.id=medtop:11000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=controversy&sort.order=desc&category.id=medtop:11000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMost Trustworthy News Sources
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=trust&sort.order=desc&published_at.start=2024-01-01&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "trust",
"sort.order": "desc",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "trust", "sort.order": "desc", "published_at.start": "2024-01-01", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "trust", "sort.order" => "desc", "published_at.start" => "2024-01-01", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "trust")
q.Set("sort.order", "desc")
q.Set("published_at.start", "2024-01-01")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=trust&sort.order=desc&published_at.start=2024-01-01&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=trust&sort.order=desc&published_at.start=2024-01-01
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCombining Quality with Editorial Filters
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=quality&source.rank.opr.min=5&is_duplicate=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "quality",
"source.rank.opr.min": "5",
"is_duplicate": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "quality", "source.rank.opr.min": "5", "is_duplicate": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "quality", "source.rank.opr.min" => "5", "is_duplicate" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "quality")
q.Set("source.rank.opr.min", "5")
q.Set("is_duplicate", "0")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=quality&source.rank.opr.min=5&is_duplicate=0&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=quality&source.rank.opr.min=5&is_duplicate=0
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleViral Content for Social Media
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=engagement&published_at.start=2024-01-01&media.images.count.min=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "engagement",
"published_at.start": "2024-01-01",
"media.images.count.min": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "engagement", "published_at.start": "2024-01-01", "media.images.count.min": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "engagement", "published_at.start" => "2024-01-01", "media.images.count.min" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "engagement")
q.Set("published_at.start", "2024-01-01")
q.Set("media.images.count.min", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=engagement&published_at.start=2024-01-01&media.images.count.min=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=engagement&published_at.start=2024-01-01&media.images.count.min=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCredible Sources for Research
curl "https://api.apitube.io/v1/news/article?id=3036291250&sort.by=trust&source.rank.opr.min=6&sentiment.overall.polarity=neutral&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"sort.by": "trust",
"source.rank.opr.min": "6",
"sentiment.overall.polarity": "neutral",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "sort.by": "trust", "source.rank.opr.min": "6", "sentiment.overall.polarity": "neutral", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "sort.by" => "trust", "source.rank.opr.min" => "6", "sentiment.overall.polarity" => "neutral", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("sort.by", "trust")
q.Set("source.rank.opr.min", "6")
q.Set("sentiment.overall.polarity", "neutral")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&sort.by=trust&source.rank.opr.min=6&sentiment.overall.polarity=neutral&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&sort.by=trust&source.rank.opr.min=6&sentiment.overall.polarity=neutral
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articlePagination
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination. Range: min 1. Default: 1. |
per_page | integer | No | Number of results per page (max 250; the Free plan is capped at 10 and Starter at 50). Range: 1–250. Default: 100. |
Request to get news articles with pagination
curl "https://api.apitube.io/v1/news/article?id=3036291250&per_page=10&page=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"per_page": "10",
"page": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "per_page": "10", "page": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "per_page" => "10", "page" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("per_page", "10")
q.Set("page", "1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&per_page=10&page=1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&per_page=10&page=1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleEfficient Large Dataset Retrieval
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:13000000&per_page=100&page=1&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:13000000",
"per_page": "100",
"page": "1",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:13000000", "per_page": "100", "page": "1", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:13000000", "per_page" => "100", "page" => "1", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:13000000")
q.Set("per_page", "100")
q.Set("page", "1")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:13000000&per_page=100&page=1&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:13000000&per_page=100&page=1&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articlePaginated Multi-criteria Search
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Amazon&sentiment.overall.polarity=positive&per_page=25&page=3&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Amazon",
"sentiment.overall.polarity": "positive",
"per_page": "25",
"page": "3",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Amazon", "sentiment.overall.polarity": "positive", "per_page": "25", "page": "3", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Amazon", "sentiment.overall.polarity" => "positive", "per_page" => "25", "page" => "3", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Amazon")
q.Set("sentiment.overall.polarity", "positive")
q.Set("per_page", "25")
q.Set("page", "3")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Amazon&sentiment.overall.polarity=positive&per_page=25&page=3&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Amazon&sentiment.overall.polarity=positive&per_page=25&page=3&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting
| Parameter | Type | Required | Description |
|---|---|---|---|
facet | string | No | Enable faceting. One of: 0, 1. |
facet.field | string | No | Comma-separated facet fields (max 5). Values: source.id, source.country.id, source.bias, language.id, author.id, category.id, topic.id, industry.id, entity.id, sentiment.overall.polarity, sentiment.title.polarity, sentiment.body.polarity, sentiment.strength, is_duplicate, is_free, is_important, media.images.count, media.videos.count, read_time, content.length, published.year, published.month, published.day_of_week, published.hour, published.weekday, published.time_of_day. Example: source.id,category.id. |
facet.limit | integer | No | Maximum number of facet values per field (max 100). Range: 1–100. Default: 10. |
facet.mincount | integer | No | Minimum count for a facet value to be included. Range: min 1. Default: 1. |
facet.range | string | No | Enable range faceting. One of: 0, 1. |
facet.range.end | string | No | End value for range faceting (required with facet.range). |
facet.range.field | string | No | Field for range faceting. Values: published_at, sentiment.overall.score, sentiment.title.score, sentiment.body.score, read_time, source.rank.opr, media.images.count, media.videos.count. |
facet.range.gap | string | No | Gap value for range faceting. Default: +1DAY. |
facet.range.start | string | No | Start value for range faceting (required with facet.range). |
Basic faceting by source
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "source.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "source.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "source.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "source.id")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting with multiple fields
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id,language.id,sentiment.overall.polarity&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "source.id,language.id,sentiment.overall.polarity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "source.id,language.id,sentiment.overall.polarity", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "source.id,language.id,sentiment.overall.polarity", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "source.id,language.id,sentiment.overall.polarity")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id,language.id,sentiment.overall.polarity&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id,language.id,sentiment.overall.polarity
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting with custom limit
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id&facet.limit=20&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "source.id",
"facet.limit": "20",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "source.id", "facet.limit": "20", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "source.id", "facet.limit" => "20", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "source.id")
q.Set("facet.limit", "20")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id&facet.limit=20&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.id&facet.limit=20
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting with minimum count filter
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=category.id&facet.mincount=10&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "category.id",
"facet.mincount": "10",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "category.id", "facet.mincount": "10", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "category.id", "facet.mincount" => "10", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "category.id")
q.Set("facet.mincount", "10")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=category.id&facet.mincount=10&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=category.id&facet.mincount=10
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting combined with search filters
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&facet=true&facet.field=source.id,sentiment.overall.polarity&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "bitcoin",
"facet": "true",
"facet.field": "source.id,sentiment.overall.polarity",
"published_at.start": "NOW-7DAYS",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "bitcoin", "facet": "true", "facet.field": "source.id,sentiment.overall.polarity", "published_at.start": "NOW-7DAYS", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "bitcoin", "facet" => "true", "facet.field" => "source.id,sentiment.overall.polarity", "published_at.start" => "NOW-7DAYS", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "bitcoin")
q.Set("facet", "true")
q.Set("facet.field", "source.id,sentiment.overall.polarity")
q.Set("published_at.start", "NOW-7DAYS")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&facet=true&facet.field=source.id,sentiment.overall.polarity&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&facet=true&facet.field=source.id,sentiment.overall.polarity&published_at.start=NOW-7DAYS
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting for language distribution analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=language.id,source.country.id&facet.limit=15&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Tesla",
"facet": "true",
"facet.field": "language.id,source.country.id",
"facet.limit": "15",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Tesla", "facet": "true", "facet.field": "language.id,source.country.id", "facet.limit": "15", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Tesla", "facet" => "true", "facet.field" => "language.id,source.country.id", "facet.limit" => "15", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Tesla")
q.Set("facet", "true")
q.Set("facet.field", "language.id,source.country.id")
q.Set("facet.limit", "15")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=language.id,source.country.id&facet.limit=15&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=language.id,source.country.id&facet.limit=15
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting for sentiment analysis by source
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&facet=true&facet.field=source.id,sentiment.overall.polarity&facet.limit=10&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:04000000",
"facet": "true",
"facet.field": "source.id,sentiment.overall.polarity",
"facet.limit": "10",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:04000000", "facet": "true", "facet.field": "source.id,sentiment.overall.polarity", "facet.limit": "10", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:04000000", "facet" => "true", "facet.field" => "source.id,sentiment.overall.polarity", "facet.limit" => "10", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:04000000")
q.Set("facet", "true")
q.Set("facet.field", "source.id,sentiment.overall.polarity")
q.Set("facet.limit", "10")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&facet=true&facet.field=source.id,sentiment.overall.polarity&facet.limit=10&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&facet=true&facet.field=source.id,sentiment.overall.polarity&facet.limit=10
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting for media bias distribution
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&facet=true&facet.field=source.bias,source.country.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.green_energy_news",
"facet": "true",
"facet.field": "source.bias,source.country.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.green_energy_news", "facet": "true", "facet.field": "source.bias,source.country.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.green_energy_news", "facet" => "true", "facet.field" => "source.bias,source.country.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.green_energy_news")
q.Set("facet", "true")
q.Set("facet.field", "source.bias,source.country.id")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&facet=true&facet.field=source.bias,source.country.id&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.green_energy_news&facet=true&facet.field=source.bias,source.country.id
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleFaceting for category distribution in top headlines
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=category.id,language.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "category.id,language.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "category.id,language.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "category.id,language.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "category.id,language.id")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=category.id,language.id&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=category.id,language.id
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBuilding a filtered navigation
This example shows how to use facets to build a filter sidebar for your news application:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=AI&facet=true&facet.field=source.id,category.id,language.id,sentiment.overall.polarity&facet.limit=10&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "AI",
"facet": "true",
"facet.field": "source.id,category.id,language.id,sentiment.overall.polarity",
"facet.limit": "10",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "AI", "facet": "true", "facet.field": "source.id,category.id,language.id,sentiment.overall.polarity", "facet.limit": "10", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "AI", "facet" => "true", "facet.field" => "source.id,category.id,language.id,sentiment.overall.polarity", "facet.limit" => "10", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "AI")
q.Set("facet", "true")
q.Set("facet.field", "source.id,category.id,language.id,sentiment.overall.polarity")
q.Set("facet.limit", "10")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=AI&facet=true&facet.field=source.id,category.id,language.id,sentiment.overall.polarity&facet.limit=10&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=AI&facet=true&facet.field=source.id,category.id,language.id,sentiment.overall.polarity&facet.limit=10
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleTemporal analysis – articles by hour of day
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.hour&published_at.start=2024-01-01&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "published.hour",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "published.hour", "published_at.start": "2024-01-01", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "published.hour", "published_at.start" => "2024-01-01", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "published.hour")
q.Set("published_at.start", "2024-01-01")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.hour&published_at.start=2024-01-01&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.hour&published_at.start=2024-01-01
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleTemporal analysis – articles by day of week
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.day_of_week&category.id=medtop:15000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "published.day_of_week",
"category.id": "medtop:15000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "published.day_of_week", "category.id": "medtop:15000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "published.day_of_week", "category.id" => "medtop:15000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "published.day_of_week")
q.Set("category.id", "medtop:15000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.day_of_week&category.id=medtop:15000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.day_of_week&category.id=medtop:15000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMedia richness analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=media.images.count,media.videos.count&category.id=medtop:13000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "media.images.count,media.videos.count",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "media.images.count,media.videos.count", "category.id": "medtop:13000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "media.images.count,media.videos.count", "category.id" => "medtop:13000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "media.images.count,media.videos.count")
q.Set("category.id", "medtop:13000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=media.images.count,media.videos.count&category.id=medtop:13000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=media.images.count,media.videos.count&category.id=medtop:13000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSource quality distribution
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.rank.opr,is_duplicate&published_at.start=2024-01-01&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "source.rank.opr,is_duplicate",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "source.rank.opr,is_duplicate", "published_at.start": "2024-01-01", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "source.rank.opr,is_duplicate", "published_at.start" => "2024-01-01", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "source.rank.opr,is_duplicate")
q.Set("published_at.start", "2024-01-01")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.rank.opr,is_duplicate&published_at.start=2024-01-01&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=source.rank.opr,is_duplicate&published_at.start=2024-01-01
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBreaking news distribution by hour
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet=true&facet.field=published.hour,category.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_breaking": "1",
"facet": "true",
"facet.field": "published.hour,category.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_breaking": "1", "facet": "true", "facet.field": "published.hour,category.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_breaking" => "1", "facet" => "true", "facet.field" => "published.hour,category.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_breaking", "1")
q.Set("facet", "true")
q.Set("facet.field", "published.hour,category.id")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet=true&facet.field=published.hour,category.id&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet=true&facet.field=published.hour,category.id
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleContent length analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=read_time&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "read_time",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "read_time", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "read_time", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "read_time")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=read_time&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=read_time&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMulti-sentiment analysis across content parts
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=sentiment.overall.polarity,sentiment.title.polarity,sentiment.body.polarity&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Tesla",
"facet": "true",
"facet.field": "sentiment.overall.polarity,sentiment.title.polarity,sentiment.body.polarity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Tesla", "facet": "true", "facet.field": "sentiment.overall.polarity,sentiment.title.polarity,sentiment.body.polarity", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Tesla", "facet" => "true", "facet.field" => "sentiment.overall.polarity,sentiment.title.polarity,sentiment.body.polarity", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Tesla")
q.Set("facet", "true")
q.Set("facet.field", "sentiment.overall.polarity,sentiment.title.polarity,sentiment.body.polarity")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=sentiment.overall.polarity,sentiment.title.polarity,sentiment.body.polarity&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=sentiment.overall.polarity,sentiment.title.polarity,sentiment.body.polarity
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleYearly trend analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&facet=true&facet.field=published.year,published.month&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.ai_news",
"facet": "true",
"facet.field": "published.year,published.month",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.ai_news", "facet": "true", "facet.field": "published.year,published.month", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.ai_news", "facet" => "true", "facet.field" => "published.year,published.month", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.ai_news")
q.Set("facet", "true")
q.Set("facet.field", "published.year,published.month")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&facet=true&facet.field=published.year,published.month&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&facet=true&facet.field=published.year,published.month
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleContent length distribution
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=content.length&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "content.length",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "content.length", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "content.length", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "content.length")
q.Set("category.id", "medtop:04000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=content.length&category.id=medtop:04000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=content.length&category.id=medtop:04000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleWeekday vs weekend publishing patterns
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.weekday,published.time_of_day&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "published.weekday,published.time_of_day",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "published.weekday,published.time_of_day", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "published.weekday,published.time_of_day", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "published.weekday,published.time_of_day")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.weekday,published.time_of_day&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=published.weekday,published.time_of_day
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSentiment strength analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=sentiment.strength,sentiment.overall.polarity&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Tesla",
"facet": "true",
"facet.field": "sentiment.strength,sentiment.overall.polarity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Tesla", "facet": "true", "facet.field": "sentiment.strength,sentiment.overall.polarity", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Tesla", "facet" => "true", "facet.field" => "sentiment.strength,sentiment.overall.polarity", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Tesla")
q.Set("facet", "true")
q.Set("facet.field", "sentiment.strength,sentiment.overall.polarity")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=sentiment.strength,sentiment.overall.polarity&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet=true&facet.field=sentiment.strength,sentiment.overall.polarity
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMost mentioned entities
curl "https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=entity.id&facet.limit=20&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"facet": "true",
"facet.field": "entity.id",
"facet.limit": "20",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "facet": "true", "facet.field": "entity.id", "facet.limit": "20", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "facet" => "true", "facet.field" => "entity.id", "facet.limit" => "20", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("facet", "true")
q.Set("facet.field", "entity.id")
q.Set("facet.limit", "20")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=entity.id&facet.limit=20&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&facet=true&facet.field=entity.id&facet.limit=20
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleTime of day publishing analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet=true&facet.field=published.time_of_day,published.weekday&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_breaking": "1",
"facet": "true",
"facet.field": "published.time_of_day,published.weekday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_breaking": "1", "facet": "true", "facet.field": "published.time_of_day,published.weekday", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_breaking" => "1", "facet" => "true", "facet.field" => "published.time_of_day,published.weekday", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_breaking", "1")
q.Set("facet", "true")
q.Set("facet.field", "published.time_of_day,published.weekday")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet=true&facet.field=published.time_of_day,published.weekday&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet=true&facet.field=published.time_of_day,published.weekday
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleDate range faceting - articles per week
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-03-01&facet.range.gap=1WEEK&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "bitcoin",
"facet.range": "true",
"facet.range.field": "published_at",
"facet.range.start": "2024-01-01",
"facet.range.end": "2024-03-01",
"facet.range.gap": "1WEEK",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "bitcoin", "facet.range": "true", "facet.range.field": "published_at", "facet.range.start": "2024-01-01", "facet.range.end": "2024-03-01", "facet.range.gap": "1WEEK", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "bitcoin", "facet.range" => "true", "facet.range.field" => "published_at", "facet.range.start" => "2024-01-01", "facet.range.end" => "2024-03-01", "facet.range.gap" => "1WEEK", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "bitcoin")
q.Set("facet.range", "true")
q.Set("facet.range.field", "published_at")
q.Set("facet.range.start", "2024-01-01")
q.Set("facet.range.end", "2024-03-01")
q.Set("facet.range.gap", "1WEEK")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-03-01&facet.range.gap=1WEEK&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-03-01&facet.range.gap=1WEEK
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleDate range faceting – articles per day
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-01-31&facet.range.gap=1DAY&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Tesla",
"facet.range": "true",
"facet.range.field": "published_at",
"facet.range.start": "2024-01-01",
"facet.range.end": "2024-01-31",
"facet.range.gap": "1DAY",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Tesla", "facet.range": "true", "facet.range.field": "published_at", "facet.range.start": "2024-01-01", "facet.range.end": "2024-01-31", "facet.range.gap": "1DAY", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Tesla", "facet.range" => "true", "facet.range.field" => "published_at", "facet.range.start" => "2024-01-01", "facet.range.end" => "2024-01-31", "facet.range.gap" => "1DAY", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Tesla")
q.Set("facet.range", "true")
q.Set("facet.range.field", "published_at")
q.Set("facet.range.start", "2024-01-01")
q.Set("facet.range.end", "2024-01-31")
q.Set("facet.range.gap", "1DAY")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-01-31&facet.range.gap=1DAY&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-01-31&facet.range.gap=1DAY
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleDate range faceting - hourly distribution
curl "https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-15&facet.range.end=2024-01-16&facet.range.gap=1HOUR&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"is_breaking": "1",
"facet.range": "true",
"facet.range.field": "published_at",
"facet.range.start": "2024-01-15",
"facet.range.end": "2024-01-16",
"facet.range.gap": "1HOUR",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "is_breaking": "1", "facet.range": "true", "facet.range.field": "published_at", "facet.range.start": "2024-01-15", "facet.range.end": "2024-01-16", "facet.range.gap": "1HOUR", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "is_breaking" => "1", "facet.range" => "true", "facet.range.field" => "published_at", "facet.range.start" => "2024-01-15", "facet.range.end" => "2024-01-16", "facet.range.gap" => "1HOUR", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("is_breaking", "1")
q.Set("facet.range", "true")
q.Set("facet.range.field", "published_at")
q.Set("facet.range.start", "2024-01-15")
q.Set("facet.range.end", "2024-01-16")
q.Set("facet.range.gap", "1HOUR")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-15&facet.range.end=2024-01-16&facet.range.gap=1HOUR&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&is_breaking=1&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-15&facet.range.end=2024-01-16&facet.range.gap=1HOUR
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSentiment distribution analysis
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Apple&facet.range=true&facet.range.field=sentiment.overall.score&facet.range.start=-1&facet.range.end=1&facet.range.gap=0.25&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Apple",
"facet.range": "true",
"facet.range.field": "sentiment.overall.score",
"facet.range.start": "-1",
"facet.range.end": "1",
"facet.range.gap": "0.25",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Apple", "facet.range": "true", "facet.range.field": "sentiment.overall.score", "facet.range.start": "-1", "facet.range.end": "1", "facet.range.gap": "0.25", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Apple", "facet.range" => "true", "facet.range.field" => "sentiment.overall.score", "facet.range.start" => "-1", "facet.range.end" => "1", "facet.range.gap" => "0.25", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Apple")
q.Set("facet.range", "true")
q.Set("facet.range.field", "sentiment.overall.score")
q.Set("facet.range.start", "-1")
q.Set("facet.range.end", "1")
q.Set("facet.range.gap", "0.25")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Apple&facet.range=true&facet.range.field=sentiment.overall.score&facet.range.start=-1&facet.range.end=1&facet.range.gap=0.25&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Apple&facet.range=true&facet.range.field=sentiment.overall.score&facet.range.start=-1&facet.range.end=1&facet.range.gap=0.25
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleReading time distribution
curl "https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&facet.range=true&facet.range.field=read_time&facet.range.start=0&facet.range.end=30&facet.range.gap=5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"category.id": "medtop:04000000",
"facet.range": "true",
"facet.range.field": "read_time",
"facet.range.start": "0",
"facet.range.end": "30",
"facet.range.gap": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "category.id": "medtop:04000000", "facet.range": "true", "facet.range.field": "read_time", "facet.range.start": "0", "facet.range.end": "30", "facet.range.gap": "5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "category.id" => "medtop:04000000", "facet.range" => "true", "facet.range.field" => "read_time", "facet.range.start" => "0", "facet.range.end" => "30", "facet.range.gap" => "5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("category.id", "medtop:04000000")
q.Set("facet.range", "true")
q.Set("facet.range.field", "read_time")
q.Set("facet.range.start", "0")
q.Set("facet.range.end", "30")
q.Set("facet.range.gap", "5")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&facet.range=true&facet.range.field=read_time&facet.range.start=0&facet.range.end=30&facet.range.gap=5&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&category.id=medtop:04000000&facet.range=true&facet.range.field=read_time&facet.range.start=0&facet.range.end=30&facet.range.gap=5
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSource quality distribution
curl "https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&facet.range=true&facet.range.field=source.rank.opr&facet.range.start=0.1&facet.range.end=0.9&facet.range.gap=0.1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"topic.id": "industry.ai_news",
"facet.range": "true",
"facet.range.field": "source.rank.opr",
"facet.range.start": "0.1",
"facet.range.end": "0.9",
"facet.range.gap": "0.1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "topic.id": "industry.ai_news", "facet.range": "true", "facet.range.field": "source.rank.opr", "facet.range.start": "0.1", "facet.range.end": "0.9", "facet.range.gap": "0.1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "topic.id" => "industry.ai_news", "facet.range" => "true", "facet.range.field" => "source.rank.opr", "facet.range.start" => "0.1", "facet.range.end" => "0.9", "facet.range.gap" => "0.1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("topic.id", "industry.ai_news")
q.Set("facet.range", "true")
q.Set("facet.range.field", "source.rank.opr")
q.Set("facet.range.start", "0.1")
q.Set("facet.range.end", "0.9")
q.Set("facet.range.gap", "0.1")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&facet.range=true&facet.range.field=source.rank.opr&facet.range.start=0.1&facet.range.end=0.9&facet.range.gap=0.1&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&topic.id=industry.ai_news&facet.range=true&facet.range.field=source.rank.opr&facet.range.start=0.1&facet.range.end=0.9&facet.range.gap=0.1
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCombined regular and range faceting
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=climate&facet=true&facet.field=source.country.id,language.id&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-06-01&facet.range.gap=1MONTH&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "climate",
"facet": "true",
"facet.field": "source.country.id,language.id",
"facet.range": "true",
"facet.range.field": "published_at",
"facet.range.start": "2024-01-01",
"facet.range.end": "2024-06-01",
"facet.range.gap": "1MONTH",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "climate", "facet": "true", "facet.field": "source.country.id,language.id", "facet.range": "true", "facet.range.field": "published_at", "facet.range.start": "2024-01-01", "facet.range.end": "2024-06-01", "facet.range.gap": "1MONTH", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "climate", "facet" => "true", "facet.field" => "source.country.id,language.id", "facet.range" => "true", "facet.range.field" => "published_at", "facet.range.start" => "2024-01-01", "facet.range.end" => "2024-06-01", "facet.range.gap" => "1MONTH", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "climate")
q.Set("facet", "true")
q.Set("facet.field", "source.country.id,language.id")
q.Set("facet.range", "true")
q.Set("facet.range.field", "published_at")
q.Set("facet.range.start", "2024-01-01")
q.Set("facet.range.end", "2024-06-01")
q.Set("facet.range.gap", "1MONTH")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=climate&facet=true&facet.field=source.country.id,language.id&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-06-01&facet.range.gap=1MONTH&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=climate&facet=true&facet.field=source.country.id,language.id&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-06-01&facet.range.gap=1MONTH
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMedia richness timeline
curl "https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&facet.range=true&facet.range.field=media.images.count&facet.range.start=1&facet.range.end=20&facet.range.gap=2&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"has_image": "1",
"facet.range": "true",
"facet.range.field": "media.images.count",
"facet.range.start": "1",
"facet.range.end": "20",
"facet.range.gap": "2",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "has_image": "1", "facet.range": "true", "facet.range.field": "media.images.count", "facet.range.start": "1", "facet.range.end": "20", "facet.range.gap": "2", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "has_image" => "1", "facet.range" => "true", "facet.range.field" => "media.images.count", "facet.range.start" => "1", "facet.range.end" => "20", "facet.range.gap" => "2", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("has_image", "1")
q.Set("facet.range", "true")
q.Set("facet.range.field", "media.images.count")
q.Set("facet.range.start", "1")
q.Set("facet.range.end", "20")
q.Set("facet.range.gap", "2")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&facet.range=true&facet.range.field=media.images.count&facet.range.start=1&facet.range.end=20&facet.range.gap=2&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&has_image=1&facet.range=true&facet.range.field=media.images.count&facet.range.start=1&facet.range.end=20&facet.range.gap=2
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBuilding a sentiment timeline dashboard
This example shows how to track sentiment changes over time for brand monitoring:
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Apple&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-12-31&facet.range.gap=1MONTH&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Apple",
"facet.range": "true",
"facet.range.field": "published_at",
"facet.range.start": "2024-01-01",
"facet.range.end": "2024-12-31",
"facet.range.gap": "1MONTH",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Apple", "facet.range": "true", "facet.range.field": "published_at", "facet.range.start": "2024-01-01", "facet.range.end": "2024-12-31", "facet.range.gap": "1MONTH", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Apple", "facet.range" => "true", "facet.range.field" => "published_at", "facet.range.start" => "2024-01-01", "facet.range.end" => "2024-12-31", "facet.range.gap" => "1MONTH", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Apple")
q.Set("facet.range", "true")
q.Set("facet.range.field", "published_at")
q.Set("facet.range.start", "2024-01-01")
q.Set("facet.range.end", "2024-12-31")
q.Set("facet.range.gap", "1MONTH")
q.Set("sentiment.overall.polarity", "positive")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Apple&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-12-31&facet.range.gap=1MONTH&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Apple&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-12-31&facet.range.gap=1MONTH&sentiment.overall.polarity=positive
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleComparative time series analysis
Run multiple queries to compare different entities over the same time period:
curl "https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-06-01&facet.range.gap=1WEEK&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"organization.name": "Tesla",
"facet.range": "true",
"facet.range.field": "published_at",
"facet.range.start": "2024-01-01",
"facet.range.end": "2024-06-01",
"facet.range.gap": "1WEEK",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "organization.name": "Tesla", "facet.range": "true", "facet.range.field": "published_at", "facet.range.start": "2024-01-01", "facet.range.end": "2024-06-01", "facet.range.gap": "1WEEK", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "organization.name" => "Tesla", "facet.range" => "true", "facet.range.field" => "published_at", "facet.range.start" => "2024-01-01", "facet.range.end" => "2024-06-01", "facet.range.gap" => "1WEEK", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("organization.name", "Tesla")
q.Set("facet.range", "true")
q.Set("facet.range.field", "published_at")
q.Set("facet.range.start", "2024-01-01")
q.Set("facet.range.end", "2024-06-01")
q.Set("facet.range.gap", "1WEEK")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-06-01&facet.range.gap=1WEEK&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&organization.name=Tesla&facet.range=true&facet.range.field=published_at&facet.range.start=2024-01-01&facet.range.end=2024-06-01&facet.range.gap=1WEEK
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleHighlighting
| Parameter | Type | Required | Description |
|---|---|---|---|
hl | string | No | Enable highlighting. One of: 0, 1. |
hl.fl | string | No | Comma-separated fields to highlight (max 5). Values: title, description, body. Default: title,description. Example: title,description. |
hl.fragsize | integer | No | Size of highlighted fragment in characters (50-500). Range: 50–500. Default: 150. |
hl.snippets | integer | No | Number of highlighted snippets per field (max 10). Range: 1–10. Default: 3. |
hl.tag.post | string | No | Closing tag for highlighted text. Default: </em>. |
hl.tag.pre | string | No | Opening tag for highlighted text. Default: <em>. |
search | string | No | Extra comma-separated terms to highlight in the response, on top of the terms taken from title. Affects highlighting only — it does not filter results. Requires hl=1. Example: tesla,elon musk. Accepted by the API but not part of the published OpenAPI specification, so generated SDKs do not expose it. |
Basic highlighting for search results
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&hl=true&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "bitcoin",
"hl": "true",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "bitcoin", "hl": "true", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "bitcoin", "hl" => "true", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "bitcoin")
q.Set("hl", "true")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&hl=true&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=bitcoin&hl=true
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleHighlighting with custom fields
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=artificial%20intelligence&hl=true&hl.fl=title,description,body&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "artificial intelligence",
"hl": "true",
"hl.fl": "title,description,body",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "artificial intelligence", "hl": "true", "hl.fl": "title,description,body", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "artificial intelligence", "hl" => "true", "hl.fl" => "title,description,body", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "artificial intelligence")
q.Set("hl", "true")
q.Set("hl.fl", "title,description,body")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=artificial%20intelligence&hl=true&hl.fl=title,description,body&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=artificial%20intelligence&hl=true&hl.fl=title,description,body
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleHighlighting with larger snippets
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=climate%20change&hl=true&hl.fragsize=300&hl.snippets=5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "climate change",
"hl": "true",
"hl.fragsize": "300",
"hl.snippets": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "climate change", "hl": "true", "hl.fragsize": "300", "hl.snippets": "5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "climate change", "hl" => "true", "hl.fragsize" => "300", "hl.snippets" => "5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "climate change")
q.Set("hl", "true")
q.Set("hl.fragsize", "300")
q.Set("hl.snippets", "5")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=climate%20change&hl=true&hl.fragsize=300&hl.snippets=5&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=climate%20change&hl=true&hl.fragsize=300&hl.snippets=5
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCustom highlight tags for HTML
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=Tesla&hl=true&hl.tag.pre=%3Cmark%3E&hl.tag.post=%3C%2Fmark%3E&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "Tesla",
"hl": "true",
"hl.tag.pre": "%3Cmark%3E",
"hl.tag.post": "%3C%2Fmark%3E",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "Tesla", "hl": "true", "hl.tag.pre": "%3Cmark%3E", "hl.tag.post": "%3C%2Fmark%3E", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "Tesla", "hl" => "true", "hl.tag.pre" => "%3Cmark%3E", "hl.tag.post" => "%3C%2Fmark%3E", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "Tesla")
q.Set("hl", "true")
q.Set("hl.tag.pre", "%3Cmark%3E")
q.Set("hl.tag.post", "%3C%2Fmark%3E")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=Tesla&hl=true&hl.tag.pre=%3Cmark%3E&hl.tag.post=%3C%2Fmark%3E&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=Tesla&hl=true&hl.tag.pre=%3Cmark%3E&hl.tag.post=%3C%2Fmark%3E
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCustom highlight tags for Markdown
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=SpaceX&hl=true&hl.tag.pre=%2A%2A&hl.tag.post=%2A%2A&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "SpaceX",
"hl": "true",
"hl.tag.pre": "%2A%2A",
"hl.tag.post": "%2A%2A",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "SpaceX", "hl": "true", "hl.tag.pre": "%2A%2A", "hl.tag.post": "%2A%2A", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "SpaceX", "hl" => "true", "hl.tag.pre" => "%2A%2A", "hl.tag.post" => "%2A%2A", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "SpaceX")
q.Set("hl", "true")
q.Set("hl.tag.pre", "%2A%2A")
q.Set("hl.tag.post", "%2A%2A")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=SpaceX&hl=true&hl.tag.pre=%2A%2A&hl.tag.post=%2A%2A&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=SpaceX&hl=true&hl.tag.pre=%2A%2A&hl.tag.post=%2A%2A
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleCombined with other filters
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=Apple&organization.name=Apple&hl=true&hl.fl=title,description&sentiment.overall.polarity=positive&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "Apple",
"organization.name": "Apple",
"hl": "true",
"hl.fl": "title,description",
"sentiment.overall.polarity": "positive",
"published_at.start": "NOW-7DAYS",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "Apple", "organization.name": "Apple", "hl": "true", "hl.fl": "title,description", "sentiment.overall.polarity": "positive", "published_at.start": "NOW-7DAYS", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "Apple", "organization.name" => "Apple", "hl" => "true", "hl.fl" => "title,description", "sentiment.overall.polarity" => "positive", "published_at.start" => "NOW-7DAYS", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "Apple")
q.Set("organization.name", "Apple")
q.Set("hl", "true")
q.Set("hl.fl", "title,description")
q.Set("sentiment.overall.polarity", "positive")
q.Set("published_at.start", "NOW-7DAYS")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=Apple&organization.name=Apple&hl=true&hl.fl=title,description&sentiment.overall.polarity=positive&published_at.start=NOW-7DAYS&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=Apple&organization.name=Apple&hl=true&hl.fl=title,description&sentiment.overall.polarity=positive&published_at.start=NOW-7DAYS
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleHighlighting for entity search
curl "https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&hl=true&hl.fl=title,body&hl.snippets=5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"person.name": "Elon Musk",
"hl": "true",
"hl.fl": "title,body",
"hl.snippets": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "person.name": "Elon Musk", "hl": "true", "hl.fl": "title,body", "hl.snippets": "5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "person.name" => "Elon Musk", "hl" => "true", "hl.fl" => "title,body", "hl.snippets" => "5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("person.name", "Elon Musk")
q.Set("hl", "true")
q.Set("hl.fl", "title,body")
q.Set("hl.snippets", "5")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&hl=true&hl.fl=title,body&hl.snippets=5&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&person.name=Elon%20Musk&hl=true&hl.fl=title,body&hl.snippets=5
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleAutomatic term expansion with dictionary
This example demonstrates how highlighting automatically expands search terms using synonyms and morphology. Searching for "innovation" will also highlight related terms like "innovative", "innovate", "innovator", etc.
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=innovation&hl=true&hl.fl=title,description&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "innovation",
"hl": "true",
"hl.fl": "title,description",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "innovation", "hl": "true", "hl.fl": "title,description", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "innovation", "hl" => "true", "hl.fl" => "title,description", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "innovation")
q.Set("hl", "true")
q.Set("hl.fl", "title,description")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=innovation&hl=true&hl.fl=title,description&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=innovation&hl=true&hl.fl=title,description
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleBuilding a search results page
This example shows how to use highlighting with field selection for a search interface:
curl "https://api.apitube.io/v1/news/article?id=3036291250&title=AI&fl=id,title,description,published_at,source.domain&hl=true&hl.fl=title,description&per_page=20&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"title": "AI",
"fl": "id,title,description,published_at,source.domain",
"hl": "true",
"hl.fl": "title,description",
"per_page": "20",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "title": "AI", "fl": "id,title,description,published_at,source.domain", "hl": "true", "hl.fl": "title,description", "per_page": "20", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "title" => "AI", "fl" => "id,title,description,published_at,source.domain", "hl" => "true", "hl.fl" => "title,description", "per_page" => "20", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("title", "AI")
q.Set("fl", "id,title,description,published_at,source.domain")
q.Set("hl", "true")
q.Set("hl.fl", "title,description")
q.Set("per_page", "20")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&title=AI&fl=id,title,description,published_at,source.domain&hl=true&hl.fl=title,description&per_page=20&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&title=AI&fl=id,title,description,published_at,source.domain&hl=true&hl.fl=title,description&per_page=20
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleField selection
| Parameter | Type | Required | Description |
|---|---|---|---|
fl | string | No | Comma-separated list of fields to include in the response. Example: id,title,published_at,source.domain. |
Request to get only ID and title
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get an article with specific source fields
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain,source.rank.opr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title,source.domain,source.rank.opr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title,source.domain,source.rank.opr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title,source.domain,source.rank.opr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title,source.domain,source.rank.opr")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain,source.rank.opr&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain,source.rank.opr
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get sentiment analysis data only
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleRequest to get media information
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,media.images.count,media.videos.count&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title,media.images.count,media.videos.count",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title,media.images.count,media.videos.count", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title,media.images.count,media.videos.count", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title,media.images.count,media.videos.count")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,media.images.count,media.videos.count&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,media.images.count,media.videos.count
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleMinimal response for feed aggregation
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,published_at,source.domain&category.id=medtop:04000000&per_page=100&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title,published_at,source.domain",
"category.id": "medtop:04000000",
"per_page": "100",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title,published_at,source.domain", "category.id": "medtop:04000000", "per_page": "100", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title,published_at,source.domain", "category.id" => "medtop:04000000", "per_page" => "100", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title,published_at,source.domain")
q.Set("category.id", "medtop:04000000")
q.Set("per_page", "100")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,published_at,source.domain&category.id=medtop:04000000&per_page=100&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,published_at,source.domain&category.id=medtop:04000000&per_page=100
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleSentiment monitoring with minimal data
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,sentiment.overall.score,sentiment.overall.polarity,published_at&organization.name=Tesla&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title,sentiment.overall.score,sentiment.overall.polarity,published_at",
"organization.name": "Tesla",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title,sentiment.overall.score,sentiment.overall.polarity,published_at", "organization.name": "Tesla", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title,sentiment.overall.score,sentiment.overall.polarity,published_at", "organization.name" => "Tesla", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title,sentiment.overall.score,sentiment.overall.polarity,published_at")
q.Set("organization.name", "Tesla")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,sentiment.overall.score,sentiment.overall.polarity,published_at&organization.name=Tesla&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,sentiment.overall.score,sentiment.overall.polarity,published_at&organization.name=Tesla
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleLightweight news ticker
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain,published_at&is_breaking=1&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title,source.domain,published_at",
"is_breaking": "1",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title,source.domain,published_at", "is_breaking": "1", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title,source.domain,published_at", "is_breaking" => "1", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title,source.domain,published_at")
q.Set("is_breaking", "1")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain,published_at&is_breaking=1&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain,published_at&is_breaking=1&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articlePerformance optimization for large datasets
curl "https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain&per_page=100&published_at.start=2024-01-01&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={
"id": "3036291250",
"fl": "id,title,source.domain",
"per_page": "100",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "id": "3036291250", "fl": "id,title,source.domain", "per_page": "100", "published_at.start": "2024-01-01", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/article?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["id" => "3036291250", "fl" => "id,title,source.domain", "per_page" => "100", "published_at.start" => "2024-01-01", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/article?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/article")
q := u.Query()
q.Set("id", "3036291250")
q.Set("fl", "id,title,source.domain")
q.Set("per_page", "100")
q.Set("published_at.start", "2024-01-01")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain&per_page=100&published_at.start=2024-01-01&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/article?id=3036291250&fl=id,title,source.domain&per_page=100&published_at.start=2024-01-01
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/articleExport
| Parameter | Type | Required | Description |
|---|---|---|---|
export | string | No | Export format. One of: json, csv, tsv, xml, rss, xlsx, parquet, jsonl, ndjson. |
Request and debug
| Parameter | Type | Required | Description |
|---|---|---|---|
debug | string | No | Include user_input in response for debugging. One of: 0, 1. |
Response format
Identical to /v1/news/everything — articles under results, links under href. Every field of the article object is documented in API Response Structure.
Request examples
curl "https://api.apitube.io/v1/news/article?id=3036291250&api_key=YOUR_API_KEY"import requests
ids = ["3036291250", "3036291251", "3036291252"]
response = requests.get(
"https://api.apitube.io/v1/news/article",
params={"id": ",".join(ids)},
headers={"X-API-Key": "YOUR_API_KEY"},
)
found = {article["id"] for article in response.json()["results"]}
print("missing:", set(map(int, ids)) - found)const ids = ['3036291250', '3036291251'];
const response = await fetch(
`https://api.apitube.io/v1/news/article?id=${ids.join(',')}`,
{ headers: { 'X-API-Key': 'YOUR_API_KEY' } }
);
const data = await response.json();
console.log(data.results.map(a => a.title));$query = http_build_query(['id' => '3036291250', 'api_key' => 'YOUR_API_KEY']);
$data = json_decode(file_get_contents("https://api.apitube.io/v1/news/article?$query"), true);
print_r($data['results'][0]['title']);Fetching only the fields you need
fl trims the response, which matters when rehydrating large batches:
curl "https://api.apitube.io/v1/news/article?id=3036291250,3036291251&fl=id,title,published_at,href&api_key=YOUR_API_KEY"Exporting a single article
curl "https://api.apitube.io/v1/news/article?id=3036291250&export=json&api_key=YOUR_API_KEY" -o article.json
curl "https://api.apitube.io/v1/news/article?id=3036291250&export=xml&api_key=YOUR_API_KEY" -o article.xmlErrors
| Code | Status | Meaning |
|---|---|---|
ER0232 | 400 | id is missing |
ER0179 | 400 | id passed more than once — send one comma-separated value instead |
ER0175 | 401 | API key is missing or invalid |
ER0176 | 402 | No points left on the account |
ER0203 | 429 | Rate limit exceeded |
Full list in HTTP response codes.
Related
- Get a story — the cluster of articles related to one article ID.
- Search articles — find the IDs in the first place.
- API Response Structure — every field of the article object.