ติดตามความถี่ที่บุคคล บริษัท หรือสถานที่ปรากฏร่วมกันเมื่อเวลาผ่านไป
ติดตามความถี่ที่บุคคล บริษัท หรือสถานที่ปรากฏร่วมกันเมื่อเวลาผ่านไป ดูว่าข่าวสารเป็นไปในเชิงบวก เชิงลบ หรือเป็นกลาง และกรองตามแหล่งข่าว
พารามิเตอร์อินพุต
| พารามิเตอร์ | คำอธิบาย | ประเภท | ค่าเริ่มต้น | จำเป็น |
|---|---|---|---|---|
| entity.id | ID เอนทิตีหลายรายการ คั่นด้วยจุลภาค | string | ใช่ | |
| published_at.start | วันที่เริ่มต้นสำหรับช่วงเวลา | string | ใช่ | |
| published_at.end | วันที่สิ้นสุดสำหรับช่วงเวลา | string | ใช่ | |
| sort.by | จัดเรียงตามคะแนนความรู้สึก | string | ใช่ | |
| sort.order | ลำดับจากมากไปน้อย | string | ใช่ | |
| is_duplicate | ไม่รวมรายการซ้ำ | integer | 0 | ใช่ |
| api_key | คีย์ API ของคุณ | string | ใช่ | |
| per_page | จำนวนบทความสูงสุดที่จะดึง | integer | 50 | ไม่ |
ตัวอย่างขั้นตอนการทำงาน
ดูว่าบุคคล องค์กร และสถานที่ใดปรากฏร่วมกันในบทความ:
curl -X GET "https://api.apitube.io/v1/news/everything?entity.id=1278268,1282301&published_at.start=2023-01-01&published_at.end=2023-12-31&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"
ติดตามการกล่าวถึงบุคคล องค์กร หรือสถานที่เมื่อเวลาผ่านไป:
curl -X GET "https://api.apitube.io/v1/news/everything?entity.id=1278268&published_at.start=2022-01-01&published_at.end=2023-12-31&per_page=100&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"
ดูว่าบุคคล องค์กร และสถานที่ใดถูกกล่าวถึงร่วมกัน:
curl -X GET "https://api.apitube.io/v1/news/everything?entity.id=1278268&organization.name=Tesla&published_at.start=2023-01-01&published_at.end=2023-12-31&sort.by=published_at&api_key=YOUR_API_KEY"
ดูว่าบุคคล องค์กร หรือสถานที่ส่งผลต่อความครอบคลุมของตลาดที่เป็นบวก เชิงลบ หรือเป็นกลางอย่างไร:
curl -X GET "https://api.apitube.io/v1/news/everything?entity.id=1278268,1282301&category.id=medtop:04000000&sentiment.overall.score.min=0.7&published_at.start=2023-01-01&sort.by=sentiment.overall.score&sort.order=desc&api_key=YOUR_API_KEY"
ตัวอย่างที่เกี่ยวข้อง
- ค้นหาว่าบุคคลนั้นถูกกล่าวถึงร่วมกับองค์กรใดบ้าง
- การวิเคราะห์ชื่อเสียงของแบรนด์
- ติดตามคู่แข่งของคุณ
- กรองบทความที่กล่าวถึงบุคคล
- เรียงลำดับตามคะแนนการมีส่วนร่วม
สูตรสำหรับ cURL
curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?entity.id=1278268%2C1282301&published_at.start=2023-01-01&published_at.end=2023-12-31&sort.by=sentiment.overall.score&sort.order=desc&is_duplicate=0&api_key=YOUR_API_KEY&per_page=50' \
--header 'Content-Type: application/json'
สูตรสำหรับ Python
import requests
url = "https://api.apitube.io/v1/news/everything"
querystring = {
"entity.id": "1278268,1282301",
"published_at.start": "2023-01-01",
"published_at.end": "2023-12-31",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"is_duplicate": 0,
"api_key": "YOUR_API_KEY",
"per_page": 50
}
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: {
"entity.id": "1278268,1282301",
"published_at.start": "2023-01-01",
"published_at.end": "2023-12-31",
"sort.by": "sentiment.overall.score",
"sort.order": "desc",
"is_duplicate": 0,
"api_key": "YOUR_API_KEY",
"per_page": 50
}};
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' => [
'entity.id' => '1278268,1282301',
'published_at.start' => '2023-01-01',
'published_at.end' => '2023-12-31',
'sort.by' => 'sentiment.overall.score',
'sort.order' => 'desc',
'is_duplicate' => 0,
'api_key' => 'YOUR_API_KEY',
'per_page' => 50,
],
]);
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?entity.id=1278268%2C1282301&published_at.start=2023-01-01&published_at.end=2023-12-31&sort.by=sentiment.overall.score&sort.order=desc&is_duplicate=0&api_key=YOUR_API_KEY&per_page=50")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();