推文数据
curl --request POST \
--url https://api.sorsa.io/v3/tweet-info \
--header 'ApiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"tweet_link": "<string>"
}
'import requests
url = "https://api.sorsa.io/v3/tweet-info"
payload = { "tweet_link": "<string>" }
headers = {
"ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ApiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tweet_link: '<string>'})
};
fetch('https://api.sorsa.io/v3/tweet-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sorsa.io/v3/tweet-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tweet_link' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/tweet-info"
payload := strings.NewReader("{\n \"tweet_link\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sorsa.io/v3/tweet-info")
.header("ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tweet_link\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/tweet-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tweet_link\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bookmark_count": 15,
"conversation_id_str": "1782368585664626774",
"created_at": "2024-01-15T10:30:00Z",
"entities": [
{
"link": "https://t.co/example",
"preview": "https://pbs.twimg.com/preview",
"type": "photo"
}
],
"full_text": "Hello world",
"id": "1782368585664626774",
"in_reply_to_tweet_id": "1782368585664626000",
"in_reply_to_username": "username",
"is_quote_status": false,
"is_replies_limited": false,
"is_reply": false,
"lang": "en",
"likes_count": 200,
"made_with_ai": false,
"paid_partnership": false,
"quote_count": 5,
"quoted_status": "<unknown>",
"reply_count": 10,
"retweet_count": 50,
"retweeted_status": "<unknown>",
"user": {
"bio_urls": [
"<string>"
],
"can_dm": false,
"created_at": "2009-06-02T20:12:29Z",
"description": "Bio text",
"display_name": "Elon Musk",
"favourites_count": 1200,
"followers_count": 100000,
"followings_count": 500,
"id": "44196397",
"location": "Austin, TX",
"media_count": 300,
"pinned_tweet_ids": [
"<string>"
],
"possibly_sensitive": false,
"profile_background_image_url": "https://pbs.twimg.com/profile_banners/44196397/123",
"profile_image_url": "https://pbs.twimg.com/profile_images/123/photo.jpg",
"protected": false,
"tweets_count": 5000,
"username": "elonmusk",
"verified": true
},
"view_count": 10000
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}推文
推文数据
通过 URL 返回单条推文的完整数据:文本、创建日期、语言、互动指标(点赞、转推、引用、回复、浏览、收藏)和作者资料。如果该推文为回复、引用或转推,也会包含内嵌的原始推文及其作者数据。
POST
/
tweet-info
推文数据
curl --request POST \
--url https://api.sorsa.io/v3/tweet-info \
--header 'ApiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"tweet_link": "<string>"
}
'import requests
url = "https://api.sorsa.io/v3/tweet-info"
payload = { "tweet_link": "<string>" }
headers = {
"ApiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {ApiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tweet_link: '<string>'})
};
fetch('https://api.sorsa.io/v3/tweet-info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sorsa.io/v3/tweet-info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tweet_link' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/tweet-info"
payload := strings.NewReader("{\n \"tweet_link\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("ApiKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sorsa.io/v3/tweet-info")
.header("ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tweet_link\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/tweet-info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tweet_link\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bookmark_count": 15,
"conversation_id_str": "1782368585664626774",
"created_at": "2024-01-15T10:30:00Z",
"entities": [
{
"link": "https://t.co/example",
"preview": "https://pbs.twimg.com/preview",
"type": "photo"
}
],
"full_text": "Hello world",
"id": "1782368585664626774",
"in_reply_to_tweet_id": "1782368585664626000",
"in_reply_to_username": "username",
"is_quote_status": false,
"is_replies_limited": false,
"is_reply": false,
"lang": "en",
"likes_count": 200,
"made_with_ai": false,
"paid_partnership": false,
"quote_count": 5,
"quoted_status": "<unknown>",
"reply_count": 10,
"retweet_count": 50,
"retweeted_status": "<unknown>",
"user": {
"bio_urls": [
"<string>"
],
"can_dm": false,
"created_at": "2009-06-02T20:12:29Z",
"description": "Bio text",
"display_name": "Elon Musk",
"favourites_count": 1200,
"followers_count": 100000,
"followings_count": 500,
"id": "44196397",
"location": "Austin, TX",
"media_count": 300,
"pinned_tweet_ids": [
"<string>"
],
"possibly_sensitive": false,
"profile_background_image_url": "https://pbs.twimg.com/profile_banners/44196397/123",
"profile_image_url": "https://pbs.twimg.com/profile_images/123/photo.jpg",
"protected": false,
"tweets_count": 5000,
"username": "elonmusk",
"verified": true
},
"view_count": 10000
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}授权
请求体
application/json
推文链接必填
完整推文 URL(例如 https://x.com/user/status/123)或推文 ID。
响应
成功
推文被收藏的次数。
示例:
15
对话讨论串中根推文的 ID。
示例:
"1782368585664626774"
推文发布日期,采用 ISO 8601 格式。
示例:
"2024-01-15T10:30:00Z"
推文附带的媒体、链接及其他内嵌实体。
Show child attributes
Show child attributes
推文的完整文本内容。
示例:
"Hello world"
唯一推文 ID。
示例:
"1782368585664626774"
此推文回复的推文 ID。非回复推文时为 null。
示例:
"1782368585664626000"
此推文所回复账号的用户名。
示例:
"username"
此推文是否引用另一条推文。
示例:
false
作者是否限制了此推文的回复。
示例:
false
此推文是否为对另一条推文的回复。
示例:
false
检测到的推文语言代码,例如 en、es。
示例:
"en"
推文的点赞数。
示例:
200
推文是否由 AI 制作。
示例:
false
推文是否属于付费合作。
示例:
false
引用推文数。
示例:
5
被引用的原始推文。仅在 is_quote_status 为 true 时存在。
推文的回复数。
示例:
10
转推数。
示例:
50
被转推的原始推文。仅在转推时存在。
推文作者。
Show child attributes
Show child attributes
浏览次数(展示次数)。
示例:
10000
此页面对您有帮助吗?