Multi-dimensional sentiment analysis with source filtering

Analyze sentiment across multiple organizations with high-quality sources and time range filtering

入力パラメータ

ParameterDescriptionTypeDefaultRequired
sentiment.overall.score.minMinimum sentiment score (0.7 = strong positive).floatYes
category.idCategory filter.stringYes
organization.nameMultiple organizations (comma-separated).stringYes
published_at.startStart date for time range.stringYes
source.rank.opr.minMinimum source quality rank.stringYes
sort.bySort by sentiment score.stringYes
sort.orderDescending order.stringYes
api_keyYour API key.stringYes
per_pageMaximum number of articles to retrieve.integer20No

Workflow examples

Request for multi-dimensional sentiment analysis:
curl -X GET "https://api.apitube.io/v1/news/everything?sentiment.overall.score.min=0.7&category.id=medtop:04000000&organization.name=Tesla,SpaceX&published_at.start=2023-01-01&source.rank.opr.min=0.7&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"
Request for comparative sentiment analysis across markets:
curl -X GET "https://api.apitube.io/v1/news/everything?sentiment.overall.polarity=negative&source.country.code=us,uk,de&category.id=medtop:07000000&published_at.start=2023-01-01&published_at.end=2023-12-31&api_key=YOUR_API_KEY"
Request for sentiment divergence analysis by source type:
curl -X GET "https://api.apitube.io/v1/news/everything?topic.id=climate_change&sentiment.overall.score.min=0.6&source.domain=scientific.journals,mainstream.news&published_at.start=2023-01-01&api_key=YOUR_API_KEY"

のためのレシピ cURL

curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?sentiment.overall.score.min=0.7&category.id=medtop%3A04000000&organization.name=Tesla%2CSpaceX&published_at.start=2023-01-01&source.rank.opr.min=0.7&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY&per_page=20' \
--header 'Content-Type: application/json'

のためのレシピ Python

import requests

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

querystring = {
    "sentiment.overall.score.min": 0.7,
    "category.id": "medtop:04000000",
    "organization.name": "Tesla,SpaceX",
    "published_at.start": "2023-01-01",
    "source.rank.opr.min": 0.7,
    "sort.by": "sentiment.overall.score",
    "sort.order": "desc",
    "api_key": "YOUR_API_KEY",
    "per_page": 20
}
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: {
    "sentiment.overall.score.min": 0.7,
    "category.id": "medtop:04000000",
    "organization.name": "Tesla,SpaceX",
    "published_at.start": "2023-01-01",
    "source.rank.opr.min": 0.7,
    "sort.by": "sentiment.overall.score",
    "sort.order": "desc",
    "api_key": "YOUR_API_KEY",
    "per_page": 20
}};

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' => [
    'sentiment.overall.score.min' => 0.7,
    'category.id' => 'medtop:04000000',
    'organization.name' => 'Tesla,SpaceX',
    'published_at.start' => '2023-01-01',
    'source.rank.opr.min' => 0.7,
    'sort.by' => 'sentiment.overall.score',
    'sort.order' => 'desc',
    'api_key' => 'YOUR_API_KEY',
    'per_page' => 20,
],
]);

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?sentiment.overall.score.min=0.7&category.id=medtop%3A04000000&organization.name=Tesla%2CSpaceX&published_at.start=2023-01-01&source.rank.opr.min=0.7&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY&per_page=20")
		.method("POST", body)
		.addHeader("Content-Type", "application/json")
		.build();
Response response = client.newCall(request).execute();
		
  • CNN
  • Techcrunch
  • Vox
  • Apple
  • Microsoft
  • IBM
  • Bloomberg
  • Spotify