Complete news monitoring solution
Comprehensive news monitoring with all advanced features: filtering, sorting, faceting, highlighting, and export
พารามิเตอร์อินพุต
| Parameter | Description | Type | Default | Required |
|---|---|---|---|---|
| organization.name | Multiple organizations (comma-separated). | string | Yes | |
| title | Keywords (comma-separated). | string | Yes | |
| category.id | Category filter. | string | Yes | |
| sentiment.overall.polarity | Sentiment filter. | string | Yes | |
| published_at.start | Start date filter. | string | Yes | |
| source.rank.opr.min | Minimum source quality. | string | Yes | |
| is_duplicate | Exclude duplicates. | integer | 0 | Yes |
| has_image | Require images. | integer | 1 | Yes |
| sort.by | Sort by quality score. | string | Yes | |
| sort.order | Descending order. | string | Yes | |
| facet | Enable faceting. | boolean | true | Yes |
| facet.field | Fields for faceting. | string | Yes | |
| hl | Enable highlighting. | boolean | true | Yes |
| hl.fl | Fields to highlight. | string | Yes | |
| per_page | Maximum number of articles to retrieve. | integer | 50 | Yes |
| api_key | Your API key. | string | Yes |
Workflow examples
Request for complete news monitoring solution:
curl -X GET "https://api.apitube.io/v1/news/everything?organization.name=Apple,Google,Microsoft&title=innovation,technology&category.id=medtop:04000000&sentiment.overall.polarity=positive&published_at.start=2024-01-01&source.rank.opr.min=0.7&is_duplicate=0&has_image=1&sort.by=quality&sort.order=desc&facet=true&facet.field=source.id,language.id&hl=true&hl.fl=title,description&per_page=50&api_key=YOUR_API_KEY"
Request for export to Excel:
curl -X GET "https://api.apitube.io/v1/news/everything?organization.name=Apple,Google,Microsoft&published_at.start=2024-01-01&export=xlsx&api_key=YOUR_API_KEY" -o monitoring_report.xlsx
สูตรสำหรับ cURL
curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?organization.name=Apple%2CGoogle%2CMicrosoft&title=innovation%2Ctechnology&category.id=medtop%3A04000000&sentiment.overall.polarity=positive&published_at.start=2024-01-01&source.rank.opr.min=0.7&is_duplicate=0&has_image=1&sort.by=quality&sort.order=desc&facet=1&facet.field=source.id%2Clanguage.id&hl=1&hl.fl=title%2Cdescription&per_page=50&api_key=YOUR_API_KEY' \
--header 'Content-Type: application/json'
สูตรสำหรับ Python
import requests
url = "https://api.apitube.io/v1/news/everything"
querystring = {
"organization.name": "Apple,Google,Microsoft",
"title": "innovation,technology",
"category.id": "medtop:04000000",
"sentiment.overall.polarity": "positive",
"published_at.start": "2024-01-01",
"source.rank.opr.min": 0.7,
"is_duplicate": 0,
"has_image": 1,
"sort.by": "quality",
"sort.order": "desc",
"facet": true,
"facet.field": "source.id,language.id",
"hl": true,
"hl.fl": "title,description",
"per_page": 50,
"api_key": "YOUR_API_KEY"
}
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: {
"organization.name": "Apple,Google,Microsoft",
"title": "innovation,technology",
"category.id": "medtop:04000000",
"sentiment.overall.polarity": "positive",
"published_at.start": "2024-01-01",
"source.rank.opr.min": 0.7,
"is_duplicate": 0,
"has_image": 1,
"sort.by": "quality",
"sort.order": "desc",
"facet": true,
"facet.field": "source.id,language.id",
"hl": true,
"hl.fl": "title,description",
"per_page": 50,
"api_key": "YOUR_API_KEY"
}};
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' => [
'organization.name' => 'Apple,Google,Microsoft',
'title' => 'innovation,technology',
'category.id' => 'medtop:04000000',
'sentiment.overall.polarity' => 'positive',
'published_at.start' => '2024-01-01',
'source.rank.opr.min' => 0.7,
'is_duplicate' => 0,
'has_image' => 1,
'sort.by' => 'quality',
'sort.order' => 'desc',
'facet' => 1,
'facet.field' => 'source.id,language.id',
'hl' => 1,
'hl.fl' => 'title,description',
'per_page' => 50,
'api_key' => 'YOUR_API_KEY',
],
]);
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?organization.name=Apple%2CGoogle%2CMicrosoft&title=innovation%2Ctechnology&category.id=medtop%3A04000000&sentiment.overall.polarity=positive&published_at.start=2024-01-01&source.rank.opr.min=0.7&is_duplicate=0&has_image=1&sort.by=quality&sort.order=desc&facet=1&facet.field=source.id%2Clanguage.id&hl=1&hl.fl=title%2Cdescription&per_page=50&api_key=YOUR_API_KEY")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();