# x.post

One public X (Twitter) post: text, time, author, like, reply, repost, quote and view counts, links and media.

X post, one of the X scrapers.

| | |
| --- | --- |
| Id | `x.post` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/x.post/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | no | The post's address, e.g. https://x.com/jack/status/20 (a twitter.com address works too). Limit: at most 2048 characters. |
| `post_id` | string | no | The post's id instead: the digits at the end of its address. Limit: at most 20 characters. |

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `id` | string | X's id of the post. |
| `url` | string | The post's address. |
| `text` | string or null | The post's text as written. Links appear in X's short form (t.co); `urls` gives where they lead. |
| `created_at` | string (date-time) or null | When the post was published, in UTC. |
| `language` | string or null | The language X detects in the text, e.g. en; null when the page does not say. |
| `author_username` | string or null | The handle of the account that posted it, without the @. |
| `author_name` | string or null | That account's display name. |
| `author_id` | string or null | X's numeric id of that account. |
| `author_verified` | boolean or null | True when that account carries a verification badge. |
| `like_count` | integer or null | Number of likes. |
| `reply_count` | integer or null | Number of replies. |
| `repost_count` | integer or null | Number of reposts. |
| `quote_count` | integer or null | Number of posts that quote this one. |
| `bookmark_count` | integer or null | Number of bookmarks; null where the page does not state it. |
| `view_count` | integer or null | Number of views; null where the page does not state it. |
| `hashtags` | array of string | The hashtags written in the text, without the #, in order. |
| `mentions` | array of string | The handles the text mentions, without the @, in order. |
| `urls` | array of string | The full addresses of the links in the text, in order. |
| `media` | array of object | The post's photos, videos and GIFs, in order. |
| `media[].type` | "photo" \| "video" \| "animated_gif" | photo, video or animated_gif. |
| `media[].url` | string | The photo, or the preview image of a video or GIF. |
| `media[].video_url` | string or null | The video file with the highest bitrate (MP4), for a video or GIF. |
| `media[].duration_ms` | integer or null | Length of a video in milliseconds. |
| `media[].width` | integer or null | Width in pixels of the original. |
| `media[].height` | integer or null | Height in pixels of the original. |
| `media[].alt_text` | string or null | The description the author gave the image, when there is one. |
| `quoted_post_id` | string or null | The id of the post this one quotes, when it quotes one. |
| `possibly_sensitive` | boolean or null | True when X marks the post's media as possibly sensitive. |
| `fetched_at` | string (date-time) | When the page was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/x.post/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"url":"https://x.com/jack/status/20"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "x.post",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "url": "https://x.com/jack/status/20"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "id": "20",
      "url": "https://x.com/jack/status/20",
      "text": "just setting up my twttr",
      "created_at": "2006-03-21T20:50:14Z",
      "language": "en",
      "author_username": "jack",
      "author_name": "jack",
      "author_id": "12",
      "author_verified": true,
      "like_count": 325022,
      "reply_count": 19260,
      "repost_count": 126409,
      "quote_count": 8040,
      "bookmark_count": 25558,
      "view_count": null,
      "hashtags": [],
      "mentions": [],
      "urls": [],
      "media": [],
      "quoted_post_id": null,
      "possibly_sensitive": null,
      "fetched_at": "2026-11-19T18:07:42.682944Z"
    }
  ],
  "next_cursor": null
}
```

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the X scrapers](https://docs.enrichednow.com/results-and-statuses.md#x) are in their own section there.
