การวิเคราะห์ความเชี่ยวชาญของผู้เขียนพร้อมการติดตามข้ามแหล่ง
ติดตามสิ่งที่นักเขียนแต่ละคนเขียนในแหล่งข่าวหลายแห่ง กรองตามหมวดหมู่หัวข้อ และดูว่าข่าวสารเป็นไปในเชิงบวก เชิงลบ หรือเป็นกลาง
พารามิเตอร์อินพุต
| พารามิเตอร์ | คำอธิบาย | ประเภท | ค่าเริ่มต้น | จำเป็น |
|---|---|---|---|---|
| author.name | ชื่อผู้เขียนที่ต้องการติดตาม | string | ใช่ | |
| category.id | ตัวกรองหมวดหมู่ | string | ใช่ | |
| sort.by | จัดเรียงตามวันที่เผยแพร่ | string | ใช่ | |
| sort.order | ลำดับจากมากไปน้อย | string | ใช่ | |
| per_page | จำนวนบทความสูงสุดที่จะดึง | integer | 10 | ใช่ |
| source.rank.opr.min | คุณภาพแหล่งข่าวขั้นต่ำ | string | ใช่ | |
| api_key | คีย์ API ของคุณ | string | ใช่ |
ตัวอย่างขั้นตอนการทำงาน
คำขอสำหรับการวิเคราะห์ความเชี่ยวชาญของผู้เขียน:
curl -X GET "https://api.apitube.io/v1/news/everything?author.name=Ezra%20Klein&category.id=medtop:11000000&sort.by=published_at&sort.order=desc&per_page=10&api_key=YOUR_API_KEY"
ดูว่าความครอบคลุมของผู้เขียนมีแนวโน้มที่จะเป็นบวก เชิงลบ หรือเป็นกลางหรือไม่:
curl -X GET "https://api.apitube.io/v1/news/everything?author.name=Reuters,Associated%20Press&organization.name=JPMorgan%20Chase&published_at.start=2023-01-01&sort.by=sentiment.overall.score&api_key=YOUR_API_KEY"
คำขอสำหรับการติดตามวิวัฒนาการหัวข้อของผู้เขียน:
curl -X GET "https://api.apitube.io/v1/news/everything?author.name=Yuval%20Noah%20Harari&published_at.start=2018-01-01&published_at.end=2023-12-31&sort.by=published_at&sort.order=asc&per_page=100&api_key=YOUR_API_KEY"
ตัวอย่างที่เกี่ยวข้อง
- รับข่าวสารตามผู้เขียนเฉพาะ
- ค้นหาว่าบุคคลนั้นถูกกล่าวถึงร่วมกับองค์กรใดบ้าง
- รับบทความล่าสุดจากบล็อกเทคโนโลยีชั้นนำ
- รับบทความจากแหล่งพรีเมียม
- รับข่าวสารจากสิ่งพิมพ์เฉพาะ
สูตรสำหรับ cURL
curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?author.name=Ezra+Klein&category.id=medtop%3A11000000&sort.by=published_at&sort.order=desc&per_page=10&source.rank.opr.min=0.7&api_key=YOUR_API_KEY' \
--header 'Content-Type: application/json'
สูตรสำหรับ Python
import requests
url = "https://api.apitube.io/v1/news/everything"
querystring = {
"author.name": "Ezra Klein",
"category.id": "medtop:11000000",
"sort.by": "published_at",
"sort.order": "desc",
"per_page": 10,
"source.rank.opr.min": 0.7,
"api_key": "YOUR_API_KEY"
}
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: {
"author.name": "Ezra Klein",
"category.id": "medtop:11000000",
"sort.by": "published_at",
"sort.order": "desc",
"per_page": 10,
"source.rank.opr.min": 0.7,
"api_key": "YOUR_API_KEY"
}};
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' => [
'author.name' => 'Ezra Klein',
'category.id' => 'medtop:11000000',
'sort.by' => 'published_at',
'sort.order' => 'desc',
'per_page' => 10,
'source.rank.opr.min' => 0.7,
'api_key' => 'YOUR_API_KEY',
],
]);
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?author.name=Ezra+Klein&category.id=medtop%3A11000000&sort.by=published_at&sort.order=desc&per_page=10&source.rank.opr.min=0.7&api_key=YOUR_API_KEY")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();