รับข่าวสารแบบภาพพร้อมการวิเคราะห์น้ำเสียง (เชิงบวก เชิงลบ หรือเป็นกลาง)
รับเนื้อหาพรีเมียมพร้อมรูปภาพคุณภาพสูงและน้ำเสียงเชิงบวกจากแหล่งที่เชื่อถือได้
พารามิเตอร์อินพุต
| พารามิเตอร์ | คำอธิบาย | ประเภท | ค่าเริ่มต้น | จำเป็น |
|---|---|---|---|---|
| media.images.width.min | ความกว้างขั้นต่ำของรูปภาพเป็นพิกเซล | integer | ใช่ | |
| media.images.height.min | ความสูงขั้นต่ำของรูปภาพเป็นพิกเซล | integer | ใช่ | |
| media.images.count | จำนวนรูปภาพขั้นต่ำ | integer | ใช่ | |
| sentiment.overall.polarity | กรองตามน้ำเสียงเชิงบวก | string | ใช่ | |
| category.id | ตัวกรองหมวดหมู่ | string | ใช่ | |
| source.rank.opr.min | อันดับคุณภาพแหล่งข่าวขั้นต่ำ | string | ใช่ | |
| api_key | คีย์ API ของคุณ | string | ใช่ | |
| per_page | จำนวนบทความสูงสุดที่จะดึง | integer | 15 | ไม่ |
ตัวอย่างขั้นตอนการทำงาน
ข่าวภาพคุณภาพสูง:
curl -X GET "https://api.apitube.io/v1/news/everything?media.images.width.min=1200&media.images.height.min=800&media.images.count=2&sentiment.overall.polarity=positive&category.id=medtop:13000000&source.rank.opr.min=5&api_key=YOUR_API_KEY"
เลือกเนื้อหาที่มีรูปภาพและวิดีโอ:
curl -X GET "https://api.apitube.io/v1/news/everything?media.images.count=3&media.videos.count=1&category.id=medtop:13000000&published_at.start=2023-01-01&sort.by=published_at&sort.order=desc&api_key=YOUR_API_KEY"
การวิเคราะห์เนื้อหาวิดีโอสำหรับหัวข้อทางการศึกษา:
curl -X GET "https://api.apitube.io/v1/news/everything?media.videos.count=2&title=education,learning,tutorial&published_at.start=2023-01-01&published_at.end=2023-01-31&sort.by=media.videos.count&sort.order=desc&api_key=YOUR_API_KEY"
ตัวอย่างที่เกี่ยวข้อง
- รับบทความที่มีรูปภาพคุณภาพสูง
- รับเนื้อหาที่พร้อมสำหรับ Instagram
- รับบทความที่มีรูปภาพและวิดีโอ
- รับข่าวสารที่มีสื่อขนาดใหญ่
- รับบทความพร้อมรูปภาพแนวนอน
สูตรสำหรับ cURL
curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?media.images.width.min=1200&media.images.height.min=800&media.images.count=2&sentiment.overall.polarity=positive&category.id=medtop%3A13000000&source.rank.opr.min=5&api_key=YOUR_API_KEY&per_page=15' \
--header 'Content-Type: application/json'
สูตรสำหรับ Python
import requests
url = "https://api.apitube.io/v1/news/everything"
querystring = {
"media.images.width.min": 1200,
"media.images.height.min": 800,
"media.images.count": 2,
"sentiment.overall.polarity": "positive",
"category.id": "medtop:13000000",
"source.rank.opr.min": 5,
"api_key": "YOUR_API_KEY",
"per_page": 15
}
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: {
"media.images.width.min": 1200,
"media.images.height.min": 800,
"media.images.count": 2,
"sentiment.overall.polarity": "positive",
"category.id": "medtop:13000000",
"source.rank.opr.min": 5,
"api_key": "YOUR_API_KEY",
"per_page": 15
}};
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' => [
'media.images.width.min' => 1200,
'media.images.height.min' => 800,
'media.images.count' => 2,
'sentiment.overall.polarity' => 'positive',
'category.id' => 'medtop:13000000',
'source.rank.opr.min' => 5,
'api_key' => 'YOUR_API_KEY',
'per_page' => 15,
],
]);
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?media.images.width.min=1200&media.images.height.min=800&media.images.count=2&sentiment.overall.polarity=positive&category.id=medtop%3A13000000&source.rank.opr.min=5&api_key=YOUR_API_KEY&per_page=15")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();