News API filters
Use these filters to narrow the articles returned by /v1/news/everything. Combine filters for titles, dates, languages, sources, entities, sentiment and other criteria.
Send parameters in the URL with GET or as JSON with POST. The API reference describes each endpoint, its additional parameters and any exceptions to the shared filters. Use Reference data to find valid codes and IDs.
All filters and request options
All parameters are optional. Every example below uses /v1/news/everything.
Prompt
Describe the news you want in plain language. The API chooses the filters.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | No | Describe the news you want, for example "Elon Musk, Tesla, news for the last 10 days". Check meta.prompt for the filters used. Parameters you send directly take priority. A new translation costs 2 extra points; repeated prompts use the cached translation for free. Requires Basic or above. Free and Starter return 403 ER0706. Range: 3–500 characters. |
Find articles Described in Plain Language
Find recent English-language articles about Tesla and Elon Musk using a plain-language request.
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/everything
Title 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 | Combine conditions with AND, OR, NOT and parentheses. Use field:value to choose a field, quotes and ~N to find nearby words, [a TO b] for a range, and {{...}} for entity conditions. Terms without a field search titles. A result must also match any other filters you send. Title searches cover at most 31 days of published_at. Invalid syntax returns 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 article titles. To find words near each other, use a phrase such as "climate change"~2. Searches can cover at most 31 days of published_at. Without dates, the API searches the last 31 days. A wider explicit range returns ER0110. Range: 2–100 characters. |
title_ends_with | string | No | Find articles whose titles end with this text. As with title, the date range can cover at most 31 days. Range: 2–100 characters. |
title_pattern | string | No | Find titles containing this text. Special characters are treated literally; this is not a regular expression. Searches cover at most 31 days, as with title. Range: 2–200 characters. |
title_starts_with | string | No | Find articles whose titles start with this text. As with title, the date range can cover at most 31 days. Range: 2–100 characters. |
Find articles with a Specific Title Keyword
Find 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/everything
Find articles with Multiple Title Keywords
Find 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/everything
Find articles with Titles Excluding Certain Words
Find 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/everything
Combined Title Filters for Specific News
Find titles about AI and exclude titles 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/everything
Search for an exact phrase
Find 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/everything
Search for an exact phrase
Find 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/everything
Search for an exact phrase
Find 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/everything
Find words near each other
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/everything
Compare keyword, phrase and proximity searches
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/everything
Compare keyword, phrase and proximity searches
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/everything
Compare keyword, phrase and proximity searches
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/everything
Find a company and product near each other
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/everything
Search for an exact event name
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/everything
Search for an exact event name
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/everything
Article 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. |
Find 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/everything
Find 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/everything
Search between exact times
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/everything
Languages
| 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. |
Exclude French articles and publishers in France
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/everything
Find 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/everything
Compare languages and sources
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/everything
Find business news in one language
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/everything
Compare company sentiment across languages
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/everything
Compare news by language and region
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/everything
Source
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.source.bias | string | No | Exclude publishers with these political biases, separated by commas. 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 publishers' political bias, separated by commas. 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. |
Find 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/everything
Find 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/everything
Choose a source and language
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/everything
Find 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/everything
Compare source bias across regions
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/everything
Find 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/everything
Find 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/everything
Authors
| 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. |
Find 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/everything
Find 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/everything
Choose an author and language
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/everything
Find an author's articles on a subject
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/everything
Compare sentiment by author
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/everything
Follow an author's coverage over time
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/everything
Find 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/everything
Find 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/everything
Categories
| Parameter | Type | Required | Description |
|---|---|---|---|
category.id | string | No | Category IDs, separated by commas (max 3). Use IPTC Media Topic IDs such as medtop:04000000. Example: medtop:04000000. |
ignore.category.id | string | No | Exclude these categories (comma-separated, max 3). |
Find articles from a specific category (e.g., "Sport")
Find articles in 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/everything
Find articles in the Finance Category
Find 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/everything
Choose a category and language
Find 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/everything
Track category coverage over time
Get finance articles in date order to track coverage over time.
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/everything
Find category articles with images
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/everything
Compare sentiment across categories
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&sort.by=sentiment.overall.score&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": "sentiment.overall.score",
"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": "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(["category.id" => "medtop:20000003,medtop:11000000,medtop:20000607", "sentiment.overall.polarity" => "positive", "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("category.id", "medtop:20000003,medtop:11000000,medtop:20000607")
q.Set("sentiment.overall.polarity", "positive")
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?category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&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?category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&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/everything
Topics
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.topic.id | string | No | Exclude these topics (comma-separated, max 3). |
topic.id | string | No | Topic IDs, separated by commas (max 3). Find IDs with /v1/suggest/topics, for example industry.technology_news. Example: industry.technology_news. |
Find articles from a specific topic (e.g., "crypto_news")
Find articles in 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/everything
Compare sentiment across topics
Compare sentiment across 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/everything
Compare topic coverage by language
Compare topic coverage in different 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/everything
Find a subject within a topic
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/everything
Find expert coverage of a topic
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/everything
Industries
| 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. |
Follow industry coverage over time
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/everything
Find innovation news across industries
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/everything
Entities, 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 up to 3 known location names, separated by commas. Use /v1/suggest/entities to check the spelling. An unknown name returns 400 ER0218. Range: 0–120 characters. Example: New York City. |
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. |
Find 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/everything
Find 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/everything
Find 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/everything
Find articles mentioning both entities
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/everything
Track entity mentions 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/everything
Find entities mentioned together
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/everything
Find sentiment about an entity in market news
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/everything
Find 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/everything
Find 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/everything
Compare sentiment about a person 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/everything
Find articles about a person and organization
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/everything
Track negative coverage of a public figure
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/everything
Find mentions of a person in research news
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/everything
Find 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/everything
Find 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/everything
Include one organization and exclude another
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/everything
Follow competitor coverage
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/everything
Track company sentiment around financial news
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/everything
Find company news about social responsibility
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/everything
Follow leadership changes
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/everything
Find articles about a specific disaster (e.g., "Earthquake")
curl "https://api.apitube.io/v1/news/everything?disaster.name=Great%20Hanshin%20Earthquake&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"disaster.name": "Great Hanshin Earthquake",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "disaster.name": "Great Hanshin 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" => "Great Hanshin 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", "Great Hanshin 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=Great%20Hanshin%20Earthquake&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Great%20Hanshin%20Earthquake
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Find articles about multiple disasters (e.g., "Earthquake" and "Tsunami")
curl "https://api.apitube.io/v1/news/everything?disaster.name=Great%20Hanshin%20Earthquake,2017%20Pedrógão%20Grande%20Wildfire&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"disaster.name": "Great Hanshin Earthquake,2017 Pedrógão Grande Wildfire",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "disaster.name": "Great Hanshin Earthquake,2017 Pedrógão Grande Wildfire", "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" => "Great Hanshin Earthquake,2017 Pedrógão Grande Wildfire", "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", "Great Hanshin Earthquake,2017 Pedrógão Grande Wildfire")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public 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=Great%20Hanshin%20Earthquake,2017%20Pedrógão%20Grande%20Wildfire&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Great%20Hanshin%20Earthquake,2017%20Pedrógão%20Grande%20Wildfire
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Find articles about a disaster while ignoring another
curl "https://api.apitube.io/v1/news/everything?disaster.name=Great%20Hanshin%20Earthquake&ignore.disaster.name=Great%20Hanshin%20Earthquake&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"disaster.name": "Great Hanshin Earthquake",
"ignore.disaster.name": "Great Hanshin Earthquake",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "disaster.name": "Great Hanshin Earthquake", "ignore.disaster.name": "Great Hanshin 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" => "Great Hanshin Earthquake", "ignore.disaster.name" => "Great Hanshin 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", "Great Hanshin Earthquake")
q.Set("ignore.disaster.name", "Great Hanshin 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=Great%20Hanshin%20Earthquake&ignore.disaster.name=Great%20Hanshin%20Earthquake&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Great%20Hanshin%20Earthquake&ignore.disaster.name=Great%20Hanshin%20Earthquake
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Find disaster coverage by region
curl "https://api.apitube.io/v1/news/everything?disaster.name=Great%20Hanshin%20Earthquake&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": "Great Hanshin Earthquake",
"location.name": "Japan",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "disaster.name": "Great Hanshin 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" => "Great Hanshin 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", "Great Hanshin 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=Great%20Hanshin%20Earthquake&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=Great%20Hanshin%20Earthquake&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/everything
Find 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/everything
Find 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/everything
Find articles about a disease while ignoring another
curl "https://api.apitube.io/v1/news/everything?disease.name=malaria&ignore.disease.name=dengue%20fever&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 fever",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "disease.name": "malaria", "ignore.disease.name": "dengue fever", "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 fever", "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 fever")
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%20fever&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%20fever&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/everything
Follow a disease outbreak
curl "https://api.apitube.io/v1/news/everything?disease.name=malaria&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": "malaria",
"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": "malaria", "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" => "malaria", "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", "malaria")
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=malaria&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=malaria&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/everything
Find articles about a specific brand (e.g., "Apple")
curl "https://api.apitube.io/v1/news/everything?brand.name=Coca-Cola&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"brand.name": "Coca-Cola",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "brand.name": "Coca-Cola", "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" => "Coca-Cola", "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", "Coca-Cola")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public 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=Coca-Cola&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Coca-Cola
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Find articles about multiple brands (e.g., "Apple" and "Google")
curl "https://api.apitube.io/v1/news/everything?brand.name=Coca-Cola,Samsung%20Galaxy&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"brand.name": "Coca-Cola,Samsung Galaxy",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "brand.name": "Coca-Cola,Samsung Galaxy", "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" => "Coca-Cola,Samsung Galaxy", "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", "Coca-Cola,Samsung Galaxy")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public 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=Coca-Cola,Samsung%20Galaxy&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Coca-Cola,Samsung%20Galaxy
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Include one brand and exclude another
curl "https://api.apitube.io/v1/news/everything?brand.name=Coca-Cola&ignore.brand.name=Coca-Cola&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"brand.name": "Coca-Cola",
"ignore.brand.name": "Coca-Cola",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "brand.name": "Coca-Cola", "ignore.brand.name": "Coca-Cola", "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" => "Coca-Cola", "ignore.brand.name" => "Coca-Cola", "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", "Coca-Cola")
q.Set("ignore.brand.name", "Coca-Cola")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public 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=Coca-Cola&ignore.brand.name=Coca-Cola&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Coca-Cola&ignore.brand.name=Coca-Cola
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Compare brand sentiment across markets
curl "https://api.apitube.io/v1/news/everything?brand.name=Tesla%20Robotaxi&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 Robotaxi",
"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 Robotaxi", "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 Robotaxi", "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 Robotaxi")
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%20Robotaxi&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%20Robotaxi&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/everything
Find brand sponsorship coverage
curl "https://api.apitube.io/v1/news/everything?brand.name=Coca-Cola,Samsung%20Galaxy,iPhone%20Air&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": "Coca-Cola,Samsung Galaxy,iPhone Air",
"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": "Coca-Cola,Samsung Galaxy,iPhone Air", "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" => "Coca-Cola,Samsung Galaxy,iPhone Air", "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", "Coca-Cola,Samsung Galaxy,iPhone Air")
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=Coca-Cola,Samsung%20Galaxy,iPhone%20Air&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=Coca-Cola,Samsung%20Galaxy,iPhone%20Air&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/everything
Follow negative coverage of a brand
curl "https://api.apitube.io/v1/news/everything?brand.name=Tesla%20Robotaxi&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 Robotaxi",
"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 Robotaxi", "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 Robotaxi", "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 Robotaxi")
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%20Robotaxi&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%20Robotaxi&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/everything
Find articles about a specific sport (e.g., "Football")
curl "https://api.apitube.io/v1/news/everything?sport.name=Road%20tennis&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sport.name": "Road tennis",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "sport.name": "Road tennis", "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" => "Road tennis", "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", "Road tennis")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public 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=Road%20tennis&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Road%20tennis
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Find articles about multiple sports
curl "https://api.apitube.io/v1/news/everything?sport.name=Road%20tennis,Nike%20Hoop%20Summit&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sport.name": "Road tennis,Nike Hoop Summit",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "sport.name": "Road tennis,Nike Hoop Summit", "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" => "Road tennis,Nike Hoop Summit", "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", "Road tennis,Nike Hoop Summit")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public 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=Road%20tennis,Nike%20Hoop%20Summit&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Road%20tennis,Nike%20Hoop%20Summit
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Find articles about a sport while ignoring another
curl "https://api.apitube.io/v1/news/everything?sport.name=Road%20tennis&ignore.sport.name=Road%20tennis&api_key=YOUR_API_KEY"
import requests
response = requests.get(
"https://api.apitube.io/v1/news/everything",
params={
"sport.name": "Road tennis",
"ignore.sport.name": "Road tennis",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "sport.name": "Road tennis", "ignore.sport.name": "Road tennis", "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" => "Road tennis", "ignore.sport.name" => "Road tennis", "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", "Road tennis")
q.Set("ignore.sport.name", "Road tennis")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public 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=Road%20tennis&ignore.sport.name=Road%20tennis&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.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=Road%20tennis&ignore.sport.name=Road%20tennis
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/everything
Event 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). |
Find 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/everything
Find 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/everything
Find articles about an event while ignoring another
curl "https://api.apitube.io/v1/news/everything?event.name=Black%20Friday&ignore.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",
"ignore.event.name": "Black Friday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "event.name": "Black Friday", "ignore.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", "ignore.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("ignore.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&ignore.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&ignore.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/everything
Compare sentiment in event coverage
curl "https://api.apitube.io/v1/news/everything?event.name=Super%20Bowl%20Sunday&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": "Super Bowl Sunday",
"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": "Super Bowl Sunday", "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" => "Super Bowl Sunday", "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", "Super Bowl Sunday")
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=Super%20Bowl%20Sunday&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=Super%20Bowl%20Sunday&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/everything
Sentiment
| Parameter | Type | Required | Description |
|---|---|---|---|
entity.sentiment.polarity | string | No | Filter by the tone of coverage about an entity. Choose the entity with entity.id, person.name, organization.name, location.name, brand.name, event.name, disease.name, disaster.name or sport.name. Without one of these fields, the API returns 400 ER0293. 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 | Filter by the tone of the article body. 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 | Find articles whose title and body have the same tone. |
sentiment.mixed | boolean | No | Find articles whose title and body have different tones. |
sentiment.overall.polarity | string | No | Filter by the overall tone of the article. 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 | Filter by the tone of the article title. 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 difference between title and body sentiment scores. Range: 0–2. |
sentiment_gap.min | number | No | Minimum difference between title and body sentiment scores. Range: 0–2. |
Find positive news
Find articles with 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/everything
Find positive news from a Specific Country
Find 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/everything
Find positive news in the Last 24 Hours
Find 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/everything
Find articles with Positive Sentiment and a Specific Title
Find 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/everything
Filter several sentiment fields
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/everything
Compare sentiment 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/everything
Compare sentiment across source types
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/everything
Find sentiment in product reviews
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/everything
Find articles with mixed sentiment
Find 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/everything
Find articles with consistent sentiment
Find articles whose title and body have the same sentiment label.
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/everything
Find clickbait articles
Find articles whose title has strong positive or negative sentiment that differs from the body.
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/everything
Exclude clickbait and choose verified sources
Find 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/everything
Filter by sentiment gap – find articles with significant title/body mismatch
Find 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/everything
Find articles with similar title and body sentiment
Find 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/everything
Combined clickbait analysis for political news
Find political articles flagged as clickbait.
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/everything
Media
| 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 | Find images at least 1080px wide with a square or 4:5 aspect ratio for Instagram. |
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 | Find landscape images at least 800px wide for Twitter Cards. |
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. |
Find 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/everything
Find 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/everything
Find articles with multiple images and videos
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/everything
Find news with large images
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/everything
Find education articles with videos
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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find images with similar dimensions
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/everything
Find 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/everything
Readability
| 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. |
Find 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/everything
Find 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/everything
Find English news about London and exclude 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/everything
Search 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/everything
Local 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/everything
Regional 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/everything
Find coverage of geopolitical events
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/everything
Find business news about several places
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/everything
Find natural disaster coverage
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/everything
Compare tourism sentiment 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/everything
Search 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/everything
Bounding 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/everything
Ring 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/everything
Exclude 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/everything
Articles 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/everything
Articles 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/everything
Regional 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/everything
Article 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 | Find articles that are not duplicates, have a rank of at least 5 and include images and an 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/everything
Get 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/everything
Get 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/everything
Get 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/everything
Find easy-to-read articles (reading ease 70–90)
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/everything
Get 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/everything
Combine 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/everything
Filter by article quality
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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Find 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/everything
Combine article quality filters
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/everything
Find 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/everything
Follow breaking news only
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/everything
Sorting
| 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. |
Find 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/everything
Sort by sentiment score, highest first
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/everything
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/everything
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/everything
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/everything
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/everything
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/everything
Sort images by size
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/everything
Combine ranking and filters
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/everything
Show articles with more media first
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/everything
Find long analysis articles
curl "https://api.apitube.io/v1/news/everything?category.id=medtop:04000000&sort.by=read_time&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": "read_time",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())
const params = new URLSearchParams({ "category.id": "medtop:04000000", "sort.by": "read_time", "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" => "read_time", "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", "read_time")
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=read_time&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=read_time&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/everything
Find articles by sentiment
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/everything
Find long articles from highly ranked sources
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/everything
Find articles with mixed sentiment
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/everything
Sort by source trust
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/everything
Combine source quality and article 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/everything
Find articles ranked by engagement
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/everything
Find highly ranked 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/everything
Pagination
| 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; Free is capped at 10, Starter at 50, Basic at 200). Range: 1–250. Default: 100. |
Find 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/everything
Fetch articles in pages
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/everything
Combine filters and pagination
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/everything
Faceting
| Parameter | Type | Required | Description |
|---|---|---|---|
facet | string | No | Return article counts grouped by the fields in facet.field. One of: 0, 1. |
facet.field | string | No | Fields to count by, separated by commas (max 5). Allowed 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 | Count articles within date or numeric intervals. One of: 0, 1. |
facet.range.end | string | No | End value for range faceting (required with facet.range). |
facet.range.field | string | No | Field to group into date or numeric intervals. 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 | Size of each interval. Use a time span for dates, such as +1DAY, or a number for numeric fields. 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/everything
Faceting 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/everything
Faceting 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/everything
Faceting 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/everything
Faceting 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/everything
Count articles by language
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/everything
Faceting 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/everything
Count articles by publisher bias
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/everything
Faceting 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/everything
Build a filter menu
Use counts by field to build a filter sidebar:
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/everything
Count articles by hour of the 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/everything
Count articles by day of the 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/everything
Media 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/everything
Source 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/everything
Breaking 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/everything
Content 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/everything
Compare sentiment in titles, bodies and whole articles
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/everything
Yearly 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/everything
Content 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/everything
Weekday 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/everything
Sentiment 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/everything
Most 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/everything
Time 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/everything
Date 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/everything
Date 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/everything
Date 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/everything
Count articles by sentiment score range
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/everything
Reading 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/everything
Source 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/everything
Combined 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/everything
Track image and video counts over time
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/everything
Building a sentiment timeline dashboard
Track how sentiment about a brand changes over time:
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/everything
Compare subjects over the same period
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/everything
Highlighting
| 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 | List extra terms to highlight, separated by commas. Terms from title are included automatically. Requires hl=1. This parameter only changes highlighting; it does not filter articles. 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/everything
Highlighting 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/everything
Highlighting 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/everything
Custom 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/everything
Custom 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/everything
Combined 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/everything
Highlighting 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/everything
Highlight synonyms and related word forms
Highlighting includes synonyms and related word forms. For example, searching for "innovation" also highlights "innovative", "innovate" and "innovator".
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/everything
Building a search results page
Return highlighted text and selected fields 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/everything
Field 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. |
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/everything
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/everything
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/everything
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/everything
Return fewer fields for a combined news feed
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/everything
Sentiment 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/everything
Lightweight 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/everything
Return fewer fields for large result sets
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/everything
Export
| 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. |
Related
- Search articles — endpoint, request examples, limits and errors.
- Response format — returned fields and pagination links.
- Usage examples — complete requests grouped by task.