OpenAny
Get API keyAPI Key
APIScrapersSocial Media

x logo
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
USE THIS API

X User Posts API

Prepare your request, then continue with your agent.

Selected price

$0.00015 / call

Provider
API
Pricing
Connect your agent
On this page

Overview

Overview
X User Posts API

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

  1. Set OPENANY_API_KEY to your OpenAny API key.
  2. Review the selected implementation and pricing, then adapt the request below to your target.
  3. Check the HTTP response and business result before reading optional fields.
bash
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

View FAQ

Related APIs

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
body*object

body

Get posts from an X user.
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.

Sample response

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
litescrapeCurrent
X User Posts · POST · View API reference
$0.00015 / call0
—successP50—
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
Selected pricing · litescrapeUSD / call
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.

calls

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
View request and response examples

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
usernameJSON request bodybodystringYes

X username, with or without a leading @. Profile URLs are not accepted.

pattern: ^[A-Za-z0-9_]{1,15}$

timeoutURL query parametersquerynumberNo

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

cursorJSON request bodybodystring | nullNo

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

Inferred from examples
  • paginationobject
    • next_cursorstring
  • postsobject[]
    • authorobject
      • bio_urlsstring[]
      • created_atstring
      • descriptionstring
      • followers_countinteger
      • following_countinteger
      • idstring
      • is_blue_verifiedboolean
      • likes_countinteger
      • locationstring
      • media_countinteger
      • namestring
      • pinned_post_idsstring[]
      • posts_countinteger
      • profile_banner_urlstring
      • profile_image_urlstring
      • protectedboolean
      • urlstring
      • usernamestring
      • verifiedboolean
      • verified_typestring
      • websitestring
    • bookmark_countinteger
    • conversation_idstring
    • created_atstring
    • hashtagsunknown[]
    • idstring
    • langstring
    • like_countinteger
    • mediaobject[]
      • duration_msinteger
      • heightinteger
      • typestring
      • urlstring
      • variantsobject[]
        • content_typestring
        • urlstring
        • bitrateinteger
      • video_urlstring
      • widthinteger
    • possibly_sensitiveboolean
    • quote_countinteger
    • reply_countinteger
    • repost_countinteger
    • textstring
    • urlstring
    • urlsunknown[]
    • view_countinteger
  • submit_feedback_for_this_response_herestring

Agent integration

Copy the resource contract without sharing an API key.

Download MDView API Markdown

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect 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.

  1. 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 / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. 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 · cURL
    curl \
      '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"
    }'
  3. 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"
    }

Common questions

What username format should I send?

Use the bare username with 1–15 letters, digits or underscores, such as OpenAI. A full profile URL is not accepted by this input.

How do I request the next batch?

Pass pagination.next_cursor as cursor with the same username. It is an opaque continuation value, not a page number; no page-size selector is exposed here.

Are author counts the same as post engagement?

No. Keep author follower or post totals separate from each post’s likes, replies, reposts and views. Source post IDs and author IDs identify different records.

Does this return reply text or download media?

Engagement fields include reply counts, while media fields provide source references. This route is not a complete reply-thread retrieval or a media-file download operation.

Where should I set the request timeout?

Set timeout in the query string, including for POST requests. It must be greater than 0 and at most 90 seconds; page_timeout cannot extend this total execution budget.

Can I add arbitrary parameters to the JSON body?

Use the body fields exposed by this implementation. Its JSON schema rejects additional properties; query parameters such as timeout belong outside the JSON body.

Use X User Posts API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.