# x.profile

A public X (Twitter) account's profile: names, bio, location, link, badge, follower, following and post counts, and its recent posts.

X profile, one of the X scrapers.

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

Start it with `POST /v1/scrapers/x.profile/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 |
| --- | --- | --- | --- |
| `username` | string | yes | The account's handle, e.g. NASA or @NASA, or its profile address (https://x.com/NASA). Limit: at most 200 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 |
| --- | --- | --- |
| `username` | string | The account's handle, without the @, as X writes it. |
| `url` | string | The profile's address. |
| `user_id` | string or null | X's numeric id of the account. |
| `name` | string or null | The display name. |
| `bio` | string or null | The profile's bio text; null when the account wrote none. |
| `location` | string or null | The location the account wrote on its profile, as written. |
| `website` | string or null | The link on the profile, in full; null when there is none. |
| `verified` | boolean or null | True when the profile carries a verification badge. |
| `verified_type` | string or null | The kind of badge when X states one: Business or Government; null for an individual's badge or none. |
| `protected` | boolean or null | True when the account's posts are shown only to followers it approved. |
| `follower_count` | integer or null | Number of followers. |
| `following_count` | integer or null | Number of accounts this one follows. |
| `post_count` | integer or null | Number of posts the account has published. |
| `media_count` | integer or null | Number of the account's posts that carry a photo or a video. |
| `created_at` | string (date-time) or null | When the account was created, in UTC. |
| `avatar_url` | string or null | The profile picture. |
| `banner_url` | string or null | The banner image across the top of the profile; null when there is none. |
| `affiliation` | string or null | The organisation whose badge the profile shows beside its name, when it shows one. |
| `recent_posts` | array of object | The account's own posts that the profile page carries for a visitor who is not signed in: a handful, a pinned post first and then newest first, without replies. Empty for a protected account. |
| `recent_posts[].id` | string | X's id of the post. |
| `recent_posts[].url` | string | The post's address. |
| `recent_posts[].text` | string or null | The post's text as written. Links appear in X's short form (t.co); `urls` gives where they lead. |
| `recent_posts[].created_at` | string (date-time) or null | When the post was published, in UTC. |
| `recent_posts[].language` | string or null | The language X detects in the text, e.g. en; null when the page does not say. |
| `recent_posts[].author_username` | string or null | The handle of the account that posted it, without the @. |
| `recent_posts[].author_name` | string or null | That account's display name. |
| `recent_posts[].author_id` | string or null | X's numeric id of that account. |
| `recent_posts[].author_verified` | boolean or null | True when that account carries a verification badge. |
| `recent_posts[].like_count` | integer or null | Number of likes. |
| `recent_posts[].reply_count` | integer or null | Number of replies. |
| `recent_posts[].repost_count` | integer or null | Number of reposts. |
| `recent_posts[].quote_count` | integer or null | Number of posts that quote this one. |
| `recent_posts[].bookmark_count` | integer or null | Number of bookmarks; null where the page does not state it. |
| `recent_posts[].view_count` | integer or null | Number of views; null where the page does not state it. |
| `recent_posts[].hashtags` | array of string | The hashtags written in the text, without the #, in order. |
| `recent_posts[].mentions` | array of string | The handles the text mentions, without the @, in order. |
| `recent_posts[].urls` | array of string | The full addresses of the links in the text, in order. |
| `recent_posts[].media` | array of object | The post's photos, videos and GIFs, in order. |
| `recent_posts[].media[].type` | "photo" \| "video" \| "animated_gif" | photo, video or animated_gif. |
| `recent_posts[].media[].url` | string | The photo, or the preview image of a video or GIF. |
| `recent_posts[].media[].video_url` | string or null | The video file with the highest bitrate (MP4), for a video or GIF. |
| `recent_posts[].media[].duration_ms` | integer or null | Length of a video in milliseconds. |
| `recent_posts[].media[].width` | integer or null | Width in pixels of the original. |
| `recent_posts[].media[].height` | integer or null | Height in pixels of the original. |
| `recent_posts[].media[].alt_text` | string or null | The description the author gave the image, when there is one. |
| `recent_posts[].quoted_post_id` | string or null | The id of the post this one quotes, when it quotes one. |
| `recent_posts[].possibly_sensitive` | boolean or null | True when X marks the post's media as possibly sensitive. |
| `recent_posts[].fetched_at` | string (date-time) | When the page was read, in UTC. |
| `fetched_at` | string (date-time) | When the profile 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.profile/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"username":"BBCWorld"}}'
```

## 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.profile",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "username": "BBCWorld"
  },
  "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": [
    {
      "username": "BBCWorld",
      "url": "https://x.com/BBCWorld",
      "user_id": "742143",
      "name": "BBC News (World)",
      "bio": "News, features and analysis from the World's newsroom. Breaking news, follow @BBCBreaking. UK news, @BBCNews. Latest sports news @BBCSport",
      "location": "London, UK",
      "website": "http://www.bbc.com/news",
      "verified": true,
      "verified_type": "Business",
      "protected": false,
      "follower_count": 42365039,
      "following_count": 17,
      "post_count": 413114,
      "media_count": 27349,
      "created_at": "2007-02-01T07:44:29Z",
      "avatar_url": "https://pbs.twimg.com/profile_images/1529107170448523264/q3VwEx38_normal.jpg",
      "banner_url": "https://pbs.twimg.com/profile_banners/742143/1663658662",
      "affiliation": "BBC News (UK)",
      "recent_posts": [
        {
          "id": "2123109427188244685",
          "url": "https://x.com/BBCWorld/status/2123109427188244685",
          "text": "Minister criticises Belfast IT firm's notification delay over credit unions data breach https://t.co/l2kUaxTwOK",
          "created_at": "2026-11-18T17:41:47Z",
          "language": "en",
          "author_username": "BBCWorld",
          "author_name": "BBC News (World)",
          "author_id": "742143",
          "author_verified": true,
          "like_count": 17,
          "reply_count": 1,
          "repost_count": 5,
          "quote_count": 0,
          "bookmark_count": 2,
          "view_count": 37078,
          "hashtags": [],
          "mentions": [],
          "urls": [
            "https://bbc.in/4C9xfaf"
          ],
          "media": [],
          "quoted_post_id": null,
          "possibly_sensitive": false,
          "fetched_at": "2026-11-19T18:07:42.685306Z"
        },
        {
          "id": "2123099226917707977",
          "url": "https://x.com/BBCWorld/status/2123099226917707977",
          "text": "Inside the old gas pipeline where Ukraine is fighting an underground war https://t.co/SRlTvnqLK1",
          "created_at": "2026-11-18T17:01:15Z",
          "language": "en",
          "author_username": "BBCWorld",
          "author_name": "BBC News (World)",
          "author_id": "742143",
          "author_verified": true,
          "like_count": 64,
          "reply_count": 11,
          "repost_count": 17,
          "quote_count": 0,
          "bookmark_count": 4,
          "view_count": 44791,
          "hashtags": [],
          "mentions": [],
          "urls": [
            "https://bbc.in/4jpeMzb"
          ],
          "media": [],
          "quoted_post_id": null,
          "possibly_sensitive": false,
          "fetched_at": "2026-11-19T18:07:42.685306Z"
        }
      ],
      "fetched_at": "2026-11-19T18:07:42.685306Z"
    }
  ],
  "next_cursor": null
}
```

What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with `… [truncated]`.

- Shortened: `recent_posts`: 5 items, the first 2 shown.

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.
