Get articles with landscape-oriented images
Filter articles with landscape-oriented images ideal for headers and banners
入力パラメータ
| Parameter | Description | Type | Default | Required |
|---|---|---|---|---|
| is_landscape_media | Filter articles with landscape-oriented images (width > height). | integer | Yes | |
| has_fullhd_images | Filter articles with Full HD images (width >= 1920px). | integer | No | |
| api_key | Your API key. | string | Yes | |
| per_page | Maximum number of articles to retrieve. | integer | 20 | No |
Workflow examples
Request for landscape-oriented images:
curl -X GET "https://api.apitube.io/v1/news/everything?is_landscape_media=1&has_fullhd_images=1&api_key=YOUR_API_KEY"
Request for portrait-oriented images:
curl -X GET "https://api.apitube.io/v1/news/everything?is_portrait_media=1&has_mobile_optimized_images=1&api_key=YOUR_API_KEY"
のためのレシピ cURL
curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?is_landscape_media=1&has_fullhd_images=1&api_key=YOUR_API_KEY&per_page=10' \
--header 'Content-Type: application/json'
のためのレシピ Python
import requests
url = "https://api.apitube.io/v1/news/everything"
querystring = {
"is_landscape_media": 1,
"has_fullhd_images": 1,
"api_key": "YOUR_API_KEY",
"per_page": 10
}
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: {
"is_landscape_media": 1,
"has_fullhd_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);
});
のためのレシピ PHP
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://api.apitube.io/v1/news/everything', [
'query' => [
'is_landscape_media' => 1,
'has_fullhd_images' => 1,
'api_key' => 'YOUR_API_KEY',
'per_page' => 10,
],
]);
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?is_landscape_media=1&has_fullhd_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();