映
X (Twitter) API
3 endpointsSocial & VideoGlobalsocial:read2 real examples
Returns the text, author, counters and media of a public tweet, and the latest tweets of an account.
View as Markdown| GET | /twitter/tweet | Text, author, counters and media of one public tweet. |
| GET | /twitter/profileTimeline | The latest tweets of one account, about 20, newest first. X gives no cursor for older ones. |
| GET | /twitter/profile | One X account's profile: name, bio, location, verified status, and follower, following and post counts. |
tweet
GET
/v1/twitter/tweetText, author, counters and media of one public tweet.
scope social:read1 unitcached 5 min
Parameters
idstring required | Tweet id, or an x.com or twitter.com status URL. e.g. 20 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
20 fields
author | Author |
avatar | string |
id | string |
name | string |
username | string |
verified | boolean |
createdAt | string |
id | string |
lang | string |
likeCount | integer (int64) |
media | Media[] |
height | any |
type | string |
url | string |
video | string |
width | any |
possiblySensitive | boolean |
replyCount | integer (int64) |
text | string |
url | string |
curl "https://api.hoshime.com/v1/twitter/tweet?id=20" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twitter/tweet?id=20", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twitter/tweet?id=20", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "author": { "avatar": "https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_normal.jpg", "id": "12", "name": "jack", "username": "jack", "verified": true }, "createdAt": "2006-03-21T20:50:14Z", "id": "20", "lang": "en", "likeCount": 324988, "media": [], "possiblySensitive": false, "replyCount": 19252, "text": "just setting up my twttr", "url": "https://x.com/jack/status/20" }, "meta": { "cached": false, "endpoint": "tweet", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "twitter", "requestId": "req_2Xb9kQ…", "units": 1 } }
profileTimeline
GET
/v1/twitter/profileTimelineThe latest tweets of one account, about 20, newest first. X gives no cursor for older ones.
scope social:read1 unitcached 15 minpaginated
Parameters
usernamestring required | Screen name, with or without @, or profile URL. e.g. X |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
20 fields
author | Author |
avatar | string |
id | string |
name | string |
username | string |
verified | boolean |
createdAt | string |
id | string |
lang | string |
likeCount | integer (int64) |
media | Media[] |
height | any |
type | string |
url | string |
video | string |
width | any |
possiblySensitive | boolean |
replyCount | integer (int64) |
text | string |
url | string |
curl "https://api.hoshime.com/v1/twitter/profileTimeline?username=X" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twitter/profileTimeline?username=X", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twitter/profileTimeline?username=X", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "author": { "avatar": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_normal.jpg", "id": "783214", "name": "X", "username": "X", "verified": true }, "createdAt": "2026-11-02T21:57:53Z", "id": "2117375669432664133", "lang": "en", "likeCount": 11967, "media": [], "possiblySensitive": false, "replyCount": 0, "text": "ah yes welcome back irl dark mode", "url": "https://x.com/X/status/2117375669432664133" }, { "author": { "avatar": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_normal.jpg", "id": "783214", "name": "X", "username": "X", "verified": true }, "createdAt": "2026-10-28T20:20:36Z", "id": "2115539248451305747", "lang": "zxx", "likeCount": 0, "media": [], "possiblySensitive": false, "replyCount": 0, "text": "RT @XBusiness: https://t.co/UUy2CUdmf8", "url": "https://x.com/X/status/2115539248451305747" } ], "meta": { "cached": false, "endpoint": "profileTimeline", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "twitter", "requestId": "req_2Xb9kQ…", "units": 1 } }
profile
GET
/v1/twitter/profileOne X account's profile: name, bio, location, verified status, and follower, following and post counts.
scope social:read1 unitcached 1 h
Parameters
usernamestring required | Screen name, with or without @, or profile URL. e.g. NASA |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
11 fields
avatarUrl | string |
bio | string |
createdAt | string |
followerCount | integer (int64) |
followingCount | integer (int64) |
id | string |
name | string |
postCount | integer (int64) |
url | string |
username | string |
verified | boolean |
curl "https://api.hoshime.com/v1/twitter/profile?username=NASA" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twitter/profile?username=NASA", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twitter/profile?username=NASA", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "avatarUrl": "https://…", "bio": "…", "createdAt": "2026-11-06T09:41:00Z", "followerCount": 1280, "followingCount": 1280, "id": "abc123", "name": "…", "postCount": 1280, "url": "https://…", "username": "…", "verified": false }, "meta": { "cached": false, "endpoint": "profile", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "twitter", "requestId": "req_2Xb9kQ…", "units": 1 } }