用户资料
curl --request GET \
--url https://api.sorsa.io/v3/info \
--header 'ApiKey: <api-key>'import requests
url = "https://api.sorsa.io/v3/info"
headers = {"ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {ApiKey: '<api-key>'}};
fetch('https://api.sorsa.io/v3/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/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sorsa.io/v3/info")
.header("ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}用户数据
用户资料
返回 Twitter/X 账号的公开资料,包括显示名称、简介、粉丝数、关注数、推文数、头像、账号创建日期和认证状态。请且仅请提供 user_link、username 或 user_id 中的一项来指定用户。
GET
/
info
用户资料
curl --request GET \
--url https://api.sorsa.io/v3/info \
--header 'ApiKey: <api-key>'import requests
url = "https://api.sorsa.io/v3/info"
headers = {"ApiKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {ApiKey: '<api-key>'}};
fetch('https://api.sorsa.io/v3/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/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ApiKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sorsa.io/v3/info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ApiKey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sorsa.io/v3/info")
.header("ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sorsa.io/v3/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}授权
查询参数
用户 Twitter/X 个人资料的完整 URL。
Twitter/X 用户名(不含 @)。
Twitter/X 数字用户 ID。
响应
成功
用户简介中的 URL。
账号是否接受私信。
示例:
false
账号创建日期,采用 ISO 8601 格式。
示例:
"2009-06-02T20:12:29Z"
个人资料简介文本。
示例:
"Bio text"
用户的显示名称。
示例:
"Elon Musk"
此用户点赞的推文总数。
示例:
1200
关注此用户的账号数。
示例:
100000
此用户关注的账号数。
示例:
500
唯一 Twitter/X 用户 ID。
示例:
"44196397"
用户资料中的所在地文本。
示例:
"Austin, TX"
此用户发布的媒体总数。
示例:
300
用户置顶推文的 ID。
账号是否被标记为可能包含敏感内容。
示例:
false
用户个人资料背景图片的 URL。
示例:
"https://pbs.twimg.com/profile_banners/44196397/123"
用户头像图片的 URL。
示例:
"https://pbs.twimg.com/profile_images/123/photo.jpg"
账号的推文是否受保护(私密)。
示例:
false
此用户发布的推文总数。
示例:
5000
当前 Twitter/X 用户名(不含 @)。
示例:
"elonmusk"
账号是否有认证徽章。
示例:
true
此页面对您有帮助吗?