ข่าวเด่นเรียงตามการมีส่วนร่วม พร้อมรูปภาพและวิดีโอ

เรียงลำดับข่าวด่วนตามศักยภาพการมีส่วนร่วม กรองตามข้อกำหนดสื่อและคุณภาพแหล่งที่มา

พารามิเตอร์อินพุต

พารามิเตอร์คำอธิบายประเภทค่าเริ่มต้นจำเป็น
is_breakingกรองบทความข่าวล่าสุดinteger1ใช่
media.images.count.minจำนวนรูปภาพขั้นต่ำintegerใช่
sort.byจัดเรียงตามคะแนนการมีส่วนร่วมstringใช่
sort.orderลำดับจากมากไปน้อยstringใช่
source.rank.opr.minคุณภาพแหล่งข่าวขั้นต่ำstringใช่
is_duplicateไม่รวมรายการซ้ำinteger0ใช่
api_keyคีย์ API ของคุณstringใช่
per_pageจำนวนบทความสูงสุดที่จะดึงinteger30ไม่

ตัวอย่างขั้นตอนการทำงาน

ข่าวเด่นที่น่าสนใจพร้อมสื่อ:
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"
การติดตามข่าวสารล่าสุดเท่านั้น:
curl -X GET "https://api.apitube.io/v1/news/everything?is_breaking=1&api_key=YOUR_API_KEY"
คำขอสำหรับการกระจายข่าวสารด่วนตามชั่วโมง:
curl -X GET "https://api.apitube.io/v1/news/everything?is_breaking=1&facet=true&facet.field=published.hour,category.id&api_key=YOUR_API_KEY"

ตัวอย่างที่เกี่ยวข้อง

สูตรสำหรับ 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'

สูตรสำหรับ 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)

สูตรสำหรับ 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);
});

สูตรสำหรับ 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();

สูตรสำหรับ 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
เราใช้คุกกี้

โดยการคลิก "ยอมรับ" คุณยอมรับคุกกี้บนอุปกรณ์ของคุณเพื่อให้เว็บไซต์ทำงานได้และเพื่อการวิเคราะห์