Search articles with /v1/news/everything
/v1/news/everything searches the whole article archive and returns matching articles. It accepts the complete filter set — title, language, date, source, category, topic, industry, entity, sentiment, media, readability, geo — and supports sorting, pagination, faceting, highlighting and export. Every other article endpoint is a narrowed version of this one.
Each request costs 1 point. Using the prompt parameter adds 2 points for the translation step; prompt requires Basic or above.
Endpoint
GET /v1/news/everything
POST /v1/news/everythingBase URL: https://api.apitube.io. Both methods are equivalent — pass filters as query parameters with GET, or as a JSON body with POST. Prefer the body when a filter value is long (a boolean query, a list of source IDs) or when a URL length limit gets in the way.
Authenticate with the X-API-Key header, an Authorization: Bearer header, or the api_key query parameter — see Authentication.
Parameters
Every parameter below is optional. Without any filters the endpoint returns the most recent articles across all sources.
Prompt
Plain-language description of what you want; translated into the filters below.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | No | Plain-language description of the news you want, e.g. "Elon Musk, Tesla, news for the last 10 days". It is translated into the regular filters below before the search runs, and the resulting parameters are returned in meta.prompt. Explicit parameters always win over the prompt. Costs 2 extra points when the wording has not been parsed before (repeats are served from cache). Available on Basic and above — on Free and Starter the request fails with 403 ER0706. Range: 3–500 characters. |
Request for Articles Described in Plain Language
This request asks for recent English-language coverage of Tesla and Elon Musk without naming a single filter.
curl "https://api.apitube.io/v1/news/everything?prompt=Tesla%20and%20Elon%20Musk%20news%20in%20English%20for%20the%20last%2010%20days&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"prompt": "Tesla%20and%20Elon%20Musk%20news%20in%20English%20for%20the%20last%2010%20days",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "prompt": "Tesla%20and%20Elon%20Musk%20news%20in%20English%20for%20the%20last%2010%20days", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["prompt" => "Tesla%20and%20Elon%20Musk%20news%20in%20English%20for%20the%20last%2010%20days", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
q.Set("prompt", "Tesla%20and%20Elon%20Musk%20news%20in%20English%20for%20the%20last%2010%20days")
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/everything?prompt=Tesla%20and%20Elon%20Musk%20news%20in%20English%20for%20the%20last%2010%20days&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/everything?prompt=Tesla%20and%20Elon%20Musk%20news%20in%20English%20for%20the%20last%2010%20days
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/everythingTitle 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/everything?title=technology&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "technology",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "technology", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "technology", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?title=AI,innovation&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "AI,innovation",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "AI,innovation", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "AI,innovation", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?ignore.title=celebrity&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"ignore.title": "celebrity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "ignore.title": "celebrity", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["ignore.title" => "celebrity", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCombined 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/everything?title=AI&ignore.title=layoffs,job%20losses&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "AI",
"ignore.title": "layoffs,job losses",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "AI", "ignore.title": "layoffs,job losses", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "AI", "ignore.title" => "layoffs,job losses", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingExact Phrase Search (Solr Style)
This request finds articles with the exact phrase "breaking news" in the title.
curl "https://api.apitube.io/v1/news/everything?title=%22breaking%20news%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"breaking news\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"breaking news\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"breaking news\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingExact 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/everything?title=%22Federal%20Reserve%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"Federal Reserve\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"Federal Reserve\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"Federal Reserve\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingExact 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/everything?title=%22United%20Nations%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"United Nations\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"United Nations\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"United Nations\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingProximity Search with Slop (Solr Style)
Find articles where "Apple" and "iPhone" appear near each other:
curl "https://api.apitube.io/v1/news/everything?title=%22Apple%20iPhone%22~5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"Apple iPhone\"~5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"Apple iPhone\"~5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"Apple iPhone\"~5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingComparison: Regular vs. Phrase vs. Proximity
Regular search (finds keywords in any order, with synonyms):
curl "https://api.apitube.io/v1/news/everything?title=artificial%20intelligence&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "artificial intelligence",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "artificial intelligence", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "artificial intelligence", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingComparison: 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/everything?title=%22artificial%20intelligence%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"artificial intelligence\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"artificial intelligence\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"artificial intelligence\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingComparison: 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/everything?title=%22artificial%20intelligence%22~3&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"artificial intelligence\"~3",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"artificial intelligence\"~3", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"artificial intelligence\"~3", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCompany + Product Proximity Search
Find articles mentioning company and product name near each other:
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"title": "\"Tesla Cybertruck\"~3",
"published_at.start": "NOW-7DAYS",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"Tesla Cybertruck\"~3", "published_at.start": "NOW-7DAYS", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"Tesla Cybertruck\"~3", "published_at.start" => "NOW-7DAYS", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEvent Names with Exact Match
Search for specific event names:
curl "https://api.apitube.io/v1/news/everything?title=%22Super%20Bowl%202024%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"Super Bowl 2024\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"Super Bowl 2024\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"Super Bowl 2024\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEvent Names with Exact Match
Search for specific event names:
curl "https://api.apitube.io/v1/news/everything?title=%22World%20Cup%20Final%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "\"World Cup Final\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "\"World Cup Final\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "\"World Cup Final\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingArticle lookup
| Parameter | Type | Required | Description |
|---|---|---|---|
article.id | string | No | Comma-separated article IDs (max 5). 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/everything?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/everything",
params={
"published_at.start": "2022-01-01",
"published_at.end": "2022-01-31",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news using a relative time range
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"published_at.start": "NOW-7DAYS",
"published_at.end": "NOW",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "published_at.start": "NOW-7DAYS", "published_at.end": "NOW", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["published_at.start" => "NOW-7DAYS", "published_at.end" => "NOW", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingComplex Date-Range Analysis with Precise Timestamps
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingLanguages
| 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/everything?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/everything",
params={
"ignore.source.country.code": "fr",
"ignore.language.code": "fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "ignore.source.country.code": "fr", "ignore.language.code": "fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["ignore.source.country.code" => "fr", "ignore.language.code" => "fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles in the English and French languages
curl "https://api.apitube.io/v1/news/everything?language.code=en,fr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"language.code": "en,fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "language.code": "en,fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["language.code" => "en,fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMulti-language Analysis with Source Filtering
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingLanguage-Specific Business News
curl "https://api.apitube.io/v1/news/everything?language.code=zh,ko&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"language.code": "zh,ko",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "language.code": "zh,ko", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["language.code" => "zh,ko", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMultilingual Organization Sentiment Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRegional Language News Comparison
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSource
| 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/everything?source.domain=theguardian.com&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"source.domain": "theguardian.com",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "source.domain": "theguardian.com", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["source.domain" => "theguardian.com", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles from multiple sources (e.g., "theguardian.com" and "nytimes.com")
curl "https://api.apitube.io/v1/news/everything?source.domain=theguardian.com,nytimes.com&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"source.domain": "theguardian.com,nytimes.com",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "source.domain": "theguardian.com,nytimes.com", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["source.domain" => "theguardian.com,nytimes.com", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?source.domain=theguardian.com&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"source.domain": "theguardian.com",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "source.domain": "theguardian.com", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["source.domain" => "theguardian.com", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles with rank between 0.5 and 0.9
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"source.rank.opr.min": "5",
"source.rank.opr.max": "9",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCross-Regional Media Bias Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for premium source articles
curl "https://api.apitube.io/v1/news/everything?is_premium_source=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_premium_source": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_premium_source": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_premium_source" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for verified source articles
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"is_verified_source": "1",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingAuthors
| 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/everything?author.name=AFP&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"author.name": "AFP",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "author.name": "AFP", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["author.name" => "AFP", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles by multiple authors (e.g., "AFP" and "Reuters")
curl "https://api.apitube.io/v1/news/everything?author.name=AFP,Reuters&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"author.name": "AFP,Reuters",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "author.name": "AFP,Reuters", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["author.name" => "AFP,Reuters", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?author.name=AFP&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"author.name": "AFP",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "author.name": "AFP", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["author.name" => "AFP", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingAuthor Expertise Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingAuthor Sentiment Bias Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"author.name": "AFP,Reuters",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "author.name": "AFP,Reuters", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["author.name" => "AFP,Reuters", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingAuthor Topic Evolution Tracking
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for articles with attributed authors
curl "https://api.apitube.io/v1/news/everything?has_author=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"has_author": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "has_author": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["has_author" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for articles without authors
curl "https://api.apitube.io/v1/news/everything?has_author=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"has_author": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "has_author": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["has_author" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCategories
| 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/everything?category.id=medtop:15000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"category.id": "medtop:15000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "category.id": "medtop:15000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["category.id" => "medtop:15000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for Articles in the Finance Category
This request retrieves news articles in the "finance" category.
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?category.id=medtop:11000000&language.code=fr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"category.id": "medtop:11000000",
"language.code": "fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "category.id": "medtop:11000000", "language.code": "fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["category.id" => "medtop:11000000", "language.code" => "fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCategory 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/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCategory-Based Media Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCross-Category Sentiment Comparison
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingTopics
| 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/everything?topic.id=industry.crypto_news&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"topic.id": "industry.crypto_news",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "topic.id": "industry.crypto_news", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["topic.id" => "industry.crypto_news", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMulti-Topic Sentiment Analysis
This request analyzes sentiment across multiple related topics.
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingComparative Topic Analysis with Language Filtering
This request compares coverage of different topics across specific languages.
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingTopic and Entity Intersection Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingTopic-Based Expert Opinion Tracking
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingIndustries
| 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/everything?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/everything",
params={
"industry.id": "400,438",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCross-Industry Innovation Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"industry.id": "400,438",
"title": "innovation",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEntities, 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/everything?entity.id=1278268&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"entity.id": "1278268",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "entity.id": "1278268", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["entity.id" => "1278268", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple entities (e.g., "Brad Pitt" and "Angelina Jolie")
curl "https://api.apitube.io/v1/news/everything?entity.id=1278268,1282301&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"entity.id": "1278268,1282301",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "entity.id": "1278268,1282301", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["entity.id" => "1278268,1282301", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about an entity while ignoring another
curl "https://api.apitube.io/v1/news/everything?entity.id=1278268&ignore.entity.id=315&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"entity.id": "1278268",
"ignore.entity.id": "315",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "entity.id": "1278268", "ignore.entity.id": "315", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["entity.id" => "1278268", "ignore.entity.id" => "315", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEntity Correlation Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"entity.id": "1278268,1282301",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEntity Mention Tracking Over Time
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEntity Co-occurrence Network Analysis
curl "https://api.apitube.io/v1/news/everything?entity.id=1278268&sort.by=published_at&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"entity.id": "1278268",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "entity.id": "1278268", "sort.by": "published_at", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["entity.id" => "1278268", "sort.by" => "published_at", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEntity Impact on Market Sentiment
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a specific person (e.g., "Elon Musk")
curl "https://api.apitube.io/v1/news/everything?person.name=Elon%20Musk&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"person.name": "Elon Musk",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "person.name": "Elon Musk", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["person.name" => "Elon Musk", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple people (e.g., "Elon Musk" and "Donald Trump")
curl "https://api.apitube.io/v1/news/everything?person.name=Elon%20Musk,Donald%20Trump&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"person.name": "Elon Musk,Donald Trump",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "person.name": "Elon Musk,Donald Trump", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["person.name" => "Elon Musk,Donald Trump", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingPerson Sentiment Analysis Across Sources
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCross-reference Person with Organizations
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingPublic Figure Controversy Timeline
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingPerson Mention in Research Publications
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"person.name": "Stephen Hawking",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a specific organization (e.g., "Google")
curl "https://api.apitube.io/v1/news/everything?organization.name=Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"organization.name": "Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "organization.name": "Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["organization.name" => "Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple organizations (e.g., "Google" and "Apple")
curl "https://api.apitube.io/v1/news/everything?organization.name=Google,Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"organization.name": "Google,Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "organization.name": "Google,Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["organization.name" => "Google,Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about an organization while ignoring another (e.g., "Google" and excluding "Apple")
curl "https://api.apitube.io/v1/news/everything?organization.name=Google&ignore.organization.name=Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"organization.name": "Google",
"ignore.organization.name": "Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "organization.name": "Google", "ignore.organization.name": "Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["organization.name" => "Google", "ignore.organization.name" => "Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCompetitive Intelligence Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingOrganization Sentiment Tracking During Financial Events
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCorporate Social Responsibility Coverage
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingExecutive Leadership Transition Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"organization.name": "Google",
"title": "CEO",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a specific disaster (e.g., "Earthquake")
curl "https://api.apitube.io/v1/news/everything?disaster.name=earthquake&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"disaster.name": "earthquake",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "disaster.name": "earthquake", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["disaster.name" => "earthquake", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple disasters (e.g., "Earthquake" and "Tsunami")
curl "https://api.apitube.io/v1/news/everything?disaster.name=earthquake,tsunami&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"disaster.name": "earthquake,tsunami",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "disaster.name": "earthquake,tsunami", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["disaster.name" => "earthquake,tsunami", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a disaster while ignoring another
curl "https://api.apitube.io/v1/news/everything?disaster.name=hurricane&ignore.disaster.name=tornado&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"disaster.name": "hurricane",
"ignore.disaster.name": "tornado",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "disaster.name": "hurricane", "ignore.disaster.name": "tornado", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["disaster.name" => "hurricane", "ignore.disaster.name" => "tornado", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingDisaster Impact Analysis by Region
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"disaster.name": "earthquake",
"location.name": "Japan",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a specific disease (e.g., "COVID-19")
curl "https://api.apitube.io/v1/news/everything?disease.name=COVID-19&category.id=medtop:07000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"disease.name": "COVID-19",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "disease.name": "COVID-19", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["disease.name" => "COVID-19", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple diseases
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"disease.name": "COVID-19,Influenza",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "disease.name": "COVID-19,Influenza", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["disease.name" => "COVID-19,Influenza", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a disease while ignoring another
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"disease.name": "malaria",
"ignore.disease.name": "dengue",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingDisease Outbreak Tracking
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a specific brand (e.g., "Apple")
curl "https://api.apitube.io/v1/news/everything?brand.name=Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"brand.name": "Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "brand.name": "Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["brand.name" => "Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple brands (e.g., "Apple" and "Google")
curl "https://api.apitube.io/v1/news/everything?brand.name=Apple,Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"brand.name": "Apple,Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "brand.name": "Apple,Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["brand.name" => "Apple,Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a brand while ignoring another (e.g., "Apple" and excluding "Google")
curl "https://api.apitube.io/v1/news/everything?brand.name=Apple&ignore.brand.name=Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"brand.name": "Apple",
"ignore.brand.name": "Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "brand.name": "Apple", "ignore.brand.name": "Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["brand.name" => "Apple", "ignore.brand.name" => "Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBrand Reputation Analysis Across Markets
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBrand Sponsorship Impact Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBrand Crisis Management Tracking
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a specific sport (e.g., "Football")
curl "https://api.apitube.io/v1/news/everything?sport.name=Football&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sport.name": "Football",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sport.name": "Football", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sport.name" => "Football", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple sports
curl "https://api.apitube.io/v1/news/everything?sport.name=Football,Basketball&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sport.name": "Football,Basketball",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sport.name": "Football,Basketball", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sport.name" => "Football,Basketball", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about a sport while ignoring another
curl "https://api.apitube.io/v1/news/everything?sport.name=Football&ignore.sport.name=Cricket&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sport.name": "Football",
"ignore.sport.name": "Cricket",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sport.name": "Football", "ignore.sport.name": "Cricket", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sport.name" => "Football", "ignore.sport.name" => "Cricket", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEvent 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/everything?event.name=Black%20Friday&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"event.name": "Black Friday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "event.name": "Black Friday", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["event.name" => "Black Friday", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about multiple events
curl "https://api.apitube.io/v1/news/everything?event.name=Black%20Friday,Cyber%20Monday&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"event.name": "Black Friday,Cyber Monday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "event.name": "Black Friday,Cyber Monday", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["event.name" => "Black Friday,Cyber Monday", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles about an event while ignoring another
curl "https://api.apitube.io/v1/news/everything?event.name=Grammy%20Awards&ignore.event.name=Oscar&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"event.name": "Grammy Awards",
"ignore.event.name": "Oscar",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "event.name": "Grammy Awards", "ignore.event.name": "Oscar", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["event.name" => "Grammy Awards", "ignore.event.name" => "Oscar", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEvent Coverage Sentiment Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSentiment
| 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/everything?sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?sentiment.overall.polarity=positive&source.country.code=jp&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sentiment.overall.polarity": "positive",
"source.country.code": "jp",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sentiment.overall.polarity": "positive", "source.country.code": "jp", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sentiment.overall.polarity" => "positive", "source.country.code" => "jp", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?sentiment.overall.polarity=positive&title=technology&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sentiment.overall.polarity": "positive",
"title": "technology",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sentiment.overall.polarity": "positive", "title": "technology", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sentiment.overall.polarity" => "positive", "title" => "technology", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMulti-dimensional Sentiment Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingComparative Sentiment Analysis Across Markets
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSentiment Divergence Analysis by Source Type
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingProduct Review Sentiment Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?sentiment.mixed=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sentiment.mixed": "1",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sentiment.mixed": "1", "category.id": "medtop:11000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sentiment.mixed" => "1", "category.id" => "medtop:11000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?sentiment.consistent=1&has_author=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sentiment.consistent": "1",
"has_author": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sentiment.consistent": "1", "has_author": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sentiment.consistent" => "1", "has_author" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?is_clickbait=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_clickbait": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_clickbait": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_clickbait" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?is_clickbait=0&is_verified_source=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_clickbait": "0",
"is_verified_source": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_clickbait": "0", "is_verified_source": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_clickbait" => "0", "is_verified_source" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFilter 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/everything?sentiment_gap.min=0.5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sentiment_gap.min": "0.5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sentiment_gap.min": "0.5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sentiment_gap.min" => "0.5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFilter 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/everything?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/everything",
params={
"sentiment_gap.max": "0.2",
"source.rank.opr.min": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCombined clickbait analysis for political news
This request analyzes clickbait patterns in political coverage.
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMedia
| 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/everything?media.images.count=2&media.videos.count=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"media.images.count": "2",
"media.videos.count": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "media.images.count": "2", "media.videos.count": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["media.images.count" => "2", "media.videos.count" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles with images of a specific size
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRich Media Content Curation
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingHigh-Quality Visual News Aggregation
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingVideo Content Analysis for Educational Topics
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for media-rich articles
curl "https://api.apitube.io/v1/news/everything?is_media_rich=1&category.id=medtop:13000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_media_rich": "1",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_media_rich": "1", "category.id": "medtop:13000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_media_rich" => "1", "category.id" => "medtop:13000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for articles with high-quality images
curl "https://api.apitube.io/v1/news/everything?has_hq_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"has_hq_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "has_hq_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["has_hq_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for multimedia-rich content
curl "https://api.apitube.io/v1/news/everything?has_image=1&has_video=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"has_image": "1",
"has_video": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "has_image": "1", "has_video": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["has_image" => "1", "has_video" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for landscape-oriented images (ideal for headers/banners)
curl "https://api.apitube.io/v1/news/everything?is_landscape_media=1&has_fullhd_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_landscape_media": "1",
"has_fullhd_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_landscape_media": "1", "has_fullhd_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_landscape_media" => "1", "has_fullhd_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for portrait-oriented images (ideal for mobile)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"is_portrait_media": "1",
"has_mobile_optimized_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_portrait_media": "1", "has_mobile_optimized_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_portrait_media" => "1", "has_mobile_optimized_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for Instagram-ready content
curl "https://api.apitube.io/v1/news/everything?is_instagram_ready=1&category.id=medtop:08000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_instagram_ready": "1",
"category.id": "medtop:08000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_instagram_ready": "1", "category.id": "medtop:08000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_instagram_ready" => "1", "category.id" => "medtop:08000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for Twitter Card optimized content
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"is_twitter_card_ready": "1",
"has_social_share_image": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for 4K image galleries
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"has_4k_images": "1",
"has_multiple_images": "1",
"category.id": "medtop:01000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for consistent visual content (curated galleries)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"has_consistent_image_sizes": "1",
"has_multiple_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "has_consistent_image_sizes": "1", "has_multiple_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["has_consistent_image_sizes" => "1", "has_multiple_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for mixed media articles (images + videos)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"has_mixed_media": "1",
"sort.by": "media.images.count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingReadability
| 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/everything?location.name=Tokyo&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"location.name": "Tokyo",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "location.name": "Tokyo", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["location.name" => "Tokyo", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles from multiple locations (e.g., "London" and "Paris")
curl "https://api.apitube.io/v1/news/everything?location.name=London,Paris&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"location.name": "London,Paris",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "location.name": "London,Paris", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["location.name" => "London,Paris", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest 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/everything?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/everything",
params={
"location.name": "London",
"language.code": "en",
"ignore.location.name": "Ontario",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSearch for news within 50 km of Berlin (geo-coordinates)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"location.lat": "52.52",
"location.lng": "13.40",
"location.radius": "50",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingLocal news with positive sentiment (geo-coordinates)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRegional breaking news (geo-coordinates)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingGeopolitical Event Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMulti-Location Business Impact Study
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingNatural Disaster Coverage Analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingTourism Sentiment Analysis by Location
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSearch within the bounding box (New York City area)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"location.bbox": "40.4774,40.9176,-74.2591,-73.7004",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBounding box with category filter (tech news in Silicon Valley)
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRing search – articles between 100 km and 500 km from Berlin
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingExclude center area - articles more than 50km from Paris
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"location.lat": "48.8566",
"location.lng": "2.3522",
"location.radius.min": "50",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingArticles with geographic coordinates only
curl "https://api.apitube.io/v1/news/everything?has_location_geo=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"has_location_geo": "1",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "has_location_geo": "1", "category.id": "medtop:11000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["has_location_geo" => "1", "category.id" => "medtop:11000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingArticles without coordinates (text-based location only)
curl "https://api.apitube.io/v1/news/everything?has_location_geo=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"has_location_geo": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "has_location_geo": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["has_location_geo" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRegional disaster tracking with a bounding box
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingArticle 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/everything?is_easy_read=1&readability.audience=general&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_easy_read": "1",
"readability.audience": "general",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_easy_read": "1", "readability.audience": "general", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_easy_read" => "1", "readability.audience" => "general", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingGet beginner-level content about technology
curl "https://api.apitube.io/v1/news/everything?readability.difficulty=beginner&topic.id=industry.technology_news&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"readability.difficulty": "beginner",
"topic.id": "industry.technology_news",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "readability.difficulty": "beginner", "topic.id": "industry.technology_news", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["readability.difficulty" => "beginner", "topic.id" => "industry.technology_news", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingGet articles suitable for teenagers (age 12–16)
curl "https://api.apitube.io/v1/news/everything?readability.age.min=12&readability.age.max=16&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"readability.age.min": "12",
"readability.age.max": "16",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "readability.age.min": "12", "readability.age.max": "16", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["readability.age.min" => "12", "readability.age.max" => "16", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingGet professional-level business news
curl "https://api.apitube.io/v1/news/everything?readability.audience=professional&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"readability.audience": "professional",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "readability.audience": "professional", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["readability.audience" => "professional", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingGet highly readable content (FRE 70–90) for content curation
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"readability.ease.min": "70",
"readability.ease.max": "90",
"is_duplicate": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingGet academic-level articles about science
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"readability.difficulty": "expert",
"readability.audience": "academic",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCombine with grade level for educational content
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingHigh-Quality Content Filtering
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for long-read articles
curl "https://api.apitube.io/v1/news/everything?is_long_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_long_read": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_long_read": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_long_read" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for quick-read articles
curl "https://api.apitube.io/v1/news/everything?is_short_read=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_short_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_short_read": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_short_read" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for quick news briefs (≤2 minutes)
curl "https://api.apitube.io/v1/news/everything?is_quick_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_quick_read": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_quick_read": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_quick_read" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for standard-length articles (3-7 minutes)
curl "https://api.apitube.io/v1/news/everything?is_medium_read=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_medium_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_medium_read": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_medium_read" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for in-depth analysis articles (≥10 minutes)
curl "https://api.apitube.io/v1/news/everything?is_deep_dive=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_deep_dive": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_deep_dive": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_deep_dive" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for high-quality curated content
curl "https://api.apitube.io/v1/news/everything?is_high_quality=1&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_high_quality": "1",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_high_quality": "1", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_high_quality" => "1", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest for media-rich articles sorted by media content
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"has_image": "1",
"sort.by": "media_richness",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingOnly Breaking News Monitoring
curl "https://api.apitube.io/v1/news/everything?is_breaking=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"is_breaking": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "is_breaking": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["is_breaking" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSorting
| 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/everything?sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get news articles sorted by the overall sentiment magnitude in descending order
curl "https://api.apitube.io/v1/news/everything?sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get the most viral/engaging articles
curl "https://api.apitube.io/v1/news/everything?sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sort.by": "engagement",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sort.by": "engagement", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sort.by" => "engagement", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get engaging breaking news with media
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get the most media-rich articles
curl "https://api.apitube.io/v1/news/everything?sort.by=media_richness&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sort.by": "media_richness",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "sort.by": "media_richness", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["sort.by" => "media_richness", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get articles from high-ranking sources sorted by source rank
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get quick-read articles sorted by read time
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"read_time.max": "5",
"sort.by": "read_time",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get high-quality visual content sorted by image dimensions
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMulti-dimensional Content Ranking
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMedia-Rich Content Prioritization
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingIn-Depth Analysis Articles
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"category.id": "medtop:04000000",
"sort.by": "paragraphs_count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSentiment-Based Content Discovery
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingHigh-Quality Long-Form Content
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"sort.by": "quality",
"sort.order": "desc",
"is_long_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingControversial/Polarizing Topics
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"sort.by": "controversy",
"sort.order": "desc",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMost Trustworthy News Sources
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"sort.by": "trust",
"sort.order": "desc",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCombining Quality with Editorial Filters
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"sort.by": "quality",
"source.rank.opr.min": "5",
"is_duplicate": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingViral Content for Social Media
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCredible Sources for Research
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"sort.by": "trust",
"source.rank.opr.min": "6",
"sentiment.overall.polarity": "neutral",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingPagination
| 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/everything?per_page=10&page=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"per_page": "10",
"page": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "per_page": "10", "page": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["per_page" => "10", "page" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingEfficient Large Dataset Retrieval
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingPaginated Multi-criteria Search
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting
| 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/everything?facet=true&facet.field=source.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"facet": "true",
"facet.field": "source.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "facet": "true", "facet.field": "source.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["facet" => "true", "facet.field" => "source.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting with multiple fields
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "source.id,language.id,sentiment.overall.polarity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting with custom limit
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "source.id",
"facet.limit": "20",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "facet": "true", "facet.field": "source.id", "facet.limit": "20", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["facet" => "true", "facet.field" => "source.id", "facet.limit" => "20", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting with minimum count filter
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "category.id",
"facet.mincount": "10",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "facet": "true", "facet.field": "category.id", "facet.mincount": "10", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["facet" => "true", "facet.field" => "category.id", "facet.mincount" => "10", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting combined with search filters
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting for language distribution analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting for sentiment analysis by source
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting for media bias distribution
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingFaceting for category distribution in top headlines
curl "https://api.apitube.io/v1/news/everything?facet=true&facet.field=category.id,language.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"facet": "true",
"facet.field": "category.id,language.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "facet": "true", "facet.field": "category.id,language.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["facet" => "true", "facet.field" => "category.id,language.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBuilding 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/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingTemporal analysis – articles by hour of day
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "published.hour",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingTemporal analysis – articles by day of week
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "published.day_of_week",
"category.id": "medtop:15000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMedia richness analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSource quality distribution
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBreaking news distribution by hour
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"is_breaking": "1",
"facet": "true",
"facet.field": "published.hour,category.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingContent length analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "read_time",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMulti-sentiment analysis across content parts
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingYearly trend analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingContent length distribution
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "content.length",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingWeekday vs weekend publishing patterns
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "published.weekday,published.time_of_day",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSentiment strength analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"organization.name": "Tesla",
"facet": "true",
"facet.field": "sentiment.strength,sentiment.overall.polarity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMost mentioned entities
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"facet": "true",
"facet.field": "entity.id",
"facet.limit": "20",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "facet": "true", "facet.field": "entity.id", "facet.limit": "20", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["facet" => "true", "facet.field" => "entity.id", "facet.limit" => "20", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingTime of day publishing analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingDate range faceting - articles per week
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingDate range faceting – articles per day
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingDate range faceting - hourly distribution
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSentiment distribution analysis
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingReading time distribution
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSource quality distribution
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCombined regular and range faceting
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMedia richness timeline
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBuilding a sentiment timeline dashboard
This example shows how to track sentiment changes over time for brand monitoring:
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingComparative time series analysis
Run multiple queries to compare different entities over the same time period:
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingHighlighting
| 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/everything?title=bitcoin&hl=true&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "bitcoin",
"hl": "true",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "bitcoin", "hl": "true", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "bitcoin", "hl" => "true", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingHighlighting with custom fields
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"title": "artificial intelligence",
"hl": "true",
"hl.fl": "title,description,body",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingHighlighting with larger snippets
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"title": "climate change",
"hl": "true",
"hl.fragsize": "300",
"hl.snippets": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCustom highlight tags for HTML
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCustom highlight tags for Markdown
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingCombined with other filters
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingHighlighting for entity search
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingAutomatic 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/everything?title=innovation&hl=true&hl.fl=title,description&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "innovation",
"hl": "true",
"hl.fl": "title,description",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "title": "innovation", "hl": "true", "hl.fl": "title,description", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["title" => "innovation", "hl" => "true", "hl.fl" => "title,description", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingBuilding 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/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingField 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/everything?fl=id,title&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"fl": "id,title",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "fl": "id,title", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["fl" => "id,title", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get an article with specific source fields
curl "https://api.apitube.io/v1/news/everything?fl=id,title,source.domain,source.rank.opr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"fl": "id,title,source.domain,source.rank.opr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "fl": "id,title,source.domain,source.rank.opr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["fl" => "id,title,source.domain,source.rank.opr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get sentiment analysis data only
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"fl": "id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingRequest to get media information
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"fl": "id,title,media.images.count,media.videos.count",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "fl": "id,title,media.images.count,media.videos.count", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["fl" => "id,title,media.images.count,media.videos.count", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingMinimal response for feed aggregation
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingSentiment monitoring with minimal data
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingLightweight news ticker
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingPerformance optimization for large datasets
curl "https://api.apitube.io/v1/news/everything?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/everything",
params={
"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({ "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/everything?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["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/everything?$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/everything")
q := u.Query()
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/everything?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/everything?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/everythingExport
| 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
{
"status": "ok",
"limit": 100,
"path": "https://api.apitube.io/v1/news/everything?api_key=API_KEY",
"page": 1,
"has_next_pages": true,
"next_page": "https://api.apitube.io/v1/news/everything?api_key=API_KEY&page=2",
"has_previous_page": false,
"previous_page": "",
"export": {
"json": "...",
"csv": "...",
"xlsx": "..."
},
"request_id": "1044de7a-a39d-463c-b443-1d9141f7babe",
"results": []
}Articles live under results (not articles), and each article links to its page through href (not url). The full article object — 60+ fields including sentiment, entities, source, media, readability — is documented in API Response Structure.
Request examples
GET with query filters
curl "https://api.apitube.io/v1/news/everything?title=bitcoin&language.code=en&published_at.start=2026-08-01&per_page=10&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"title": "bitcoin",
"language.code": "en",
"published_at.start": "2026-08-01",
"per_page": 10,
},
headers={"X-API-Key": "YOUR_API_KEY"},
)
for article in response.json()["results"]:
print(article["published_at"], article["title"], article["href"])const params = new URLSearchParams({
title: 'bitcoin',
'language.code': 'en',
'published_at.start': '2026-08-01',
per_page: '10'
});
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`, {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
for (const article of data.results) {
console.log(article.published_at, article.title, article.href);
}$query = http_build_query([
'title' => 'bitcoin',
'language.code' => 'en',
'published_at.start' => '2026-08-01',
'per_page' => 10,
'api_key' => 'YOUR_API_KEY',
]);
$data = json_decode(file_get_contents("https://api.apitube.io/v1/news/everything?$query"), true);
foreach ($data['results'] as $article) {
echo $article['published_at'], ' ', $article['title'], PHP_EOL;
}package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
q := u.Query()
q.Set("title", "bitcoin")
q.Set("language.code", "en")
q.Set("published_at.start", "2026-08-01")
q.Set("per_page", "10")
u.RawQuery = q.Encode()
req, _ := http.NewRequest("GET", u.String(), nil)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var data map[string]any
json.NewDecoder(resp.Body).Decode(&data)
fmt.Println(data["results"])
}POST with a JSON body
curl -X POST "https://api.apitube.io/v1/news/everything" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "bitcoin AND NOT (etf OR futures)",
"language.code": "en",
"published_at.start": "2026-08-01",
"sort.by": "published_at",
"per_page": 50
}'Excluding values
21 filters have a mirrored ignore.* form — title, language, source, author, the four taxonomies, the entity *.name filters and event.type — so a query can include and exclude in one request:
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&ignore.source.domain=example.com&api_key=YOUR_API_KEY"Limits
per_pageis capped by plan (Free 10, Starter 50, paid 250) and the Free plan cannot go past page 5 — see Rate limits and quotas.- The
promptparameter requires Basic or above; on Free and Starter it returns403 ER0706. Every other filter on this page works on every plan. - A title search (
title,title_starts_with,title_ends_with,title_pattern,query) is limited to a 31-daypublished_atwindow on every plan. A wider explicit range returns400 ER0110; no range at all searches the last 31 days and reportsER0366inmeta.warnings.
Errors
Errors follow the shared format and codes documented in HTTP response codes. The ones you are most likely to hit here:
| Code | Status | Meaning |
|---|---|---|
ER0110 | 400 | Title search requested over a window wider than 31 days |
ER0171 | 400 | per_page above the plan ceiling |
ER0173 | 400 | Page 6 or beyond on the Free plan |
ER0179 | 400 | The same parameter passed twice |
ER0175 | 401 | API key is missing or invalid |
ER0176 | 402 | No points left on the account |
ER0203 | 429 | Rate limit exceeded |
ER0706 | 403 | prompt used on a plan below Basic |
ER0701–ER0712 | 400 | Boolean query failed to parse |
Related
- Count articles — the same filters, returning only the total.
- Top headlines — the same filters, narrowed to current headlines.
- Parameters reference — syntax, edge cases and workflow examples for every filter family.