Get articles with consistent image sizes

Filter articles with consistent image sizes for curated galleries

Invoerparameter

ParameterDescriptionTypeDefaultRequired
has_consistent_image_sizesFilter articles with consistent image sizes (variance < 200px).integerYes
has_multiple_imagesFilter articles with 2 or more images.integerNo
api_keyYour API key.stringYes
per_pageMaximum number of articles to retrieve.integer20No

Workflow examples

Request for consistent visual content:
curl -X GET "https://api.apitube.io/v1/news/everything?has_consistent_image_sizes=1&has_multiple_images=1&api_key=YOUR_API_KEY"
Request for mixed media articles:
curl -X GET "https://api.apitube.io/v1/news/everything?has_mixed_media=1&sort.by=media.images.count&sort.order=desc&api_key=YOUR_API_KEY"

Recept voor cURL

curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?has_consistent_image_sizes=1&has_multiple_images=1&api_key=YOUR_API_KEY&per_page=10' \
--header 'Content-Type: application/json'

Recept voor Python

import requests

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

querystring = {
    "has_consistent_image_sizes": 1,
    "has_multiple_images": 1,
    "api_key": "YOUR_API_KEY",
    "per_page": 10
}
response = requests.request("GET", url, params=querystring)

print(response.text)

Recept voor Javascript

import axios from "axios"

const options = {
		method: 'GET',
		url: 'https://api.apitube.io/v1/news/everything',
		params: {
    "has_consistent_image_sizes": 1,
    "has_multiple_images": 1,
    "api_key": "YOUR_API_KEY",
    "per_page": 10
}};

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

Recept voor PHP

require 'vendor/autoload.php';

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('GET', 'https://api.apitube.io/v1/news/everything', [
	'query' => [
    'has_consistent_image_sizes' => 1,
    'has_multiple_images' => 1,
    'api_key' => 'YOUR_API_KEY',
    'per_page' => 10,
],
]);

echo $response->getBody();

Recept voor 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?has_consistent_image_sizes=1&has_multiple_images=1&api_key=YOUR_API_KEY&per_page=10")
		.method("POST", body)
		.addHeader("Content-Type", "application/json")
		.build();
Response response = client.newCall(request).execute();
		
  • CNN
  • Techcrunch
  • Vox
  • Apple
  • Microsoft
  • IBM
  • Bloomberg
  • Spotify