Breaking news with engagement sorting and media

Get breaking news sorted by engagement potential with media requirements and source quality

Parámetros de entrada

ParameterDescriptionTypeDefaultRequired
is_breakingFilter breaking news articles.integer1Yes
media.images.count.minMinimum number of images.integerYes
sort.bySort by engagement score.stringYes
sort.orderDescending order.stringYes
source.rank.opr.minMinimum source quality.stringYes
is_duplicateExclude duplicates.integer0Yes
api_keyYour API key.stringYes
per_pageMaximum number of articles to retrieve.integer30No

Workflow examples

Request for engaging breaking news with media:
curl -X GET "https://api.apitube.io/v1/news/everything?is_breaking=1&media.images.count.min=2&sort.by=engagement&sort.order=desc&api_key=YOUR_API_KEY"
Request for only breaking news monitoring:
curl -X GET "https://api.apitube.io/v1/news/everything?is_breaking=1&api_key=YOUR_API_KEY"
Request for breaking news distribution by hour:
curl -X GET "https://api.apitube.io/v1/news/everything?is_important=1&facet=true&facet.field=published.hour,category.id&api_key=YOUR_API_KEY"

Receta para cURL

curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?is_breaking=1&media.images.count.min=2&sort.by=engagement&sort.order=desc&source.rank.opr.min=0.6&is_duplicate=0&api_key=YOUR_API_KEY&per_page=30' \
--header 'Content-Type: application/json'

Receta para Python

import requests

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

querystring = {
    "is_breaking": 1,
    "media.images.count.min": 2,
    "sort.by": "engagement",
    "sort.order": "desc",
    "source.rank.opr.min": 0.6,
    "is_duplicate": 0,
    "api_key": "YOUR_API_KEY",
    "per_page": 30
}
response = requests.request("GET", url, params=querystring)

print(response.text)

Receta para Javascript

import axios from "axios"

const options = {
		method: 'GET',
		url: 'https://api.apitube.io/v1/news/everything',
		params: {
    "is_breaking": 1,
    "media.images.count.min": 2,
    "sort.by": "engagement",
    "sort.order": "desc",
    "source.rank.opr.min": 0.6,
    "is_duplicate": 0,
    "api_key": "YOUR_API_KEY",
    "per_page": 30
}};

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

Receta para PHP

require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://api.apitube.io/v1/news/everything', [
	'query' => [
    'is_breaking' => 1,
    'media.images.count.min' => 2,
    'sort.by' => 'engagement',
    'sort.order' => 'desc',
    'source.rank.opr.min' => 0.6,
    'is_duplicate' => 0,
    'api_key' => 'YOUR_API_KEY',
    'per_page' => 30,
],
]);

echo $response->getBody();

Receta para 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?is_breaking=1&media.images.count.min=2&sort.by=engagement&sort.order=desc&source.rank.opr.min=0.6&is_duplicate=0&api_key=YOUR_API_KEY&per_page=30")
		.method("POST", body)
		.addHeader("Content-Type", "application/json")
		.build();
Response response = client.newCall(request).execute();
		
  • CNN
  • Techcrunch
  • Vox
  • Apple
  • Microsoft
  • IBM
  • Bloomberg
  • Spotify