X APIx.com ↗
Fetch posts, engagement metrics, and profile data from any public X (Twitter) account. Two endpoints cover user timelines and profile metadata.
What is the X API?
This API provides 2 endpoints for retrieving public data from X.com (formerly Twitter): get_user_posts returns a paginated timeline of recent posts with engagement metrics, media, and quoted tweets, while get_user_profile returns account metadata including follower counts, bio, and verification status. Both endpoints accept a username as the primary input and return structured JSON with over a dozen fields covering identity, content, and engagement signals.
curl -X GET 'https://api.parse.bot/scraper/a5441c3e-48bc-4f1b-8b42-8fccc7e99d45/get_user_posts?limit=5&username=elonmusk&include_retweets=true' \ -H 'X-API-Key: $PARSE_API_KEY'
Returns one page of public posts from an X/Twitter user's timeline as an array of post objects (id, text, created_at, engagement counts, view_count, is_retweet, author user block, media with video URLs where present, expanded urls, quoted_tweet, reply/conversation ids, is_pinned). The pinned post, if any, appears first with is_pinned=true; the remaining posts are ordered newest-first by id. The user's own posts inside conversation threads on the timeline are included; other people's replies are not. include_retweets=false drops reposts locally after the page is fetched, so a filtered page can hold fewer than limit posts. limit (1-100, default 10) caps the posts returned per call; when the site's page holds more posts than limit the surplus is not returned and next_cursor continues from the end of the site's page. next_cursor is the opaque continuation for the next call, or null when the site marks the timeline as ended; some high-profile accounts are served as a fixed 'top posts' list with no continuation, so null on the first page is normal for them. Each call costs three upstream requests. An unknown or unavailable handle returns a stale_input (input_not_found) error; a valid account with no visible posts returns an empty posts array with count 0.
| Param | Type | Description |
|---|---|---|
| limit | integer | Maximum number of posts to return per page, 1 to 100 |
| cursor | string | Pagination cursor from a previous response next_cursor field; empty or omitted fetches the first page |
| usernamerequired | string | X/Twitter username without the at sign |
| include_retweets | string | Whether to include reposts (retweets) in the returned posts |
{
"type": "object",
"fields": {
"count": "integer - number of posts returned in this page",
"posts": "array of post objects: id, text, created_at, language, favorite_count, retweet_count, reply_count, quote_count, bookmark_count, view_count, is_retweet, url, user {id, name, screen_name, profile_image_url, verified, is_blue_verified, followers_count}, media (array of {type, url, expanded_url, video_url for videos} or null), urls (array of {url, display_url} or null), quoted_tweet (nested post or null), in_reply_to_status_id, conversation_id, is_pinned",
"username": "string - the requested username",
"next_cursor": "string or null - opaque cursor for the next page; null when the timeline has no further continuation"
},
"sample": {
"data": {
"count": 2,
"posts": [
{
"id": "2095595741528125780",
"url": "https://x.com/OpenAI/status/2095595741528125780",
"text": "This is GPT-6 Astra.\n\nAnything you can do on a computer, Astra can do for you. Fast. https://t.co/gDd0IsewJw",
"urls": null,
"user": {
"id": "4398626122",
"name": "OpenAI",
"verified": false,
"screen_name": "OpenAI",
"followers_count": 5386654,
"is_blue_verified": true,
"profile_image_url": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg"
},
"media": [
{
"url": "https://pbs.twimg.com/amplify_video_thumb/2095595661559574528/img/Vmb2pgEFJ6fpCUTD.jpg",
"type": "video",
"video_url": "https://video.twimg.com/amplify_video/2095595661559574528/vid/avc1/1920x1080/grXdGA07X-yPH_8z.mp4?tag=29",
"expanded_url": "https://x.com/OpenAI/status/2095595741528125780/video/1"
}
],
"language": "en",
"is_pinned": true,
"created_at": "Thu Sep 03 19:32:13 +0000 2026",
"is_retweet": false,
"view_count": 138069351,
"quote_count": 26573,
"reply_count": 9214,
"quoted_tweet": null,
"retweet_count": 35400,
"bookmark_count": 102110,
"favorite_count": 340143,
"conversation_id": "2095595741528125780",
"in_reply_to_status_id": null
},
{
"id": "2098508066048069848",
"url": "https://x.com/OpenAI/status/2098508066048069848",
"text": "RT @evayzh: check out how AI helps scientists with quantum computing research\n\n@bea_yankelevich at MIT's EQuS group used GPT-5.6 Sol with C…",
"urls": null,
"user": {
"id": "4398626122",
"name": "OpenAI",
"verified": false,
"screen_name": "OpenAI",
"followers_count": 5386654,
"is_blue_verified": true,
"profile_image_url": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg"
},
"media": null,
"language": "en",
"is_pinned": false,
"created_at": "Fri Sep 11 20:24:45 +0000 2026",
"is_retweet": true,
"view_count": 52472,
"quote_count": 0,
"reply_count": 0,
"quoted_tweet": null,
"retweet_count": 29,
"bookmark_count": 0,
"favorite_count": 0,
"conversation_id": "2098508066048069848",
"in_reply_to_status_id": null
}
],
"username": "OpenAI",
"next_cursor": "DAAHCgABHTWlWS4___MLAAIAAAATMjA5ODUwODA2NjA0ODA2OTg0OAgAAwAAAAIAAA"
},
"status": "success"
}
}About the X API
User Timeline Posts
The get_user_posts endpoint retrieves recent posts from a specified public account. Pass the username parameter (without the @ symbol) along with an optional limit to control page size. Each post object in the posts array includes id, text, created_at, engagement metrics, associated media, resolved urls, and a nested quoted_tweet object when applicable. If the account has a pinned post, it appears first in the array with is_pinned: true. Set include_retweets to control whether retweets appear in results. Paginate through a timeline by passing the next_cursor value from one response as the cursor parameter in the next request; a null next_cursor indicates the end of available results.
User Profile Metadata
The get_user_profile endpoint returns a single object with all publicly visible account metadata for a given username. Fields include id (the numeric user ID), name (display name), screen_name (handle), description (bio), location, url (the website link set on the profile), created_at (account creation date), verified (legacy blue checkmark status), media_count, and profile_url (the full X.com profile link). This endpoint takes only the username parameter and has no pagination since it returns a single record.
Data Scope and Limitations
Both endpoints cover publicly accessible accounts. Private or protected accounts are not accessible. The get_user_posts response includes the count of returned posts alongside the array and the echoed username. Engagement metrics are included at the post level, but the specific metric fields (such as likes, reposts, and replies) are part of each post object in the posts array. There is no search or keyword filtering within a user's timeline; results are ordered as they appear on the public timeline.
The X API is a managed, monitored endpoint for x.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when x.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official x.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor a brand's X.com posting activity and engagement trends over time using
get_user_posts - Aggregate follower counts and bio metadata for a list of accounts via
get_user_profile - Build a cross-platform social dashboard that surfaces recent tweets alongside engagement metrics
- Detect pinned posts on target accounts by checking
is_pinnedon the first post in the timeline - Track account creation dates and verification status for influencer vetting workflows
- Collect quoted tweet chains by expanding the nested
quoted_tweetfield in post responses - Archive public timelines by paginating through
next_cursoruntil it returns null
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does X.com have an official developer API?+
What does get_user_posts return for accounts with pinned posts?+
posts array with is_pinned set to true. All subsequent posts reflect the standard chronological timeline order. This lets you distinguish pinned content from regular posts without any additional filtering.Can I retrieve posts from protected or private X accounts?+
Does the API support searching tweets by keyword or hashtag?+
get_user_posts and individual account metadata via get_user_profile. Keyword search, hashtag search, and trending topics are not included. You can fork this API on Parse and revise it to add a search endpoint covering those use cases.How does pagination work for the user timeline?+
get_user_posts response includes a next_cursor string when more posts are available. Pass that value as the cursor parameter in your next request to retrieve the following page. When next_cursor is null, you have reached the end of the available timeline data.