Local News
The /v1/news/local endpoint returns news around a single geographic point — given either lat/lng coordinates or a place name — and ranks the results by distance. Unlike the plain geo filter on /v1/news/everything, it sorts by proximity, adds distance_km and nearest_location to every article, and can attach an optional local intelligence dashboard.
Endpoint
GET /v1/news/local
POST /v1/news/localBoth methods are equivalent: parameters can be passed as query parameters (GET) or as a JSON body (POST).
Local endpoint vs. the geo filter
/v1/news/local uses bare lat, lng and radius parameters, while the geo filter on /v1/news/everything uses the dotted location.lat, location.lng and location.radius form. Both find articles near a point, but /v1/news/local adds features the filter does not: proximity sorting, per-article distance_km and nearest_location, place-name geocoding, relevance ranking presets, and aggregate local_insights. If you only need a geographic constraint on a normal search, use the geo filter instead.
Query Parameters
The endpoint accepts every filter available on /v1/news/everything, plus the local-specific geo parameters in the Geo and local group below.
You must supply a center — either both lat and lng, or a place. Explicit coordinates take precedence over place. prompt works here too on Basic and above, but the center still has to come from lat/lng or place; it is never inferred from the prompt.
Prompt
Plain-language description of what you want; translated into the filters below.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | No | Plain-language description of the news you want, e.g. "Elon Musk, Tesla, news for the last 10 days". It is translated into the regular filters below before the search runs, and the resulting parameters are returned in meta.prompt. Explicit parameters always win over the prompt. Costs 2 extra points when the wording has not been parsed before (repeats are served from cache). Available on Basic and above — on Free and Starter the request fails with 403 ER0706. Range: 3–500 characters. |
Request for Articles Described in Plain Language
This request asks for recent English-language coverage of Tesla and Elon Musk without naming a single filter.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localTitle and full-text search
Search inside article titles. Limited to a 31-day published_at window.
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.title | string | No | Exclude articles containing this text in the title. Range: 2–100 characters. |
query | string | No | Boolean query language over the same fields as the flat filters: AND / OR / NOT, parentheses, field:value predicates, quoted phrases with proximity, ranges [a TO b] and target-aware entity blocks {{...}}. A bare term searches the title. Combined with any flat filters through AND. Same 31-day published_at window as title. Parse errors return ER0701–ER0712. Range: 0–4000 characters. Example: bitcoin AND NOT (etf OR futures). Accepted by the API but not part of the published OpenAPI specification, so generated SDKs do not expose it. |
title | string | No | Search in article titles. Supports phrase search with proximity: "climate change"~2. Title search is limited to a 31-day published_at window: without published_at.start / published_at.end the last 31 days are searched, a wider explicit range returns ER0110. Range: 2–100 characters. |
title_ends_with | string | No | Filter articles whose title ends with the given text. Same 31-day window limit as title. Range: 2–100 characters. |
title_pattern | string | No | Filter articles whose title matches the given pattern. Same 31-day window limit as title. Range: 2–200 characters. |
title_starts_with | string | No | Filter articles whose title starts with the given text. Same 31-day window limit as title. Range: 2–100 characters. |
Request for Articles with a Specific Title Keyword
This request retrieves news articles with "technology" in their titles.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=technology&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "technology",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "technology", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "technology", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Articles with Multiple Title Keywords
This request retrieves news articles that contain both "AI" and "innovation" in their titles. Multiple comma- or space-separated keywords use AND logic — every word must be present (order does not matter). To match articles containing either word, send one request per keyword and merge the results.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=AI,innovation&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "AI,innovation",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "AI,innovation", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "AI,innovation", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Articles with Titles Excluding Certain Words
This request retrieves news articles that do not have "celebrity" in their titles.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&ignore.title=celebrity&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"ignore.title": "celebrity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "ignore.title": "celebrity", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "ignore.title" => "celebrity", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCombined Title Filters for Specific News
This request combines title filters to find articles about AI but not about job losses.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=AI&ignore.title=layoffs,job%20losses&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "AI",
"ignore.title": "layoffs,job losses",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "AI", "ignore.title": "layoffs,job losses", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "AI", "ignore.title" => "layoffs,job losses", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localExact Phrase Search (Solr Style)
This request finds articles with the exact phrase "breaking news" in the title.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22breaking%20news%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"breaking news\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"breaking news\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"breaking news\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localExact Phrase Search (Solr Style)
This request finds articles with the exact phrase "breaking news" in the title.
Search for exact organization or person names:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22Federal%20Reserve%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"Federal Reserve\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"Federal Reserve\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"Federal Reserve\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localExact Phrase Search (Solr Style)
This request finds articles with the exact phrase "breaking news" in the title.
Search for exact organization or person names:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22United%20Nations%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"United Nations\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"United Nations\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"United Nations\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localProximity Search with Slop (Solr Style)
Find articles where "Apple" and "iPhone" appear near each other:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22Apple%20iPhone%22~5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"Apple iPhone\"~5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"Apple iPhone\"~5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"Apple iPhone\"~5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localComparison: Regular vs. Phrase vs. Proximity
Regular search (finds keywords in any order, with synonyms):
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=artificial%20intelligence&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "artificial intelligence",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "artificial intelligence", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "artificial intelligence", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localComparison: Regular vs. Phrase vs. Proximity
Regular search (finds keywords in any order, with synonyms):
Matches: "Artificial Intelligence" "Intelligence in Artificial Systems", "AI", "intelligent artificial systems"
Phrase search (exact phrase only):
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22artificial%20intelligence%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"artificial intelligence\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"artificial intelligence\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"artificial intelligence\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localComparison: Regular vs. Phrase vs. Proximity
Regular search (finds keywords in any order, with synonyms):
Matches: "Artificial Intelligence" "Intelligence in Artificial Systems", "AI", "intelligent artificial systems"
Phrase search (exact phrase only):
Matches only: "Artificial Intelligence", "artificial intelligence" (exact phrase)
Proximity search (words near each other):
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22artificial%20intelligence%22~3&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"artificial intelligence\"~3",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"artificial intelligence\"~3", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"artificial intelligence\"~3", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCompany + Product Proximity Search
Find articles mentioning company and product name near each other:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"Tesla Cybertruck\"~3",
"published_at.start": "NOW-7DAYS",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"Tesla Cybertruck\"~3", "published_at.start": "NOW-7DAYS", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"Tesla Cybertruck\"~3", "published_at.start" => "NOW-7DAYS", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEvent Names with Exact Match
Search for specific event names:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22Super%20Bowl%202024%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"Super Bowl 2024\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"Super Bowl 2024\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"Super Bowl 2024\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEvent Names with Exact Match
Search for specific event names:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=%22World%20Cup%20Final%22&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "\"World Cup Final\"",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "\"World Cup Final\"", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "\"World Cup Final\"", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localArticle lookup
| Parameter | Type | Required | Description |
|---|---|---|---|
article.id | string | No | Comma-separated article IDs (max 5). Example: 12345. |
Date and time
| Parameter | Type | Required | Description |
|---|---|---|---|
published_at | string | No | Exact date (creates 24-hour range). Format: YYYY-MM-DD or ISO 8601. Example: 2025-01-15. |
published_at.end | string | No | End of date range. Format: YYYY-MM-DD or ISO 8601. Combined with a title search the range may not exceed 31 days (ER0110). Example: 2025-01-31. |
published_at.start | string | No | Start of date range. Format: YYYY-MM-DD or ISO 8601. Combined with a title search the range may not exceed 31 days (ER0110). Example: 2025-01-01. |
Request to get news articles within a specific date range
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"published_at.start": "2022-01-01",
"published_at.end": "2022-01-31",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news using a relative time range
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"published_at.start": "NOW-7DAYS",
"published_at.end": "NOW",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "published_at.start": "NOW-7DAYS", "published_at.end": "NOW", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "published_at.start" => "NOW-7DAYS", "published_at.end" => "NOW", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localComplex Date-Range Analysis with Precise Timestamps
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localLanguages
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.language.code | string | No | Exclude articles in these languages (comma-separated, max 3). Example: zh,ar. |
language.code | string | No | Comma-separated ISO 639-1 language codes (max 3). Example: en. |
Request to get news articles excluding those from France and in the French language
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"ignore.source.country.code": "fr",
"ignore.language.code": "fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "ignore.source.country.code": "fr", "ignore.language.code": "fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "ignore.source.country.code" => "fr", "ignore.language.code" => "fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles in the English and French languages
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&language.code=en,fr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"language.code": "en,fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "language.code": "en,fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "language.code" => "en,fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMulti-language Analysis with Source Filtering
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localLanguage-Specific Business News
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&language.code=zh,ko&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"language.code": "zh,ko",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "language.code": "zh,ko", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "language.code" => "zh,ko", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMultilingual Organization Sentiment Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRegional Language News Comparison
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSource
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.source.bias | string | No | Exclude sources with this media bias (comma-separated). Values: left, center, right. Example: right. |
ignore.source.country.code | string | No | Exclude sources from these countries (comma-separated, max 3). Example: us. |
ignore.source.domain | string | No | Exclude these source domains (comma-separated, max 3). |
ignore.source.id | string | No | Exclude these source IDs (comma-separated, max 3). |
is_premium_source | boolean | No | Filter by premium source status. |
is_verified_source | boolean | No | Filter by verified source status. |
source.bias | string | No | Filter by media bias (comma-separated). Values: left, center, right. Example: left. |
source.country.code | string | No | Filter by source country ISO 3166-1 alpha-2 codes (comma-separated, max 3). Example: us. |
source.domain | string | No | Comma-separated source domains (max 3). Example: nytimes.com. |
source.id | string | No | Comma-separated source IDs (max 3). Example: 100. |
source.rank.opr.max | integer | No | Maximum Open PageRank score. Range: min 0. |
source.rank.opr.min | integer | No | Minimum Open PageRank score. Range: min 0. |
Request to get news articles from a specific source (e.g., "theguardian.com")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&source.domain=theguardian.com&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"source.domain": "theguardian.com",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "source.domain": "theguardian.com", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "source.domain" => "theguardian.com", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles from multiple sources (e.g., "theguardian.com" and "nytimes.com")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&source.domain=theguardian.com,nytimes.com&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"source.domain": "theguardian.com,nytimes.com",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "source.domain": "theguardian.com,nytimes.com", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "source.domain" => "theguardian.com,nytimes.com", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles from a specific source and in a specific language (e.g., "theguardian.com" and "English")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&source.domain=theguardian.com&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"source.domain": "theguardian.com",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "source.domain": "theguardian.com", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "source.domain" => "theguardian.com", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles with rank between 0.5 and 0.9
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"source.rank.opr.min": "5",
"source.rank.opr.max": "9",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCross-Regional Media Bias Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for premium source articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_premium_source=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_premium_source": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_premium_source": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_premium_source" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for verified source articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_verified_source": "1",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localAuthors
| Parameter | Type | Required | Description |
|---|---|---|---|
author.id | string | No | Comma-separated author IDs (max 3). |
author.name | string | No | Filter by author name (comma-separated, max 3). Range: 0–100 characters. |
has_author | boolean | No | Filter articles with/without author. |
ignore.author.id | string | No | Exclude these author IDs (comma-separated, max 3). |
ignore.author.name | string | No | Exclude articles by these authors (comma-separated, max 3). Range: 0–100 characters. |
Request to get news articles by a specific author (e.g., "AFP")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&author.name=AFP&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"author.name": "AFP",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "author.name": "AFP", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "author.name" => "AFP", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles by multiple authors (e.g., "AFP" and "Reuters")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&author.name=AFP,Reuters&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"author.name": "AFP,Reuters",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "author.name": "AFP,Reuters", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "author.name" => "AFP,Reuters", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles by a specific author and in a specific language (e.g., "AFP" and "English")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&author.name=AFP&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"author.name": "AFP",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "author.name": "AFP", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "author.name" => "AFP", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localAuthor Expertise Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localAuthor Sentiment Bias Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"author.name": "AFP,Reuters",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "author.name": "AFP,Reuters", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "author.name" => "AFP,Reuters", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localAuthor Topic Evolution Tracking
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for articles with attributed authors
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&has_author=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_author": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "has_author": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "has_author" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for articles without authors
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&has_author=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_author": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "has_author": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "has_author" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCategories
| Parameter | Type | Required | Description |
|---|---|---|---|
category.id | string | No | Comma-separated category IDs (max 3). Example: iab-1. |
ignore.category.id | string | No | Exclude these categories (comma-separated, max 3). |
Request to get news articles from a specific category (e.g., "Sport")
This request retrieves news articles that fall under the "sport" category.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:15000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"category.id": "medtop:15000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "category.id": "medtop:15000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "category.id" => "medtop:15000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Articles in the Finance Category
This request retrieves news articles in the "finance" category.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Articles in a Category and Filtered by Language
This request retrieves news articles in the "politics" category that are in French.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:11000000&language.code=fr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"category.id": "medtop:11000000",
"language.code": "fr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "category.id": "medtop:11000000", "language.code": "fr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "category.id" => "medtop:11000000", "language.code" => "fr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCategory Time-Series Analysis
This request enables time-series analysis of articles in the "finance" category over a specific time period.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCategory-Based Media Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCross-Category Sentiment Comparison
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&sort.by=category.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"category.id": "medtop:20000003,medtop:11000000,medtop:20000607",
"sentiment.overall.polarity": "positive",
"sort.by": "category.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "category.id": "medtop:20000003,medtop:11000000,medtop:20000607", "sentiment.overall.polarity": "positive", "sort.by": "category.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "category.id" => "medtop:20000003,medtop:11000000,medtop:20000607", "sentiment.overall.polarity" => "positive", "sort.by" => "category.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("category.id", "medtop:20000003,medtop:11000000,medtop:20000607")
q.Set("sentiment.overall.polarity", "positive")
q.Set("sort.by", "category.id")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&sort.by=category.id&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:20000003,medtop:11000000,medtop:20000607&sentiment.overall.polarity=positive&sort.by=category.id
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localTopics
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.topic.id | string | No | Exclude these topics (comma-separated, max 3). |
topic.id | string | No | Comma-separated topic IDs (max 3). Example: technology. |
Request to get news articles from a specific topic (e.g., "crypto_news")
This request retrieves news articles that fall under the "crypto news" topic.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&topic.id=industry.crypto_news&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"topic.id": "industry.crypto_news",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "topic.id": "industry.crypto_news", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "topic.id" => "industry.crypto_news", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMulti-Topic Sentiment Analysis
This request analyzes sentiment across multiple related topics.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localComparative Topic Analysis with Language Filtering
This request compares coverage of different topics across specific languages.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localTopic and Entity Intersection Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localTopic-Based Expert Opinion Tracking
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localIndustries
| Parameter | Type | Required | Description |
|---|---|---|---|
ignore.industry.id | string | No | Exclude these industries (comma-separated, max 3). |
industry.id | string | No | Comma-separated industry IDs (max 3). Example: 1. |
Industry Sector Performance Tracking
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"industry.id": "400,438",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCross-Industry Innovation Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"industry.id": "400,438",
"title": "innovation",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEntities, people, organizations, brands
| Parameter | Type | Required | Description |
|---|---|---|---|
brand.name | string | No | Filter by brand name (comma-separated, max 3). Range: 0–120 characters. |
disaster.name | string | No | Filter by natural disaster name (comma-separated, max 3). Range: 0–120 characters. |
disease.name | string | No | Filter by disease name (comma-separated, max 3). Range: 0–120 characters. |
entity.id | string | No | Comma-separated entity IDs (max 3). Example: 12345. |
event.name | string | No | Filter by event name (comma-separated, max 3). Range: 0–120 characters. |
ignore.brand.name | string | No | Exclude articles mentioning these brands (comma-separated, max 3). Range: 0–120 characters. |
ignore.disaster.name | string | No | Exclude articles mentioning these disasters (comma-separated, max 3). Range: 0–120 characters. |
ignore.disease.name | string | No | Exclude articles mentioning these diseases (comma-separated, max 3). Range: 0–120 characters. |
ignore.entity.id | string | No | Exclude these entity IDs (comma-separated, max 3). |
ignore.event.name | string | No | Exclude articles mentioning these events (comma-separated, max 3). Range: 0–120 characters. |
ignore.location.name | string | No | Exclude articles mentioning these locations (comma-separated, max 3). Range: 0–120 characters. |
ignore.organization.name | string | No | Exclude articles mentioning these organizations (comma-separated, max 3). Range: 0–120 characters. |
ignore.person.name | string | No | Exclude articles mentioning these persons (comma-separated, max 3). Range: 0–120 characters. |
ignore.sport.name | string | No | Exclude articles mentioning these sports (comma-separated, max 3). Range: 0–120 characters. |
location.name | string | No | Filter by location name (comma-separated, max 3). Range: 0–120 characters. Example: New York. |
organization.name | string | No | Filter by organization name (comma-separated, max 3). Range: 0–120 characters. Example: Google. |
person.name | string | No | Filter by person name (comma-separated, max 3). Range: 0–120 characters. Example: Elon Musk. |
sport.name | string | No | Filter by sport name (comma-separated, max 3). Range: 0–120 characters. |
Request to get news articles about a specific entity (e.g., "Brad Pitt")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&entity.id=1278268&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"entity.id": "1278268",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "entity.id": "1278268", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "entity.id" => "1278268", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about multiple entities (e.g., "Brad Pitt" and "Angelina Jolie")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&entity.id=1278268,1282301&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"entity.id": "1278268,1282301",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "entity.id": "1278268,1282301", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "entity.id" => "1278268,1282301", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about an entity while ignoring another
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&entity.id=1278268&ignore.entity.id=315&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"entity.id": "1278268",
"ignore.entity.id": "315",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "entity.id": "1278268", "ignore.entity.id": "315", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "entity.id" => "1278268", "ignore.entity.id" => "315", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEntity Correlation Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"entity.id": "1278268,1282301",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEntity Mention Tracking Over Time
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEntity Co-occurrence Network Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&entity.id=1278268&sort.by=published_at&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"entity.id": "1278268",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "entity.id": "1278268", "sort.by": "published_at", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "entity.id" => "1278268", "sort.by" => "published_at", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEntity Impact on Market Sentiment
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about a specific person (e.g., "Elon Musk")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&person.name=Elon%20Musk&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"person.name": "Elon Musk",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "person.name": "Elon Musk", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "person.name" => "Elon Musk", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about multiple people (e.g., "Elon Musk" and "Donald Trump")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&person.name=Elon%20Musk,Donald%20Trump&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"person.name": "Elon Musk,Donald Trump",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "person.name": "Elon Musk,Donald Trump", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "person.name" => "Elon Musk,Donald Trump", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localPerson Sentiment Analysis Across Sources
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCross-reference Person with Organizations
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localPublic Figure Controversy Timeline
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localPerson Mention in Research Publications
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"person.name": "Stephen Hawking",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about a specific organization (e.g., "Google")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&organization.name=Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"organization.name": "Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "organization.name": "Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "organization.name" => "Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about multiple organizations (e.g., "Google" and "Apple")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&organization.name=Google,Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"organization.name": "Google,Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "organization.name": "Google,Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "organization.name" => "Google,Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about an organization while ignoring another (e.g., "Google" and excluding "Apple")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&organization.name=Google&ignore.organization.name=Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"organization.name": "Google",
"ignore.organization.name": "Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "organization.name": "Google", "ignore.organization.name": "Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "organization.name" => "Google", "ignore.organization.name" => "Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCompetitive Intelligence Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localOrganization Sentiment Tracking During Financial Events
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCorporate Social Responsibility Coverage
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localExecutive Leadership Transition Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"organization.name": "Google",
"title": "CEO",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about a specific disaster (e.g., "Earthquake")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"disaster.name": "earthquake",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disaster.name": "earthquake", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disaster.name" => "earthquake", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("disaster.name", "earthquake")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about multiple disasters (e.g., "Earthquake" and "Tsunami")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake,tsunami&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"disaster.name": "earthquake,tsunami",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disaster.name": "earthquake,tsunami", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disaster.name" => "earthquake,tsunami", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("disaster.name", "earthquake,tsunami")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake,tsunami&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake,tsunami
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about a disaster while ignoring another
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=hurricane&ignore.disaster.name=tornado&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"disaster.name": "hurricane",
"ignore.disaster.name": "tornado",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disaster.name": "hurricane", "ignore.disaster.name": "tornado", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disaster.name" => "hurricane", "ignore.disaster.name" => "tornado", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("disaster.name", "hurricane")
q.Set("ignore.disaster.name", "tornado")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=hurricane&ignore.disaster.name=tornado&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=hurricane&ignore.disaster.name=tornado
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localDisaster Impact Analysis by Region
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake&location.name=Japan&sort.by=published_at&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"disaster.name": "earthquake",
"location.name": "Japan",
"sort.by": "published_at",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disaster.name": "earthquake", "location.name": "Japan", "sort.by": "published_at", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disaster.name" => "earthquake", "location.name" => "Japan", "sort.by" => "published_at", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("disaster.name", "earthquake")
q.Set("location.name", "Japan")
q.Set("sort.by", "published_at")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake&location.name=Japan&sort.by=published_at&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disaster.name=earthquake&location.name=Japan&sort.by=published_at
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about a specific disease (e.g., "COVID-19")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disease.name=COVID-19&category.id=medtop:07000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"disease.name": "COVID-19",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disease.name": "COVID-19", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disease.name" => "COVID-19", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about multiple diseases
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"disease.name": "COVID-19,Influenza",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disease.name": "COVID-19,Influenza", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disease.name" => "COVID-19,Influenza", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about a disease while ignoring another
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disease.name=malaria&ignore.disease.name=dengue&category.id=medtop:07000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"disease.name": "malaria",
"ignore.disease.name": "dengue",
"category.id": "medtop:07000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disease.name": "malaria", "ignore.disease.name": "dengue", "category.id": "medtop:07000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disease.name" => "malaria", "ignore.disease.name" => "dengue", "category.id" => "medtop:07000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("disease.name", "malaria")
q.Set("ignore.disease.name", "dengue")
q.Set("category.id", "medtop:07000000")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disease.name=malaria&ignore.disease.name=dengue&category.id=medtop:07000000&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disease.name=malaria&ignore.disease.name=dengue&category.id=medtop:07000000
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localDisease Outbreak Tracking
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disease.name=measles&category.id=medtop:07000000&published_at.start=2024-01-01&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"disease.name": "measles",
"category.id": "medtop:07000000",
"published_at.start": "2024-01-01",
"sort.by": "published_at",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "disease.name": "measles", "category.id": "medtop:07000000", "published_at.start": "2024-01-01", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "disease.name" => "measles", "category.id" => "medtop:07000000", "published_at.start" => "2024-01-01", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("disease.name", "measles")
q.Set("category.id", "medtop:07000000")
q.Set("published_at.start", "2024-01-01")
q.Set("sort.by", "published_at")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disease.name=measles&category.id=medtop:07000000&published_at.start=2024-01-01&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&disease.name=measles&category.id=medtop:07000000&published_at.start=2024-01-01&sort.by=published_at&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about a specific brand (e.g., "Apple")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"brand.name": "Apple",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "brand.name": "Apple", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "brand.name" => "Apple", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("brand.name", "Apple")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about multiple brands (e.g., "Apple" and "Google")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple,Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"brand.name": "Apple,Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "brand.name": "Apple,Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "brand.name" => "Apple,Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("brand.name", "Apple,Google")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple,Google&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple,Google
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about a brand while ignoring another (e.g., "Apple" and excluding "Google")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple&ignore.brand.name=Google&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"brand.name": "Apple",
"ignore.brand.name": "Google",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "brand.name": "Apple", "ignore.brand.name": "Google", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "brand.name" => "Apple", "ignore.brand.name" => "Google", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("brand.name", "Apple")
q.Set("ignore.brand.name", "Google")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple&ignore.brand.name=Google&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Apple&ignore.brand.name=Google
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localBrand Reputation Analysis Across Markets
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Tesla&source.country.code=us,de,gb&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"brand.name": "Tesla",
"source.country.code": "us,de,gb",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "brand.name": "Tesla", "source.country.code": "us,de,gb", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "brand.name" => "Tesla", "source.country.code" => "us,de,gb", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("brand.name", "Tesla")
q.Set("source.country.code", "us,de,gb")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Tesla&source.country.code=us,de,gb&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Tesla&source.country.code=us,de,gb&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localBrand Sponsorship Impact Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Google,Microsoft,Amazon&title=sponsorship,tournament,championship&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"brand.name": "Google,Microsoft,Amazon",
"title": "sponsorship,tournament,championship",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "brand.name": "Google,Microsoft,Amazon", "title": "sponsorship,tournament,championship", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "brand.name" => "Google,Microsoft,Amazon", "title" => "sponsorship,tournament,championship", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("brand.name", "Google,Microsoft,Amazon")
q.Set("title", "sponsorship,tournament,championship")
q.Set("sort.by", "sentiment.overall.score")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Google,Microsoft,Amazon&title=sponsorship,tournament,championship&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Google,Microsoft,Amazon&title=sponsorship,tournament,championship&sort.by=sentiment.overall.score&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localBrand Crisis Management Tracking
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Tesla&title=recall&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"brand.name": "Tesla",
"title": "recall",
"sentiment.overall.polarity": "negative",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "brand.name": "Tesla", "title": "recall", "sentiment.overall.polarity": "negative", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "brand.name" => "Tesla", "title" => "recall", "sentiment.overall.polarity" => "negative", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("brand.name", "Tesla")
q.Set("title", "recall")
q.Set("sentiment.overall.polarity", "negative")
q.Set("sort.by", "published_at")
q.Set("sort.order", "asc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Tesla&title=recall&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&brand.name=Tesla&title=recall&sentiment.overall.polarity=negative&sort.by=published_at&sort.order=asc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about a specific sport (e.g., "Football")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sport.name": "Football",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sport.name": "Football", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sport.name" => "Football", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("sport.name", "Football")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about multiple sports
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football,Basketball&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sport.name": "Football,Basketball",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sport.name": "Football,Basketball", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sport.name" => "Football,Basketball", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("sport.name", "Football,Basketball")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football,Basketball&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football,Basketball
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localRequest to get news articles about a sport while ignoring another
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football&ignore.sport.name=Cricket&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sport.name": "Football",
"ignore.sport.name": "Cricket",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sport.name": "Football", "ignore.sport.name": "Cricket", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sport.name" => "Football", "ignore.sport.name" => "Cricket", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("sport.name", "Football")
q.Set("ignore.sport.name", "Cricket")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football&ignore.sport.name=Cricket&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sport.name=Football&ignore.sport.name=Cricket
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localEvent types
| Parameter | Type | Required | Description |
|---|---|---|---|
event.category | string | No | Filter by event category. One of: business, society, environment. |
event.type | string | No | Comma-separated event types (max 5). Values: merger-acquisition, ipo, layoffs, bankruptcy, product-launch, funding-round, earnings, partnership, executive-change, lawsuit, data-breach, recall, expansion, closure, stock-movement, contract-award, spin-off, regulatory-action, election, protest, crime, terrorism, accident, policy-change, scandal, death, award-ceremony, conflict, diplomacy, health-crisis, migration, human-rights, earthquake, hurricane, flood, wildfire, tornado, tsunami, volcanic-eruption, drought, climate-event, pollution, wildlife-event, avalanche. Example: ipo. |
ignore.event.type | string | No | Exclude these event types (comma-separated, max 5). |
Request to get news articles about a specific event (e.g., "Black Friday")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=Black%20Friday&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"event.name": "Black Friday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "event.name": "Black Friday", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "event.name" => "Black Friday", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about multiple events
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=Black%20Friday,Cyber%20Monday&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"event.name": "Black Friday,Cyber Monday",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "event.name": "Black Friday,Cyber Monday", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "event.name" => "Black Friday,Cyber Monday", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles about an event while ignoring another
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=Grammy%20Awards&ignore.event.name=Oscar&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"event.name": "Grammy Awards",
"ignore.event.name": "Oscar",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "event.name": "Grammy Awards", "ignore.event.name": "Oscar", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "event.name" => "Grammy Awards", "ignore.event.name" => "Oscar", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("event.name", "Grammy Awards")
q.Set("ignore.event.name", "Oscar")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=Grammy%20Awards&ignore.event.name=Oscar&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=Grammy%20Awards&ignore.event.name=Oscar
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localEvent Coverage Sentiment Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=CES&sentiment.overall.polarity=positive&published_at.start=2024-01-01&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"event.name": "CES",
"sentiment.overall.polarity": "positive",
"published_at.start": "2024-01-01",
"sort.by": "sentiment.overall.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "event.name": "CES", "sentiment.overall.polarity": "positive", "published_at.start": "2024-01-01", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "event.name" => "CES", "sentiment.overall.polarity" => "positive", "published_at.start" => "2024-01-01", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("event.name", "CES")
q.Set("sentiment.overall.polarity", "positive")
q.Set("published_at.start", "2024-01-01")
q.Set("sort.by", "sentiment.overall.score")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=CES&sentiment.overall.polarity=positive&published_at.start=2024-01-01&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&event.name=CES&sentiment.overall.polarity=positive&published_at.start=2024-01-01&sort.by=sentiment.overall.score
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localSentiment
| Parameter | Type | Required | Description |
|---|---|---|---|
entity.sentiment.polarity | string | No | Filter by sentiment polarity toward the entity (combine with entity.id or *.name; standalone = any entity). One of: positive, negative, neutral. |
entity.sentiment.score.max | number | No | Maximum sentiment score toward the entity. Range: -1–1. |
entity.sentiment.score.min | number | No | Minimum sentiment score toward the entity. Range: -1–1. |
is_clickbait | boolean | No | Filter by clickbait detection. |
sentiment.body.polarity | string | No | Body sentiment polarity. One of: positive, negative, neutral. |
sentiment.body.score | number | No | Exact body sentiment score. Range: -1–1. |
sentiment.body.score.max | number | No | Maximum body sentiment score. Range: -1–1. |
sentiment.body.score.min | number | No | Minimum body sentiment score. Range: -1–1. |
sentiment.consistent | boolean | No | Filter for consistent sentiment (title polarity == body polarity). |
sentiment.mixed | boolean | No | Filter for mixed sentiment (title polarity != body polarity). |
sentiment.overall.polarity | string | No | Overall sentiment polarity. One of: positive, negative, neutral. |
sentiment.overall.score | number | No | Exact overall sentiment score. Range: -1–1. |
sentiment.overall.score.max | number | No | Maximum overall sentiment score. Range: -1–1. |
sentiment.overall.score.min | number | No | Minimum overall sentiment score. Range: -1–1. |
sentiment.title.polarity | string | No | Title sentiment polarity. One of: positive, negative, neutral. |
sentiment.title.score | number | No | Exact title sentiment score. Range: -1–1. |
sentiment.title.score.max | number | No | Maximum title sentiment score. Range: -1–1. |
sentiment.title.score.min | number | No | Minimum title sentiment score. Range: -1–1. |
sentiment_gap.max | number | No | Maximum sentiment gap between title and body. Range: 0–2. |
sentiment_gap.min | number | No | Minimum sentiment gap between title and body. Range: 0–2. |
Request for Positive Sentiment News
This request retrieves news articles that have been classified with a positive sentiment.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sentiment.overall.polarity": "positive",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Positive Sentiment News from a Specific Country
This request fetches news articles with positive sentiment specifically from Japan
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sentiment.overall.polarity=positive&source.country.code=jp&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sentiment.overall.polarity": "positive",
"source.country.code": "jp",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sentiment.overall.polarity": "positive", "source.country.code": "jp", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sentiment.overall.polarity" => "positive", "source.country.code" => "jp", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Positive Sentiment News in the Last 24 Hours
This request retrieves news articles with positive sentiment published in the last 24 hours.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Articles with Positive Sentiment and a Specific Title
This request retrieves news articles with positive sentiment that have "technology" in their titles.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sentiment.overall.polarity=positive&title=technology&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sentiment.overall.polarity": "positive",
"title": "technology",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sentiment.overall.polarity": "positive", "title": "technology", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sentiment.overall.polarity" => "positive", "title" => "technology", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMulti-dimensional Sentiment Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localComparative Sentiment Analysis Across Markets
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSentiment Divergence Analysis by Source Type
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localProduct Review Sentiment Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for articles with mixed sentiment
This request finds articles where the title sentiment differs from body sentiment, useful for detecting clickbait or controversial framing.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sentiment.mixed=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sentiment.mixed": "1",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sentiment.mixed": "1", "category.id": "medtop:11000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sentiment.mixed" => "1", "category.id" => "medtop:11000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for articles with consistent sentiment
This request finds articles where the title and body sentiment align, indicating more straightforward reporting.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sentiment.consistent=1&has_author=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sentiment.consistent": "1",
"has_author": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sentiment.consistent": "1", "has_author": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sentiment.consistent" => "1", "has_author" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for clickbait articles
This request finds articles where the headline is sensationalized – title sentiment differs from body content and has a strong emotional charge.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_clickbait=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_clickbait": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_clickbait": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_clickbait" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for non-clickbait, trustworthy articles
This request finds articles with consistent headline-to-content sentiment from verified sources.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_clickbait=0&is_verified_source=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_clickbait": "0",
"is_verified_source": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_clickbait": "0", "is_verified_source": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_clickbait" => "0", "is_verified_source" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFilter by sentiment gap – find articles with significant title/body mismatch
This request finds articles where the sentiment score differs by at least 0.5 between title and body.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sentiment_gap.min=0.5&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sentiment_gap.min": "0.5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sentiment_gap.min": "0.5", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sentiment_gap.min" => "0.5", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFilter by sentiment gap – find editorially consistent articles
This request finds articles with minimal sentiment difference (gap < 0.2) between title and body.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"sentiment_gap.max": "0.2",
"source.rank.opr.min": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCombined clickbait analysis for political news
This request analyzes clickbait patterns in political coverage.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMedia
| Parameter | Type | Required | Description |
|---|---|---|---|
has_4k_images | boolean | No | Filter articles with 4K images (>= 3840px width). |
has_consistent_image_sizes | boolean | No | Filter articles with consistent image dimensions. |
has_fullhd_images | boolean | No | Filter articles with Full HD images (>= 1920px width). |
has_hq_images | boolean | No | Filter articles with high-quality images (>= 1200px width). |
has_image | boolean | No | Filter articles with/without images. |
has_mixed_media | boolean | No | Filter articles with both image and video media types. |
has_mobile_optimized_images | boolean | No | Filter articles with mobile-optimized images (320-800px width). |
has_multiple_images | boolean | No | Filter articles with 2+ images. |
has_social_share_image | boolean | No | Filter articles with social share images (>= 1200x630px). |
has_thumbnail | boolean | No | Filter articles with thumbnail images (<= 300px width). |
has_video | boolean | No | Filter articles with/without videos. |
is_instagram_ready | boolean | No | Filter articles with Instagram-ready images (>= 1080px + aspect ratio). |
is_landscape_media | boolean | No | Filter articles with landscape-oriented media. |
is_media_rich | boolean | No | Filter articles with both images and videos. |
is_portrait_media | boolean | No | Filter articles with portrait-oriented media. |
is_twitter_card_ready | boolean | No | Filter articles with Twitter Card-ready images (>= 800px + landscape). |
media.images.count | integer | No | Exact number of images. Range: min 0. |
media.images.count.max | integer | No | Maximum number of images. Range: min 0. |
media.images.count.min | integer | No | Minimum number of images. Range: min 0. |
media.images.height.max | integer | No | Maximum image height in pixels. Range: min 0. |
media.images.height.min | integer | No | Minimum image height in pixels. Range: min 0. |
media.images.width.max | integer | No | Maximum image width in pixels. Range: min 0. |
media.images.width.min | integer | No | Minimum image width in pixels. Range: min 0. |
media.videos.count | integer | No | Exact number of videos. Range: min 0. |
media.videos.count.max | integer | No | Maximum number of videos. Range: min 0. |
media.videos.count.min | integer | No | Minimum number of videos. Range: min 0. |
Request to get news articles with a specific number of images and videos
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&media.images.count=2&media.videos.count=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"media.images.count": "2",
"media.videos.count": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "media.images.count": "2", "media.videos.count": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "media.images.count" => "2", "media.videos.count" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles with images of a specific size
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRich Media Content Curation
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localHigh-Quality Visual News Aggregation
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localVideo Content Analysis for Educational Topics
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for media-rich articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_media_rich=1&category.id=medtop:13000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_media_rich": "1",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_media_rich": "1", "category.id": "medtop:13000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_media_rich" => "1", "category.id" => "medtop:13000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for articles with high-quality images
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&has_hq_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_hq_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "has_hq_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "has_hq_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for multimedia-rich content
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&has_image=1&has_video=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_image": "1",
"has_video": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "has_image": "1", "has_video": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "has_image" => "1", "has_video" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for landscape-oriented images (ideal for headers/banners)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_landscape_media=1&has_fullhd_images=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_landscape_media": "1",
"has_fullhd_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_landscape_media": "1", "has_fullhd_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_landscape_media" => "1", "has_fullhd_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for portrait-oriented images (ideal for mobile)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_portrait_media": "1",
"has_mobile_optimized_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_portrait_media": "1", "has_mobile_optimized_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_portrait_media" => "1", "has_mobile_optimized_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Instagram-ready content
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_instagram_ready=1&category.id=medtop:08000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_instagram_ready": "1",
"category.id": "medtop:08000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_instagram_ready": "1", "category.id": "medtop:08000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_instagram_ready" => "1", "category.id" => "medtop:08000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for Twitter Card optimized content
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_twitter_card_ready": "1",
"has_social_share_image": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for 4K image galleries
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_4k_images": "1",
"has_multiple_images": "1",
"category.id": "medtop:01000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for consistent visual content (curated galleries)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_consistent_image_sizes": "1",
"has_multiple_images": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "has_consistent_image_sizes": "1", "has_multiple_images": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "has_consistent_image_sizes" => "1", "has_multiple_images" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for mixed media articles (images + videos)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_mixed_media": "1",
"sort.by": "media.images.count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localReadability
| 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 |
|---|---|---|---|
country | string | No | ISO 3166-1 alpha-2 code to disambiguate place (e.g. de). Example: de. |
has_location_geo | boolean | No | Filter articles with/without geo-location data. |
insights | string | No | Comma-separated local intelligence blocks to compute over the radius. Values: mood, hotspots, events, entities, bias, sources, timeline, top_categories, top_topics, breaking, velocity, movers. velocity/movers use rolling time windows and are most accurate without an explicit published_at filter. Each block costs 1 additional point. Example: top_categories,breaking,movers. |
lat | number | No | Latitude of the search center (required unless place is given). Range: -90–90. |
lng | number | No | Longitude of the search center (required unless place is given). Range: -180–180. |
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. |
place | string | No | Place name to geocode into the search center instead of lat/lng (e.g. Berlin). Resolved heuristically against the entity graph; ambiguous names are matched to the best candidate — add country or pass lat/lng for precision. Explicit lat/lng take precedence over place. Example: Berlin. |
radius | number | No | Search radius in kilometers (default 50, max 20000). Range: max 20000, > 0. Default: 50. |
ranking | string | No | Relevance weighting preset (only when sort=relevance): balanced, proximity (closer wins), authority (bigger sources win), fresh (recency wins). Override individual weights with w.* params. One of: balanced, proximity, authority, fresh. Default: balanced. |
w.distance | number | No | Relevance weight for proximity (overrides preset). Range: min 0. |
w.important | number | No | Relevance weight for breaking/importance (overrides preset). Range: min 0. |
w.opr | number | No | Relevance weight for source authority (overrides preset). Range: min 0. |
w.recency | number | No | Relevance weight for recency (overrides preset). Range: min 0. |
Request to get news articles from a specific location (e.g., "Tokyo")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&location.name=Tokyo&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"location.name": "Tokyo",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "location.name": "Tokyo", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "location.name" => "Tokyo", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles from multiple locations (e.g., "London" and "Paris")
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&location.name=London,Paris&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"location.name": "London,Paris",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "location.name": "London,Paris", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "location.name" => "London,Paris", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles from a specific location and in a specific language (e.g., "London" and "English") and ignore articles from "Ontario"
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"location.name": "London",
"language.code": "en",
"ignore.location.name": "Ontario",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSearch for news within 50 km of Berlin (geo-coordinates)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"location.lat": "52.52",
"location.lng": "13.40",
"location.radius": "50",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localLocal news with positive sentiment (geo-coordinates)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRegional breaking news (geo-coordinates)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localGeopolitical Event Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMulti-Location Business Impact Study
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localNatural Disaster Coverage Analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localTourism Sentiment Analysis by Location
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSearch within the bounding box (New York City area)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"location.bbox": "40.4774,40.9176,-74.2591,-73.7004",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localBounding box with category filter (tech news in Silicon Valley)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRing search – articles between 100 km and 500 km from Berlin
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localExclude center area - articles more than 50km from Paris
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"location.lat": "48.8566",
"location.lng": "2.3522",
"location.radius.min": "50",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localArticles with geographic coordinates only
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&has_location_geo=1&category.id=medtop:11000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_location_geo": "1",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "has_location_geo": "1", "category.id": "medtop:11000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "has_location_geo" => "1", "category.id" => "medtop:11000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localArticles without coordinates (text-based location only)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&has_location_geo=0&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_location_geo": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "has_location_geo": "0", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "has_location_geo" => "0", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRegional disaster tracking with a bounding box
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localArticle flags
| Parameter | Type | Required | Description |
|---|---|---|---|
is_breaking | boolean | No | Filter breaking news articles. |
is_duplicate | boolean | No | Filter duplicate/unique articles. |
is_high_quality | boolean | No | Filter high-quality articles (not duplicate, rank >= 5, has images, has author). |
is_paywall | boolean | No | Filter paywalled articles. |
Get easy-to-read articles for the general audience
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_easy_read=1&readability.audience=general&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_easy_read": "1",
"readability.audience": "general",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_easy_read": "1", "readability.audience": "general", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_easy_read" => "1", "readability.audience" => "general", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localGet beginner-level content about technology
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&readability.difficulty=beginner&topic.id=industry.technology_news&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"readability.difficulty": "beginner",
"topic.id": "industry.technology_news",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "readability.difficulty": "beginner", "topic.id": "industry.technology_news", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "readability.difficulty" => "beginner", "topic.id" => "industry.technology_news", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localGet articles suitable for teenagers (age 12–16)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&readability.age.min=12&readability.age.max=16&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"readability.age.min": "12",
"readability.age.max": "16",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "readability.age.min": "12", "readability.age.max": "16", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "readability.age.min" => "12", "readability.age.max" => "16", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localGet professional-level business news
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&readability.audience=professional&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"readability.audience": "professional",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "readability.audience": "professional", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "readability.audience" => "professional", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localGet highly readable content (FRE 70–90) for content curation
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"readability.ease.min": "70",
"readability.ease.max": "90",
"is_duplicate": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localGet academic-level articles about science
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"readability.difficulty": "expert",
"readability.audience": "academic",
"category.id": "medtop:13000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCombine with grade level for educational content
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localHigh-Quality Content Filtering
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for long-read articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_long_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_long_read": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_long_read": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_long_read" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for quick-read articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_short_read=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_short_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_short_read": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_short_read" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for quick news briefs (≤2 minutes)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_quick_read=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_quick_read": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_quick_read": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_quick_read" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for standard-length articles (3-7 minutes)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_medium_read=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_medium_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_medium_read": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_medium_read" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for in-depth analysis articles (≥10 minutes)
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_deep_dive=1&category.id=medtop:04000000&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_deep_dive": "1",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_deep_dive": "1", "category.id": "medtop:04000000", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_deep_dive" => "1", "category.id" => "medtop:04000000", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for high-quality curated content
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_high_quality=1&language.code=en&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_high_quality": "1",
"language.code": "en",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_high_quality": "1", "language.code": "en", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_high_quality" => "1", "language.code" => "en", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest for media-rich articles sorted by media content
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"has_image": "1",
"sort.by": "media_richness",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localOnly Breaking News Monitoring
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&is_breaking=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_breaking": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "is_breaking": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "is_breaking" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSorting
| Parameter | Type | Required | Description |
|---|---|---|---|
sort | string | No | Sort order: nearest first (distance), newest first (published_at), or relevance (blends proximity + source authority + recency + breaking; adds relevance_score to each article). One of: distance, published_at, relevance. Default: distance. |
sort.by | string | No | Field to sort results by. One of: published_at, relevance, engagement, quality, controversy, trust, id, new, created_at, source.rank.opr, sentiment.overall.score, sentiment.title.score and 18 more. Default: published_at. |
sort.order | string | No | Sort order. One of: asc, desc. Default: desc. |
Request to get news articles sorted by the published date in ascending order
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "published_at",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get news articles sorted by the overall sentiment magnitude in descending order
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sort.by": "sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sort.by" => "sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get the most viral/engaging articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "engagement",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sort.by": "engagement", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sort.by" => "engagement", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get engaging breaking news with media
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get the most media-rich articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&sort.by=media_richness&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "media_richness",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "sort.by": "media_richness", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "sort.by" => "media_richness", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get articles from high-ranking sources sorted by source rank
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get quick-read articles sorted by read time
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"read_time.max": "5",
"sort.by": "read_time",
"sort.order": "asc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get high-quality visual content sorted by image dimensions
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMulti-dimensional Content Ranking
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMedia-Rich Content Prioritization
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localIn-Depth Analysis Articles
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:04000000&sort.by=paragraphs_count&sort.order=desc&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"category.id": "medtop:04000000",
"sort.by": "paragraphs_count",
"sort.order": "desc",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "category.id": "medtop:04000000", "sort.by": "paragraphs_count", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "category.id" => "medtop:04000000", "sort.by" => "paragraphs_count", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
q.Set("category.id", "medtop:04000000")
q.Set("sort.by", "paragraphs_count")
q.Set("sort.order", "desc")
q.Set("api_key", "YOUR_API_KEY")
u.RawQuery = q.Encode()
resp, _ := http.Get(u.String())
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var data map[string]any
json.Unmarshal(body, &data)
fmt.Println(data)
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Example {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:04000000&sort.by=paragraphs_count&sort.order=desc&api_key=YOUR_API_KEY"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}Write a script in your preferred language that calls the APITube News API:
GET https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&category.id=medtop:04000000&sort.by=paragraphs_count&sort.order=desc
Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/localSentiment-Based Content Discovery
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localHigh-Quality Long-Form Content
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "quality",
"sort.order": "desc",
"is_long_read": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localControversial/Polarizing Topics
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "controversy",
"sort.order": "desc",
"category.id": "medtop:11000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMost Trustworthy News Sources
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "trust",
"sort.order": "desc",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCombining Quality with Editorial Filters
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "quality",
"source.rank.opr.min": "5",
"is_duplicate": "0",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localViral Content for Social Media
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCredible Sources for Research
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"sort.by": "trust",
"source.rank.opr.min": "6",
"sentiment.overall.polarity": "neutral",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localPagination
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination. Range: min 1. Default: 1. |
per_page | integer | No | Number of results per page (max 250; the Free plan is capped at 10 and Starter at 50). Range: 1–250. Default: 100. |
Request to get news articles with pagination
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&per_page=10&page=1&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"per_page": "10",
"page": "1",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "per_page": "10", "page": "1", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "per_page" => "10", "page" => "1", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localEfficient Large Dataset Retrieval
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localPaginated Multi-criteria Search
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting
| Parameter | Type | Required | Description |
|---|---|---|---|
facet | string | No | Enable faceting. One of: 0, 1. |
facet.field | string | No | Comma-separated facet fields (max 5). Values: source.id, source.country.id, source.bias, language.id, author.id, category.id, topic.id, industry.id, entity.id, sentiment.overall.polarity, sentiment.title.polarity, sentiment.body.polarity, sentiment.strength, is_duplicate, is_free, is_important, media.images.count, media.videos.count, read_time, content.length, published.year, published.month, published.day_of_week, published.hour, published.weekday, published.time_of_day. Example: source.id,category.id. |
facet.limit | integer | No | Maximum number of facet values per field (max 100). Range: 1–100. Default: 10. |
facet.mincount | integer | No | Minimum count for a facet value to be included. Range: min 1. Default: 1. |
facet.range | string | No | Enable range faceting. One of: 0, 1. |
facet.range.end | string | No | End value for range faceting (required with facet.range). |
facet.range.field | string | No | Field for range faceting. Values: published_at, sentiment.overall.score, sentiment.title.score, sentiment.body.score, read_time, source.rank.opr, media.images.count, media.videos.count. |
facet.range.gap | string | No | Gap value for range faceting. Default: +1DAY. |
facet.range.start | string | No | Start value for range faceting (required with facet.range). |
Basic faceting by source
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&facet=true&facet.field=source.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "source.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "facet": "true", "facet.field": "source.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "facet" => "true", "facet.field" => "source.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting with multiple fields
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "source.id,language.id,sentiment.overall.polarity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting with custom limit
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "source.id",
"facet.limit": "20",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "facet": "true", "facet.field": "source.id", "facet.limit": "20", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "facet" => "true", "facet.field" => "source.id", "facet.limit" => "20", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting with minimum count filter
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "category.id",
"facet.mincount": "10",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "facet": "true", "facet.field": "category.id", "facet.mincount": "10", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "facet" => "true", "facet.field" => "category.id", "facet.mincount" => "10", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting combined with search filters
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting for language distribution analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting for sentiment analysis by source
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting for media bias distribution
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localFaceting for category distribution in top headlines
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&facet=true&facet.field=category.id,language.id&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "category.id,language.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "facet": "true", "facet.field": "category.id,language.id", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "facet" => "true", "facet.field" => "category.id,language.id", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localBuilding a filtered navigation
This example shows how to use facets to build a filter sidebar for your news application:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localTemporal analysis – articles by hour of day
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "published.hour",
"published_at.start": "2024-01-01",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localTemporal analysis – articles by day of week
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "published.day_of_week",
"category.id": "medtop:15000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMedia richness analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSource quality distribution
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localBreaking news distribution by hour
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"is_breaking": "1",
"facet": "true",
"facet.field": "published.hour,category.id",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localContent length analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "read_time",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMulti-sentiment analysis across content parts
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localYearly trend analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localContent length distribution
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "content.length",
"category.id": "medtop:04000000",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localWeekday vs weekend publishing patterns
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "published.weekday,published.time_of_day",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSentiment strength analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"organization.name": "Tesla",
"facet": "true",
"facet.field": "sentiment.strength,sentiment.overall.polarity",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMost mentioned entities
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"facet": "true",
"facet.field": "entity.id",
"facet.limit": "20",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "facet": "true", "facet.field": "entity.id", "facet.limit": "20", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "facet" => "true", "facet.field" => "entity.id", "facet.limit" => "20", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localTime of day publishing analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localDate range faceting - articles per week
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localDate range faceting – articles per day
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localDate range faceting - hourly distribution
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSentiment distribution analysis
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localReading time distribution
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSource quality distribution
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCombined regular and range faceting
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMedia richness timeline
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localBuilding a sentiment timeline dashboard
This example shows how to track sentiment changes over time for brand monitoring:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localComparative time series analysis
Run multiple queries to compare different entities over the same time period:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localHighlighting
| Parameter | Type | Required | Description |
|---|---|---|---|
hl | string | No | Enable highlighting. One of: 0, 1. |
hl.fl | string | No | Comma-separated fields to highlight (max 5). Values: title, description, body. Default: title,description. Example: title,description. |
hl.fragsize | integer | No | Size of highlighted fragment in characters (50-500). Range: 50–500. Default: 150. |
hl.snippets | integer | No | Number of highlighted snippets per field (max 10). Range: 1–10. Default: 3. |
hl.tag.post | string | No | Closing tag for highlighted text. Default: </em>. |
hl.tag.pre | string | No | Opening tag for highlighted text. Default: <em>. |
search | string | No | Extra comma-separated terms to highlight in the response, on top of the terms taken from title. Affects highlighting only — it does not filter results. Requires hl=1. Example: tesla,elon musk. Accepted by the API but not part of the published OpenAPI specification, so generated SDKs do not expose it. |
Basic highlighting for search results
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=bitcoin&hl=true&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "bitcoin",
"hl": "true",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "bitcoin", "hl": "true", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "bitcoin", "hl" => "true", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localHighlighting with custom fields
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "artificial intelligence",
"hl": "true",
"hl.fl": "title,description,body",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localHighlighting with larger snippets
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "climate change",
"hl": "true",
"hl.fragsize": "300",
"hl.snippets": "5",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCustom highlight tags for HTML
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCustom highlight tags for Markdown
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localCombined with other filters
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localHighlighting for entity search
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localAutomatic term expansion with dictionary
This example demonstrates how highlighting automatically expands search terms using synonyms and morphology. Searching for "innovation" will also highlight related terms like "innovative", "innovate", "innovator", etc.
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&title=innovation&hl=true&hl.fl=title,description&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"title": "innovation",
"hl": "true",
"hl.fl": "title,description",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "title": "innovation", "hl": "true", "hl.fl": "title,description", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "title" => "innovation", "hl" => "true", "hl.fl" => "title,description", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localBuilding a search results page
This example shows how to use highlighting with field selection for a search interface:
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localField selection
| Parameter | Type | Required | Description |
|---|---|---|---|
fl | string | No | Comma-separated list of fields to include in the response. Example: id,title,published_at,source.domain. |
Request to get only ID and title
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&fl=id,title&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"fl": "id,title",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "fl": "id,title", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "fl" => "id,title", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get an article with specific source fields
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&fl=id,title,source.domain,source.rank.opr&api_key=YOUR_API_KEY"import requests
response = requests.get(
"https://api.apitube.io/v1/news/local",
params={
"lat": "52.52",
"lng": "13.40",
"fl": "id,title,source.domain,source.rank.opr",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "fl": "id,title,source.domain,source.rank.opr", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "fl" => "id,title,source.domain,source.rank.opr", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get sentiment analysis data only
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"fl": "id,title,sentiment.overall.score,sentiment.title.score,sentiment.body.score",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localRequest to get media information
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"fl": "id,title,media.images.count,media.videos.count",
"api_key": "YOUR_API_KEY",
},
)
print(response.json())const params = new URLSearchParams({ "lat": "52.52", "lng": "13.40", "fl": "id,title,media.images.count,media.videos.count", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "fl" => "id,title,media.images.count,media.videos.count", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localMinimal response for feed aggregation
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localSentiment monitoring with minimal data
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localLightweight news ticker
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localPerformance optimization for large datasets
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&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/local",
params={
"lat": "52.52",
"lng": "13.40",
"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({ "lat": "52.52", "lng": "13.40", "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/local?${params}`);
const data = await response.json();
console.log(data);$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "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/local?$query");
$data = json_decode($response, true);
print_r($data);package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
u, _ := url.Parse("https://api.apitube.io/v1/news/local")
q := u.Query()
q.Set("lat", "52.52")
q.Set("lng", "13.40")
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/local?lat=52.52&lng=13.40&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/local?lat=52.52&lng=13.40&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/localExport
| Parameter | Type | Required | Description |
|---|---|---|---|
export | string | No | Export format. One of: json, csv, tsv, xml, rss, xlsx, parquet, jsonl, ndjson. |
Request and debug
| Parameter | Type | Required | Description |
|---|---|---|---|
debug | string | No | Include user_input in response for debugging. One of: 0, 1. |
Response Format
{
"status": "ok",
"query": { "lat": 52.52, "lng": 13.4, "radius_km": 50, "sort": "distance" },
"total": 128,
"results": [
{
"id": 0,
"title": "string",
"href": "string",
"distance_km": 3.2,
"nearest_location": {
"entity_id": 0,
"name": "string",
"lat": 52.51,
"lng": 13.41,
"country": "de"
}
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Always ok on success. |
query | object | The center and settings that were used: lat, lng, radius_km, sort. When place is used it also carries place and resolved_entity_id. |
total | integer | Exact number of matching articles inside the radius. |
results | array | Article objects (same shape as /v1/news/everything) with the extra fields below. |
results[].distance_km | float | Distance from the center to the article's nearest matched location. |
results[].nearest_location | object | Closest matched place: entity_id, name, lat, lng, country. |
results[].relevance_score | float | Present only when sort=relevance. |
ranking_weights | object | The effective relevance weights (present when sort=relevance). |
local_insights | object | Present only when insights is requested (see below). |
Local insights
Pass the insights parameter — a comma-separated list — to compute aggregate intelligence over the radius. The results appear under a local_insights object alongside the article list. Allowed blocks are:
mood, hotspots, events, entities, bias, sources, timeline, top_categories, top_topics, breaking, velocity, movers.
An unknown value returns 400 ER0420. In the response, four blocks are keyed by their aggregated form: events → top_events, entities → top_entities, bias → bias_split, sources → top_sources; the rest keep their names. The movers block surfaces entities and topics accelerating against their 14-day baseline, scoped to the radius.
Billing
A /v1/news/local call costs 1 point for the article listing, plus 1 additional point for each requested insight block. A request with no insights costs 1 point; insights=mood,hotspots,breaking costs 4 points (1 + 3). Points are charged only when the response contains at least one article.
Request Examples
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&radius=50&api_key=YOUR_API_KEY"import requests
resp = requests.get(
"https://api.apitube.io/v1/news/local",
params={"lat": "52.52", "lng": "13.40", "radius": "50", "api_key": "YOUR_API_KEY"},
)
print(resp.json())const params = new URLSearchParams({ lat: "52.52", lng: "13.40", radius: "50", api_key: "YOUR_API_KEY" });
const resp = await fetch(`https://api.apitube.io/v1/news/local?${params}`);
console.log(await resp.json());$query = http_build_query(["lat" => "52.52", "lng" => "13.40", "radius" => "50", "api_key" => "YOUR_API_KEY"]);
$data = json_decode(file_get_contents("https://api.apitube.io/v1/news/local?$query"), true);
print_r($data);Geocode a place name and rank by relevance
curl "https://api.apitube.io/v1/news/local?place=Berlin&country=de&radius=30&sort=relevance&ranking=authority&api_key=YOUR_API_KEY"Attach a local insights dashboard
curl "https://api.apitube.io/v1/news/local?lat=52.52&lng=13.40&radius=50&insights=mood,hotspots,breaking&api_key=YOUR_API_KEY"Error Responses
| Code | Status | Meaning |
|---|---|---|
ER0406 | 400 | No center provided — send lat and lng together, or a place. |
ER0407 | 400 | lat must be a valid latitude between -90 and 90. |
ER0408 | 400 | lng must be a valid longitude between -180 and 180. |
ER0409 | 400 | radius must be a positive number up to 20000 km. |
ER0420 | 400 | Unknown value in insights. |
ER0421 | 400 | The place could not be geocoded — try a more specific name, add country, or pass lat/lng. |