Skip to content

Topic Query Examples

Search for news on a specific topic

This query retrieves news articles about cryptocurrency.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.crypto_news",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.crypto_news", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.crypto_news", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.crypto_news")
	q.Set("api_key", "YOUR_API_KEY")
	u.RawQuery = q.Encode()

	resp, _ := http.Get(u.String())
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	var data map[string]any
	json.Unmarshal(body, &data)
	fmt.Println(data)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news&api_key=YOUR_API_KEY"))
            .GET()
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news

Read the API key from an environment variable (do not hardcode it), handle request
errors, and print the key fields of each result.
Docs: https://docs.apitube.io/platform/news-api/parameters

Multi-topic sentiment analysis

This query analyzes positive sentiment across energy-related topics.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.green_energy_news%2Cindustry.energy_news&sentiment.overall.polarity=positive&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.green_energy_news,industry.energy_news",
        "sentiment.overall.polarity": "positive",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.green_energy_news,industry.energy_news", "sentiment.overall.polarity": "positive", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.green_energy_news,industry.energy_news", "sentiment.overall.polarity" => "positive", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.green_energy_news,industry.energy_news")
	q.Set("sentiment.overall.polarity", "positive")
	q.Set("api_key", "YOUR_API_KEY")
	u.RawQuery = q.Encode()

	resp, _ := http.Get(u.String())
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	var data map[string]any
	json.Unmarshal(body, &data)
	fmt.Println(data)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.green_energy_news%2Cindustry.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());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.green_energy_news%2Cindustry.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/parameters

Comparative topic analysis with language filtering

This query compares AI topics across different languages.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.ai_news%2Cindustry.technology_news&language.code=en%2Cde%2Cfr&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.ai_news,industry.technology_news",
        "language.code": "en,de,fr",
        "sort.by": "published_at",
        "sort.order": "desc",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.ai_news,industry.technology_news", "language.code": "en,de,fr", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.ai_news,industry.technology_news", "language.code" => "en,de,fr", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.ai_news,industry.technology_news")
	q.Set("language.code", "en,de,fr")
	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)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.ai_news%2Cindustry.technology_news&language.code=en%2Cde%2Cfr&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());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.ai_news%2Cindustry.technology_news&language.code=en%2Cde%2Cfr&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/parameters

Topic and entity intersection analysis

This query analyzes cryptocurrency news in relation to specific entities.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news&title=Bitcoin%2CEthereum&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.crypto_news",
        "title": "Bitcoin,Ethereum",
        "sort.by": "published_at",
        "sort.order": "desc",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.crypto_news", "title": "Bitcoin,Ethereum", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.crypto_news", "title" => "Bitcoin,Ethereum", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.crypto_news")
	q.Set("title", "Bitcoin,Ethereum")
	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)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news&title=Bitcoin%2CEthereum&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());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.crypto_news&title=Bitcoin%2CEthereum&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/parameters

Topic-based market tracking

This query finds news about financial markets.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.financial_news&title=market%2Cstock%2Ctrading&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.financial_news",
        "title": "market,stock,trading",
        "sort.by": "published_at",
        "sort.order": "desc",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.financial_news", "title": "market,stock,trading", "sort.by": "published_at", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.financial_news", "title" => "market,stock,trading", "sort.by" => "published_at", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.financial_news")
	q.Set("title", "market,stock,trading")
	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)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.financial_news&title=market%2Cstock%2Ctrading&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());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.financial_news&title=market%2Cstock%2Ctrading&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/parameters

This query analyzes how a topic has trended over time.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.ai_news&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.ai_news",
        "sort.by": "published_at",
        "sort.order": "asc",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.ai_news", "sort.by": "published_at", "sort.order": "asc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.ai_news", "sort.by" => "published_at", "sort.order" => "asc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.ai_news")
	q.Set("sort.by", "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)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.ai_news&sort.by=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());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.ai_news&sort.by=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/parameters

Topic sentiment comparison across sources

This query compares how different sources cover a specific topic.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.technology_news&source.domain=theguardian.com%2Cfoxnews.com%2Cnytimes.com&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.technology_news",
        "source.domain": "theguardian.com,foxnews.com,nytimes.com",
        "sort.by": "sentiment.overall.score",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.technology_news", "source.domain": "theguardian.com,foxnews.com,nytimes.com", "sort.by": "sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.technology_news", "source.domain" => "theguardian.com,foxnews.com,nytimes.com", "sort.by" => "sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.technology_news")
	q.Set("source.domain", "theguardian.com,foxnews.com,nytimes.com")
	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)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.technology_news&source.domain=theguardian.com%2Cfoxnews.com%2Cnytimes.com&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());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.technology_news&source.domain=theguardian.com%2Cfoxnews.com%2Cnytimes.com&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/parameters

