การวิเคราะห์ช่วงวันที่ที่ซับซ้อนพร้อมประทับเวลาที่แม่นยำ
วิเคราะห์เหตุการณ์ภายในกรอบเวลาที่แม่นยำโดยใช้ประทับเวลา ISO 8601 พร้อมตัวกรองหลายรายการ
พารามิเตอร์อินพุต
| พารามิเตอร์ | คำอธิบาย | ประเภท | ค่าเริ่มต้น | จำเป็น |
|---|---|---|---|---|
| title | ค้นหาชื่อองค์กร | string | ใช่ | |
| published_at.start | ประทับเวลาเริ่มต้นที่แม่นยำ (ISO 8601). | string | ใช่ | |
| published_at.end | ประทับเวลาสิ้นสุดที่แม่นยำ (ISO 8601). | string | ใช่ | |
| sort.by | จัดเรียงตามวันที่เผยแพร่ | string | ใช่ | |
| sort.order | ลำดับจากน้อยไปมากสำหรับไทม์ไลน์ | string | ใช่ | |
| source.rank.opr.min | คุณภาพแหล่งข่าวขั้นต่ำ | string | ใช่ | |
| api_key | คีย์ API ของคุณ | string | ใช่ | |
| per_page | จำนวนบทความสูงสุดที่จะดึง | integer | 50 | ไม่ |
ตัวอย่างขั้นตอนการทำงาน
การวิเคราะห์ช่วงวันที่ที่ซับซ้อนพร้อมประทับเวลาที่แม่นยำ:
curl -X GET "https://api.apitube.io/v1/news/everything?title=Federal%20Reserve&published_at.start=2023-03-21T14:00:00Z&published_at.end=2023-03-22T14:00:00Z&sort.by=published_at&sort.order=asc&api_key=YOUR_API_KEY"
ตัวอย่างที่เกี่ยวข้อง
- รับข่าวสารในวันที่กำหนด
- รับข่าวสารในช่วงเวลาที่กำหนด
- รับข่าวสารที่จัดเรียงตามวันที่
- ค้นหาข้อความที่ตรงกันในหัวข้อ
- รับบทความจากแหล่งพรีเมียม
สูตรสำหรับ cURL
curl --location --globoff --request POST 'https://api.apitube.io/v1/news/everything?title=Federal+Reserve&published_at.start=2023-03-21T14%3A00%3A00Z&published_at.end=2023-03-22T14%3A00%3A00Z&sort.by=published_at&sort.order=asc&source.rank.opr.min=0.7&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 = {
"title": "Federal Reserve",
"published_at.start": "2023-03-21T14:00:00Z",
"published_at.end": "2023-03-22T14:00:00Z",
"sort.by": "published_at",
"sort.order": "asc",
"source.rank.opr.min": 0.7,
"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: {
"title": "Federal Reserve",
"published_at.start": "2023-03-21T14:00:00Z",
"published_at.end": "2023-03-22T14:00:00Z",
"sort.by": "published_at",
"sort.order": "asc",
"source.rank.opr.min": 0.7,
"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' => [
'title' => 'Federal Reserve',
'published_at.start' => '2023-03-21T14:00:00Z',
'published_at.end' => '2023-03-22T14:00:00Z',
'sort.by' => 'published_at',
'sort.order' => 'asc',
'source.rank.opr.min' => 0.7,
'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?title=Federal+Reserve&published_at.start=2023-03-21T14%3A00%3A00Z&published_at.end=2023-03-22T14%3A00%3A00Z&sort.by=published_at&sort.order=asc&source.rank.opr.min=0.7&api_key=YOUR_API_KEY&per_page=50")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();