X User Posts API
Get X User Posts data via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no cookies required. Powered by LiteScrape, pass parameters such as username, and retrieve structured data including source post identifier, post text, source post URL, source author username, and source author identifier for content catalogue research, and engagement comparisons.
- Selected price
- $0.00015 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
X User Posts API
Prepare your request, then continue with your agent.
Selected price
$0.00015 / call
- Provider
- API
- Pricing
On this page
Overview
X User Posts API
POST username and optional cursor. posts separates source post identity from author identity and includes media and engagement fields; pagination.next_cursor continues the same username rather than defining a numeric page.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | JSON body requires username; optional body fields: cursor. Optional query parameter: timeout (greater than 0, at most 90 seconds). |
| Selected implementation | litescrape · X User Posts |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Content catalogue research: Connect source post IDs, text and URLs to an author.
- Engagement comparisons: Keep author-level measures separate from post-level counts.
Returned Data
| Field | Meaning |
|---|---|
posts[].id |
Source post identifier. |
posts[].text |
Post text. |
posts[].url |
Source post URL. |
posts[].author.username |
Source author username. |
posts[].author.id |
Source author identifier. |
posts[].like_count |
Source like count. |
posts[].reply_count |
Source reply count. |
posts[].repost_count |
Source repost count. |
posts[].view_count |
Source view count. |
posts[].media[].type |
Media type. |
pagination.next_cursor |
Continuation cursor for the same username. |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request POST \
https://api.openany.si/v1/agent-apis/litescrape/api/x/user-posts \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
-H "Content-Type: application/json" \
--data-raw '{"username":"OpenAI"}'
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.
Published X User Posts API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
litescrapeCurrent X User Posts · POST · View API reference | $0.00015 / call | 0 | —successP50— |
- Unit price
- $0.00015
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 4. Price update time: not supplied.
Total $0.015
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/litescrape/api/x/user-posts- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
username | JSON request bodybody | string | Yes | X username, with or without a leading @. Profile URLs are not accepted. pattern: ^[A-Za-z0-9_]{1,15}$ |
timeout | URL query parametersquery | number | No | Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget. maximum: 90 |
cursor | JSON request bodybody | string | null | No | Continuation cursor returned for the same username. |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
paginationobjectnext_cursorstring
postsobject[]authorobjectbio_urlsstring[]created_atstringdescriptionstringfollowers_countintegerfollowing_countintegeridstringis_blue_verifiedbooleanlikes_countintegerlocationstringmedia_countintegernamestringpinned_post_idsstring[]posts_countintegerprofile_banner_urlstringprofile_image_urlstringprotectedbooleanurlstringusernamestringverifiedbooleanverified_typestringwebsitestring
bookmark_countintegerconversation_idstringcreated_atstringhashtagsunknown[]idstringlangstringlike_countintegermediaobject[]duration_msintegerheightintegertypestringurlstringvariantsobject[]content_typestringurlstringbitrateinteger
video_urlstringwidthinteger
possibly_sensitivebooleanquote_countintegerreply_countintegerrepost_countintegertextstringurlstringurlsunknown[]view_countinteger
submit_feedback_for_this_response_herestring
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 2
Review these request fields before running. Keep the published provider and request method unchanged.
timeout- Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.
body- Get posts from an X user.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/litescrape/api/x/user-posts' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "username": "OpenAI" }'Check the response
Sample response · Documented HTTP 200
Sample response{ "pagination": { "next_cursor": "DAAHCgABHUPqMZa___ALAAIAAAATMjEwNDk5Mzk2Nzk4NTM4MTY3MwgAAwAAAAIAAA" }, "posts": [ { "author": { "bio_urls": [ "http://openai.com/jobs" ], "created_at": "Sun Dec 06 22:51:08 +0000 2015", "description": "OpenAI’s mission is to ensure that artificial general intelligence benefits all of humanity. We’re hiring: https://t.co/dJGr6LgzPA", "followers_count": 5422967, "following_count": 4, "id": "4398626122", "is_blue_verified": true, "likes_count": 2525, "location": "", "media_count": 743, "name": "OpenAI", "pinned_post_ids": [ "2107894997538525580" ], "posts_count": 2179, "profile_banner_url": "https://pbs.twimg.com/profile_banners/4398626122/1777662919", "profile_image_url": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg", "protected": false, "url": "https://x.com/OpenAI", "username": "OpenAI", "verified": true, "verified_type": "Business", "website": "https://openai.com" }, "bookmark_count": 6606, "conversation_id": "2107894997538525580", "created_at": "Wed Oct 07 18:05:04 +0000 2026", "hashtags": [], "id": "2107894997538525580", "lang": "en", "like_count": 23055, "media": [ { "duration_ms": 70111, "height": 1080, "type": "video", "url": "https://pbs.twimg.com/media/HUDAEy0a4AAdfz8.jpg", "variants": [ { "content_type": "application/x-mpegURL", "url": "https://video.twimg.com/amplify_video/2107893961461473280/pl/1EuBGSX7XqZrrJja.m3u8?tag=29" }, { "bitrate": 256000, "content_type": "video/mp4", "url": "https://video.twimg.com/amplify_video/2107893961461473280/vid/avc1/480x270/JfePfj9Q30RmRuEa.mp4?tag=29" }, { "bitrate": 832000, "content_type": "video/mp4", "url": "https://video.twimg.com/amplify_video/2107893961461473280/vid/avc1/640x360/-mREAGeqEMpB-95D.mp4?tag=29" }, { "bitrate": 2176000, "content_type": "video/mp4", "url": "https://video.twimg.com/amplify_video/2107893961461473280/vid/avc1/1280x720/juhdrcOKw2K9lzhq.mp4?tag=29" }, { "bitrate": 10368000, "content_type": "video/mp4", "url": "https://video.twimg.com/amplify_video/2107893961461473280/vid/avc1/1920x1080/7gMw9Wtm-zDxFZET.mp4?tag=29" } ], "video_url": "https://video.twimg.com/amplify_video/2107893961461473280/vid/avc1/1920x1080/7gMw9Wtm-zDxFZET.mp4?tag=29", "width": 1920 } ], "possibly_sensitive": false, "quote_count": 1444, "reply_count": 1126, "repost_count": 1812, "text": "GPT-6 and Intelligent UI, now rolling out in ChatGPT for everyone.\n\nIntelligent UI in ChatGPT delivers fast, interactive answers that make everyday questions more visual, complex topics easier to grasp, and interactive tools for your task available on the spot. https://t.co/XL2gDCPBwG", "url": "https://x.com/OpenAI/status/2107894997538525580", "urls": [], "view_count": 5816962 } ], "submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token" }