> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# X post

> Read an X post page as JSON with the x-post parser. $1 per 1,000 calls. Send the page to scrape. Examples in cURL, TypeScript and Python.

Reads an X post page, like x.com/nasa/status/`<id>`, and returns one post as JSON.

## Make a request

Send the page's URL to [scrape](https://docs.stophy.dev/api-reference/endpoint/scrape.md) with a `json` format that names the parser. This parser works without an API key when you send no options, up to 10 calls a minute and 50 calls a day per IP address. See [Rate limits](https://docs.stophy.dev/production/rate-limits.md). To lift the limits, get an API key in the [Quickstart](https://docs.stophy.dev/quickstart).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://x.com/NASA/status/2118041009766678695","formats":[{"type":"json","parser":"x-post"}]}'
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/scrape", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://x.com/NASA/status/2118041009766678695",
    formats: [{ type: "json", parser: "x-post" }],
  }),
});
console.log(await response.json());
```

```python Python theme={null}
import os

import requests

response = requests.post(
    "https://api.stophy.dev/v1/scrape",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
    json={
        "url": "https://x.com/NASA/status/2118041009766678695",
        "formats": [{"type": "json", "parser": "x-post"}],
    },
)
print(response.json())
```

## Read the response

The parser's data is in `data.json`. Its fields include `id`, `url`, `title`, `text`, `author`, `community`, `publishedAt`, `likes`, `comments`, `shares`, `views`, `media` and `hashtags`. This sample is cut to the first items.

```json theme={null}
{
  "success": true,
  "data": {
    "json": {
      "id": "2118041009766678695",
      "url": "https://x.com/NASA/status/2118041009766678695",
      "title": null,
      "text": "Earlier today, @astro_anil spoke from the International Space Station with @MarkRober, taking questions from students…",
      "author": {
        "id": "11348282",
        "name": "NASA",
        "handle": "NASA",
        "url": "https://x.com/NASA",
        "avatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
        "isVerified": true
      },
      "community": null,
      "publishedAt": "2026-11-04T18:01:42.000Z",
      "likes": 488,
      "comments": 45,
      "shares": 65,
      "views": 296964,
      "media": [
        {
          "type": "image",
          "url": "https://pbs.twimg.com/media/HWSp9nzXsAAazfF.jpg?name=orig",
          "thumbnailUrl": null,
          "width": 1920,
          "height": 1080,
          "durationSeconds": null,
          "altText": "An image of Anil Menon floating inside the International Space Station. Overlaid is the text \"Astronaut Anil Menon…"
        }
      ],
      "hashtags": [],
      "language": "en",
      "quotes": 6,
      "bookmarks": 25,
      "mentions": [
        "astro_anil",
        "MarkRober"
      ],
      "links": [
        "https://youtu.be/IhpBgLB8JUQ"
      ],
      "replyToUrl": null,
      "quotedUrl": null,
      "quotedText": null,
      "quotedAuthorUsername": null,
      "isEdited": false,
      "isSensitive": false
    }
  }
}
```

## Options

This parser takes no options.

## Price

\$1 per 1,000 calls. Works without an API key, within the free limits. See [Pricing](https://docs.stophy.dev/account/pricing.md).

## Limits and errors

* The URL must be an X post page, like x.com/nasa/status/`<id>`. Any other URL fails with `invalidRequest`.
* The answer comes back in `data.json`. If the page cannot be read, the call fails with an error code from [Errors](https://docs.stophy.dev/api-reference/errors.md).

## Related

* [Pre-built parsers](https://docs.stophy.dev/scrape/prebuilt-parsers) lists every parser.
* [Scrape](https://docs.stophy.dev/scrape/overview) has the options every scrape takes.
* [X profile](https://docs.stophy.dev/scrape/prebuilt-parsers/social/x-profile.md)
* [Reddit search](https://docs.stophy.dev/scrape/prebuilt-parsers/social/reddit-search.md)
* [Reddit post](https://docs.stophy.dev/scrape/prebuilt-parsers/social/reddit-post.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.