Cross-regional topic impact analysis

This query examines how military news is reported across different countries with advanced filtering by relevance and credibility.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.military_news&source.country.code=us%2Cgb%2Cde%2Cfr&title=threat%2Cattack%2Cdefense&sort.by=source.country.code%2Csentiment.overall.score&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.military_news",
        "source.country.code": "us,gb,de,fr",
        "title": "threat,attack,defense",
        "sort.by": "source.country.code,sentiment.overall.score",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.military_news", "source.country.code": "us,gb,de,fr", "title": "threat,attack,defense", "sort.by": "source.country.code,sentiment.overall.score", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.military_news", "source.country.code" => "us,gb,de,fr", "title" => "threat,attack,defense", "sort.by" => "source.country.code,sentiment.overall.score", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.military_news")
	q.Set("source.country.code", "us,gb,de,fr")
	q.Set("title", "threat,attack,defense")
	q.Set("sort.by", "source.country.code,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)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.military_news&source.country.code=us%2Cgb%2Cde%2Cfr&title=threat%2Cattack%2Cdefense&sort.by=source.country.code%2Csentiment.overall.score&api_key=YOUR_API_KEY"))
            .GET()
            .build();
        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.military_news&source.country.code=us%2Cgb%2Cde%2Cfr&title=threat%2Cattack%2Cdefense&sort.by=source.country.code%2Csentiment.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/parameters

Topic and organization intersectional sentiment analysis

This query analyzes the sentiment around specific organizations within the technology topic space, filtered by visual content.

bash
curl "https://api.apitube.io/v1/news/everything?topic.id=industry.technology_news&organization.name=Google%2CMicrosoft%2CApple%2CAmazon&media.images.count=1&sort.by=organization.name%2Csentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"
python
import requests

response = requests.get(
    "https://api.apitube.io/v1/news/everything",
    params={
        "topic.id": "industry.technology_news",
        "organization.name": "Google,Microsoft,Apple,Amazon",
        "media.images.count": "1",
        "sort.by": "organization.name,sentiment.overall.score",
        "sort.order": "desc",
        "api_key": "YOUR_API_KEY",
    },
)
print(response.json())
javascript
const params = new URLSearchParams({ "topic.id": "industry.technology_news", "organization.name": "Google,Microsoft,Apple,Amazon", "media.images.count": "1", "sort.by": "organization.name,sentiment.overall.score", "sort.order": "desc", "api_key": "YOUR_API_KEY" });
const response = await fetch(`https://api.apitube.io/v1/news/everything?${params}`);
const data = await response.json();
console.log(data);
php
$query = http_build_query(["topic.id" => "industry.technology_news", "organization.name" => "Google,Microsoft,Apple,Amazon", "media.images.count" => "1", "sort.by" => "organization.name,sentiment.overall.score", "sort.order" => "desc", "api_key" => "YOUR_API_KEY"]);
$response = file_get_contents("https://api.apitube.io/v1/news/everything?$query");
$data = json_decode($response, true);
print_r($data);
go
package main

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	u, _ := url.Parse("https://api.apitube.io/v1/news/everything")
	q := u.Query()
	q.Set("topic.id", "industry.technology_news")
	q.Set("organization.name", "Google,Microsoft,Apple,Amazon")
	q.Set("media.images.count", "1")
	q.Set("sort.by", "organization.name,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)
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Example {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.apitube.io/v1/news/everything?topic.id=industry.technology_news&organization.name=Google%2CMicrosoft%2CApple%2CAmazon&media.images.count=1&sort.by=organization.name%2Csentiment.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());
    }
}
text
Write a script in your preferred language that calls the APITube News API:

GET https://api.apitube.io/v1/news/everything?topic.id=industry.technology_news&organization.name=Google%2CMicrosoft%2CApple%2CAmazon&media.images.count=1&sort.by=organization.name%2Csentiment.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/parameters