X / Twitter API
X (formerly Twitter) posts, user profiles, and search.
- Tweet IDs: Use the numeric tweet ID (e.g.
1234567890123456789) - Search modes:
Top(most relevant, default) orLatest(most recent) via theproductparameter - Returns up to 40 tweets per request
- Some suspended or protected accounts may not be accessible
- Media URLs may expire after a period
Users
GET /x/users/:username — 3 credits
Get X user profile.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
username | string | Yes | — | X/Twitter username |
cURL
curl -H "x-api-key: sk_byc_xxx" \
https://api.bycrawl.com/x/users/elonmuskResponse
{
"id": "44196397",
"username": "elonmusk",
"name": "Elon Musk",
"description": "",
"profileImageUrl": "https://...",
"bannerUrl": "https://...",
"followersCount": 236111979,
"followingCount": 1292,
"tweetCount": 98573,
"isVerified": false,
"isBlueVerified": true,
"createdAt": "2009-06-02T20:12:29.000Z",
"location": "",
"url": "https://x.com/elonmusk"
}Posts
GET /x/posts/:id — 3 credits
Get a tweet by ID.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Tweet ID |
cURL
curl -H "x-api-key: sk_byc_xxx" \
https://api.bycrawl.com/x/posts/1234567890123456789Response
{
"id": "1519480761749016577",
"text": "Next I'm buying Coca-Cola to put the cocaine back in",
"createdAt": "2022-04-28T00:56:58.000Z",
"user": {
"id": "44196397",
"username": "elonmusk",
"name": "Elon Musk",
"profileImageUrl": "https://...",
"isVerified": true
},
"likeCount": 4254746,
"retweetCount": 588529,
"replyCount": 168969,
"quoteCount": 167449,
"bookmarkCount": 21530,
"viewCount": null,
"media": [],
"isRetweet": false,
"isReply": false,
"lang": "en",
"url": "https://x.com/elonmusk/status/1519480761749016577"
}GET /x/users/:username/posts — 4 credits
Get a user’s recent tweets.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
username | string | Yes | — | X/Twitter username |
count | integer | No | 20 | Number of tweets (max 40) |
cursor | string | No | — | Pagination cursor |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/x/users/elonmusk/posts?count=10"Response
{
"tweets": [
{
"id": "1519480761749016577",
"text": "Next I'm buying Coca-Cola to put the cocain...",
"createdAt": "2022-04-28T00:56:58.000Z",
"user": {
"id": "44196397",
"username": "elonmusk",
"name": "Elon Musk",
"profileImageUrl": "https://...",
"isVerified": true
},
"likeCount": 4254746,
"retweetCount": 588529,
"replyCount": 168969,
"quoteCount": 167449,
"bookmarkCount": 21530,
"viewCount": null,
"media": [],
"isRetweet": false,
"isReply": false,
"lang": "en",
"url": "https://x.com/elonmusk/status/1519480761749016577"
}
],
"nextCursor": "DAABCgABGT3Y3Gl2__8KAAIYxbwT..."
}GET /x/posts/search?q=xxx — 3 credits per item (default 15 items)
Search tweets by keyword.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
q | string | Yes | — | Search query |
count | integer | No | 15 | Number of tweets (1-15) |
cursor | string | No | — | Pagination cursor |
product | string | No | Top | Search tab: Top or Latest |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/x/posts/search?q=bitcoin&count=10"Response
{
"tweets": [
{
"id": "2030325637416735026",
"text": "RT @Bitcoin: March 07, 2026 @ 01:41 AM (UTC)...",
"createdAt": "2026-03-07T16:52:08.000Z",
"user": {
"id": "445775649",
"username": "Maddcelabb",
"name": "Anne",
"profileImageUrl": "https://...",
"isVerified": false
},
"likeCount": 0,
"retweetCount": 356,
"replyCount": 0,
"quoteCount": 0,
"bookmarkCount": 0,
"viewCount": 0,
"media": [],
"isRetweet": true,
"isReply": false,
"lang": "en",
"url": "https://x.com/Maddcelabb/status/2030325637416735026"
}
],
"nextCursor": "b26v89c19zqg8o3juehgs5m3trmfszx..."
}