Geopolitical event analysis with location filtering

Analyze geopolitical events across multiple locations with category and time filtering

入力パラメータ

ParameterDescriptionTypeDefaultRequired
location.nameMultiple locations (comma-separated).stringYes
category.idCategory filter.stringYes
published_at.startStart date filter.stringYes
sort.bySort by publication date.stringYes
sort.orderAscending order for timeline.stringYes
source.rank.opr.minMinimum source quality.stringYes
api_keyYour API key.stringYes
per_pageMaximum number of articles to retrieve.integer40No

Workflow examples

Request for geopolitical event analysis:
curl -X GET "https://api.apitube.io/v1/news/everything?location.name=France,Italy&category.id=medtop:11000000&published_at.start=2022-02-01&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"
Request for natural disaster coverage analysis:
curl -X GET "https://api.apitube.io/v1/news/everything?location.name=Florida,Louisiana&title=hurricane&published_at.start=2022-06-01&published_at.end=2022-11-30&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"
Request for tourism sentiment analysis by location:
curl -X GET "https://api.apitube.io/v1/news/everything?location.name=Bali,Phuket,Maldives&sentiment.overall.polarity=positive&published_at.start=2023-01-01&sort.by=published_at&api_key=YOUR_API_KEY"
Request for regional language news comparison:
curl -X GET "https://api.apitube.io/v1/news/everything?language.code=ar,he&category.id=medtop:11000000&published_at.start=2023-01-01&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"

のためのレシピ cURL

curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?location.name=France%2CItaly&category.id=medtop%3A11000000&published_at.start=2022-02-01&sort.by=published_at&sort.order=asc&source.rank.opr.min=0.6&api_key=YOUR_API_KEY&per_page=40' \
--header 'Content-Type: application/json'

のためのレシピ Python

import requests

url = "https://api.apitube.io/v1/news/everything"

querystring = {
    "location.name": "France,Italy",
    "category.id": "medtop:11000000",
    "published_at.start": "2022-02-01",
    "sort.by": "published_at",
    "sort.order": "asc",
    "source.rank.opr.min": 0.6,
    "api_key": "YOUR_API_KEY",
    "per_page": 40
}
response = requests.request("GET", url, params=querystring)

print(response.text)

のためのレシピ Javascript

import axios from "axios"

const options = {
		method: 'GET',
		url: 'https://api.apitube.io/v1/news/everything',
		params: {
    "location.name": "France,Italy",
    "category.id": "medtop:11000000",
    "published_at.start": "2022-02-01",
    "sort.by": "published_at",
    "sort.order": "asc",
    "source.rank.opr.min": 0.6,
    "api_key": "YOUR_API_KEY",
    "per_page": 40
}};

axios.request(options).then(function (response) {
		console.log(response.data);
}).catch(function (error) {
		console.error(error);
});

のためのレシピ PHP

require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://api.apitube.io/v1/news/everything', [
	'query' => [
    'location.name' => 'France,Italy',
    'category.id' => 'medtop:11000000',
    'published_at.start' => '2022-02-01',
    'sort.by' => 'published_at',
    'sort.order' => 'asc',
    'source.rank.opr.min' => 0.6,
    'api_key' => 'YOUR_API_KEY',
    'per_page' => 40,
],
]);

echo $response->getBody();

のためのレシピ Java

OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
		.url("https://api.apitube.io/v1/news/everything?location.name=France%2CItaly&category.id=medtop%3A11000000&published_at.start=2022-02-01&sort.by=published_at&sort.order=asc&source.rank.opr.min=0.6&api_key=YOUR_API_KEY&per_page=40")
		.method("POST", body)
		.addHeader("Content-Type", "application/json")
		.build();
Response response = client.newCall(request).execute();
		
  • CNN
  • Techcrunch
  • Vox
  • Apple
  • Microsoft
  • IBM
  • Bloomberg
  • Spotify