地域間メディアバイアス分析
異なる地域が特定のトピックをどのようにカバーしているかを比較し、カバレッジが肯定的、否定的、または中立的であるかを示し、日付範囲でフィルタリングします
入力パラメータ
| パラメータ | 説明 | タイプ | デフォルト | 必須 |
|---|---|---|---|---|
| title | トピックを検索。 | string | はい | |
| source.country.code | 複数の国コード(カンマ区切り)。 | string | はい | |
| sort.by | センチメントスコアで並べ替え。 | string | はい | |
| published_at.start | 開始日フィルター。 | string | はい | |
| published_at.end | 終了日フィルター。 | string | はい | |
| facet | フィールドごとに記事数をカウントします。 | boolean | true | はい |
| facet.field | 記事をグループ化して件数を集計するフィールド。 | string | はい | |
| api_key | あなたのAPIキー | string | はい | |
| per_page | 取得する記事の最大数 | integer | 50 | いいえ |
ワークフロー例
地域間メディアバイアス分析:
curl -X GET "https://api.apitube.io/v1/news/everything?title=climate%20change&source.country.code=us,cn,in&sort.by=sentiment.overall.score&published_at.start=2023-01-01&published_at.end=2023-01-31&api_key=YOUR_API_KEY"
メディアバイアス分布:
curl -X GET "https://api.apitube.io/v1/news/everything?title=climate%20change&facet=true&facet.field=source.bias,source.country.id&api_key=YOUR_API_KEY"
関連する例
- 複数のフィルターを持つグループ化された結果をカウント
- 地政学的なイベントに関するニュースを分析する
- 分析のためにフィールドごとの記事数を取得
- 人物が言及されている組織を見つける
- エンゲージメントスコアでソートします
のためのレシピ cURL
curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?title=climate+change&source.country.code=us%2Ccn%2Cin&sort.by=sentiment.overall.score&published_at.start=2023-01-01&published_at.end=2023-12-31&facet=1&facet.field=source.bias%2Csource.country.id&api_key=YOUR_API_KEY&per_page=50' \
--header 'Content-Type: application/json'
のためのレシピ Python
import requests
url = "https://api.apitube.io/v1/news/everything"
querystring = {
"title": "climate change",
"source.country.code": "us,cn,in",
"sort.by": "sentiment.overall.score",
"published_at.start": "2023-01-01",
"published_at.end": "2023-12-31",
"facet": true,
"facet.field": "source.bias,source.country.id",
"api_key": "YOUR_API_KEY",
"per_page": 50
}
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: {
"title": "climate change",
"source.country.code": "us,cn,in",
"sort.by": "sentiment.overall.score",
"published_at.start": "2023-01-01",
"published_at.end": "2023-12-31",
"facet": true,
"facet.field": "source.bias,source.country.id",
"api_key": "YOUR_API_KEY",
"per_page": 50
}};
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' => [
'title' => 'climate change',
'source.country.code' => 'us,cn,in',
'sort.by' => 'sentiment.overall.score',
'published_at.start' => '2023-01-01',
'published_at.end' => '2023-12-31',
'facet' => 1,
'facet.field' => 'source.bias,source.country.id',
'api_key' => 'YOUR_API_KEY',
'per_page' => 50,
],
]);
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?title=climate+change&source.country.code=us%2Ccn%2Cin&sort.by=sentiment.overall.score&published_at.start=2023-01-01&published_at.end=2023-12-31&facet=1&facet.field=source.bias%2Csource.country.id&api_key=YOUR_API_KEY&per_page=50")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();