String docs
Site integrations

X (Twitter)

X (Twitter) profiles with bio, location, website and pinned post, an account's posts with permalinks and exact timestamps, its archived older posts and replies, and single posts by ID or URL, read signed out.

Call these actions with your String API key; see Authentication. Every call answers with the envelope described in Responses & errors, whose data holds the rows below.

  • Site: x
  • Version: 1.0.0
  • Reads from: x.com
ActionDescriptionListed price
profileRead X (Twitter) accounts' public profiles, signed out: handle, numeric ID, name, bio and website with links expanded, location, join date, follower, following, post, media and like counts, verification, parody or fan label, protected flag, public birth date, affiliate badge, professional category, avatar, banner and pinned post. A handle no account has, or a suspended or deactivated account, fails with that reason.Billed per request at your plan's rates
postsList an X (Twitter) account's posts, signed out: permalink, full text with links expanded, exact timestamp, the post a reply answers, quoted post, links, mentions, hashtags, media with alt text, and view, like, repost, reply, quote and bookmark counts. X decides which posts a signed-out reader sees: for many personal accounts about 100 of their most engaged posts on one page, for others the newest posts 20 a page back to about 840. Reposts of others are left out unless asked for. A protected, suspended or missing account fails with that reason.Billed per request at your plan's rates
postRead X (Twitter) posts by ID or status URL, signed out, one request each: permalink, author, full text with links expanded, exact timestamp, the post a reply answers, quoted post, links, mentions, hashtags, media with alt text, and view, like, repost, reply, quote and bookmark counts. Use it for replies and older posts the posts action does not reach, such as status URLs found by web search. A deleted, protected or withheld post fails with that reason.Billed per request at your plan's rates
archived-postsList an X (Twitter) account's older posts and replies, newest first, from public web archives of its status pages on twitter.com and x.com: permalink, text with links expanded, exact timestamp, the post a reply answers, quoted post, links, mentions, hashtags, media with alt text, like and reply counts, and when it was first archived. Reaches the posts the signed-out timeline withholds, but only those someone archived; deleted or protected posts are left out.Billed per request at your plan's rates

profile

Read X (Twitter) accounts' public profiles, signed out: handle, numeric ID, name, bio and website with links expanded, location, join date, follower, following, post, media and like counts, verification, parody or fan label, protected flag, public birth date, affiliate badge, professional category, avatar, banner and pinned post. A handle no account has, or a suspended or deactivated account, fails with that reason.

POST https://request.usestring.ai/v1/integrations/x/profile

Input

Unknown fields are rejected.

FieldTypeDescription
accountsstring[] | nullRequired. Each account: a handle such as NASA or @NASA, or an x.com or twitter.com profile or post URL. 1 to 100 entries.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
idstringThe account's permanent numeric ID, which survives handle changes.
handlestringThe account's current handle, without @.
namestring | nullThe display name; null when unset.
descriptionstring | nullThe bio, with shortened t.co links expanded; null when unset.
locationstring | nullThe location as the account wrote it, free text; null when unset.
websitestring | nullThe website link, expanded from t.co; null when unset.
createdAtstring | nullWhen the account was created, ISO 8601.
followersCountinteger—
followingCountinteger—
postsCountintegerPosts, replies and reposts the account has made.
mediaCountintegerPosts with photos or video.
likesCountintegerPosts the account has liked; the likes themselves are private.
blueVerifiedbooleanTrue when the account has a paid verification check.
verifiedTypestring | nullBusiness or Government for an organisation's gold or grey check; null otherwise.
accountLabelstring | nullParody, Commentary or Fan when the account declares itself one; null otherwise.
protectedbooleanTrue when the account's posts are visible only to approved followers.
avatarstring | nullThe avatar image URL at 400x400; null when unset.
bannerstring | nullThe banner image URL; null when unset.
pinnedPostUrlstring | nullThe pinned post's permalink; null when none is pinned.
urlstringThe profile's page on x.com.
birthdateobject | nullThe birth date the account shows publicly; null unless its visibility is Public.
birthdate.yearinteger | null—
birthdate.monthinteger | null—
birthdate.dayinteger | null—
affiliateLabelobject | nullThe organisation badge beside the name, such as an employer's; null when none.
affiliateLabel.namestringThe organisation's name, as the badge describes it.
affiliateLabel.urlstring | nullThe organisation's profile.
affiliateLabel.typestring | nullX's label type, such as BusinessLabel.
professionalobject | nullThe professional-account type and category; null for a personal account.
professional.typestringCreator or Business.
professional.categoriesstring[] | null—

Example

curl https://request.usestring.ai/v1/integrations/x/profile \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accounts": ["NASA"]
  }'

data starts with these rows:

[
  {
    "id": "11348282",
    "handle": "NASA",
    "name": "NASA",
    "description": "Making the seemingly impossible, possible. ✨",
    "location": "Pale Blue Dot",
    "website": "http://www.nasa.gov/",
    "createdAt": "2007-12-19T20:20:32Z",
    "followersCount": 92249165,
    "followingCount": 115,
    "postsCount": 74542,
    "mediaCount": 28249,
    "likesCount": 17110,
    "blueVerified": true,
    "verifiedType": "Government",
    "accountLabel": null,
    "protected": false,
    "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
    "banner": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
    "pinnedPostUrl": null,
    "url": "https://x.com/NASA",
    "birthdate": {
      "year": 1958,
      "month": 10,
      "day": 1
    },
    "affiliateLabel": null,
    "professional": null
  }
]

Requests and billing

  • Requests: 1–2 Web Access requests per entry in items, plus up to 2 setup requests per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

posts

List an X (Twitter) account's posts, signed out: permalink, full text with links expanded, exact timestamp, the post a reply answers, quoted post, links, mentions, hashtags, media with alt text, and view, like, repost, reply, quote and bookmark counts. X decides which posts a signed-out reader sees: for many personal accounts about 100 of their most engaged posts on one page, for others the newest posts 20 a page back to about 840. Reposts of others are left out unless asked for. A protected, suspended or missing account fails with that reason.

POST https://request.usestring.ai/v1/integrations/x/posts

Input

Unknown fields are rejected.

FieldTypeDescription
accountstringRequired. The account: a handle such as NASA or @NASA, or an x.com profile URL. At least 1 character.
includeRepostsbooleanKeep posts the account reposted from others, marked repost. Off by default, so every row is the account's own words.
maxPagesintegerThe most timeline pages to read, 1 to 50. Defaults to 1. From 1 to 50.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
idstringThe post's numeric ID.
urlstringThe post's permalink on x.com.
authorIdstringThe author's numeric account ID.
authorHandlestring—
textstringThe full text, long posts included, with t.co links expanded and attached-media links removed.
createdAtstringWhen the post was published, ISO 8601 UTC.
langstring | nullThe language X detected, BCP 47; null when undetermined.
repostbooleanTrue when the account reposted someone else's post; the other fields then describe the original.
replyToUrlstring | nullFor a reply, the permalink of the post it answers; null for a top-level post.
quotedUrlstring | nullThe permalink of a post this one quotes; null when none.
linksstring[] | nullLinks in the text, expanded from t.co.
mentionsstring[] | nullHandles the text mentions, without @.
hashtagsstring[] | nullHashtags in the text, without #.
mediaobject[] | nullAttached photos, videos and GIFs.
media[].typestringphoto, video or animated_gif.
media[].urlstringThe photo, or a video's preview image.
media[].altstring | nullThe alt text; null when none.
viewCountinteger | nullViews X reports; null when it shows none, as for posts older than view counts.
likeCountinteger—
repostCountinteger—
replyCountinteger—
quoteCountinteger—
bookmarkCountinteger—

Example

curl https://request.usestring.ai/v1/integrations/x/posts \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "NASA"
  }'

data starts with these rows:

[
  {
    "id": "2121280846183137564",
    "url": "https://x.com/NASA/status/2121280846183137564",
    "authorId": "11348282",
    "authorHandle": "NASA",
    "text": "Let's talk about Voyager 1 and 2!\n \nJoin us Nov. 19 for a status update on the twin probes and a discussion of their unique mission. Plus, we'll have a Q&A session and a sneak peek at the upcoming NASA+ Voyager documentary. https://go.nasa.gov/4k942pz",
    "createdAt": "2026-11-13T16:35:39Z",
    "lang": "en",
    "repost": false,
    "replyToUrl": null,
    "quotedUrl": null,
    "links": ["https://go.nasa.gov/4k942pz"],
    "mentions": [],
    "hashtags": [],
    "media": [
      {
        "type": "photo",
        "url": "https://pbs.twimg.com/media/HXBNsEVWgAAsCUY.jpg",
        "alt": "An artist's concept of the Voyager spacecraft, with its long antenna pointing down and to the right in the direction of Earth. Earth isn't visible in the image, but Voyager is among the stars. In the background, there is also a long, deep blue ribbon of gas and dust stretching from the bottom of the image to the top."
      }
    ],
    "viewCount": 642837,
    "likeCount": 4649,
    "repostCount": 822,
    "replyCount": 165,
    "quoteCount": 50,
    "bookmarkCount": 319
  },
  {
    "id": "2120974110335312297",
    "url": "https://x.com/NASA/status/2120974110335312297",
    "authorId": "11348282",
    "authorHandle": "NASA",
    "text": "Tethys and Dione showed up for the group photo!\n \nIn addition to the two moons shown here, Saturn has a whole entourage of natural satellites—more than any other planet in our solar system. As of now, the ringed planet has 293 confirmed moons.",
    "createdAt": "2026-11-12T20:16:48Z",
    "lang": "en",
    "repost": false,
    "replyToUrl": null,
    "quotedUrl": null,
    "links": [],
    "mentions": [],
    "hashtags": [],
    "media": [
      {
        "type": "photo",
        "url": "https://pbs.twimg.com/media/HW82tqYWoAAnWCO.jpg",
        "alt": "Saturn dominates the scene, filling the rightmost portion of the photo with its orange face and dramatic rings. Two white dots appear to the left side of Saturn, which are its moons Tethys and Dione."
      }
    ],
    "viewCount": 836796,
    "likeCount": 8023,
    "repostCount": 1154,
    "replyCount": 256,
    "quoteCount": 73,
    "bookmarkCount": 393
  }
]

Requests and billing

  • Requests: 1 Web Access request per result page, plus up to 4 setup requests per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

post

Read X (Twitter) posts by ID or status URL, signed out, one request each: permalink, author, full text with links expanded, exact timestamp, the post a reply answers, quoted post, links, mentions, hashtags, media with alt text, and view, like, repost, reply, quote and bookmark counts. Use it for replies and older posts the posts action does not reach, such as status URLs found by web search. A deleted, protected or withheld post fails with that reason.

POST https://request.usestring.ai/v1/integrations/x/post

Input

Unknown fields are rejected.

FieldTypeDescription
postsstring[] | nullRequired. Each post: its numeric ID, or its x.com or twitter.com status URL. 1 to 100 entries.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
idstringThe post's numeric ID.
urlstringThe post's permalink on x.com.
authorIdstringThe author's numeric account ID.
authorHandlestring—
textstringThe full text, long posts included, with t.co links expanded and attached-media links removed.
createdAtstringWhen the post was published, ISO 8601 UTC.
langstring | nullThe language X detected, BCP 47; null when undetermined.
repostbooleanTrue when the account reposted someone else's post; the other fields then describe the original.
replyToUrlstring | nullFor a reply, the permalink of the post it answers; null for a top-level post.
quotedUrlstring | nullThe permalink of a post this one quotes; null when none.
linksstring[] | nullLinks in the text, expanded from t.co.
mentionsstring[] | nullHandles the text mentions, without @.
hashtagsstring[] | nullHashtags in the text, without #.
mediaobject[] | nullAttached photos, videos and GIFs.
media[].typestringphoto, video or animated_gif.
media[].urlstringThe photo, or a video's preview image.
media[].altstring | nullThe alt text; null when none.
viewCountinteger | nullViews X reports; null when it shows none, as for posts older than view counts.
likeCountinteger—
repostCountinteger—
replyCountinteger—
quoteCountinteger—
bookmarkCountinteger—

Example

curl https://request.usestring.ai/v1/integrations/x/post \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "posts": ["https://x.com/NASA/status/2121280846183137564"]
  }'

data starts with these rows:

[
  {
    "id": "2121280846183137564",
    "url": "https://x.com/NASA/status/2121280846183137564",
    "authorId": "11348282",
    "authorHandle": "NASA",
    "text": "Let's talk about Voyager 1 and 2!\n \nJoin us Nov. 19 for a status update on the twin probes and a discussion of their unique mission. Plus, we'll have a Q&A session and a sneak peek at the upcoming NASA+ Voyager documentary. https://go.nasa.gov/4k942pz",
    "createdAt": "2026-11-13T16:35:39Z",
    "lang": "en",
    "repost": false,
    "replyToUrl": null,
    "quotedUrl": null,
    "links": ["https://go.nasa.gov/4k942pz"],
    "mentions": [],
    "hashtags": [],
    "media": [
      {
        "type": "photo",
        "url": "https://pbs.twimg.com/media/HXBNsEVWgAAsCUY.jpg",
        "alt": "An artist's concept of the Voyager spacecraft, with its long antenna pointing down and to the right in the direction of Earth. Earth isn't visible in the image, but Voyager is among the stars. In the background, there is also a long, deep blue ribbon of gas and dust stretching from the bottom of the image to the top."
      }
    ],
    "viewCount": 642837,
    "likeCount": 4649,
    "repostCount": 822,
    "replyCount": 165,
    "quoteCount": 50,
    "bookmarkCount": 319
  }
]

Requests and billing

  • Requests: 1–2 Web Access requests per entry in items, plus up to 2 setup requests per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.

archived-posts

List an X (Twitter) account's older posts and replies, newest first, from public web archives of its status pages on twitter.com and x.com: permalink, text with links expanded, exact timestamp, the post a reply answers, quoted post, links, mentions, hashtags, media with alt text, like and reply counts, and when it was first archived. Reaches the posts the signed-out timeline withholds, but only those someone archived; deleted or protected posts are left out.

POST https://request.usestring.ai/v1/integrations/x/archived-posts

Input

Unknown fields are rejected.

FieldTypeDescription
accountstringRequired. The account: a handle such as NASA or @NASA, or an x.com profile URL. At least 1 character.
maxPostsintegerThe most archived posts to read, newest first, 1 to 200. Defaults to 50. From 1 to 200.

Output

data is an array of rows, one per result. Each row has:

FieldTypeDescription
idstringThe post's numeric ID.
urlstringThe post's permalink on x.com.
authorIdstring—
authorHandlestring—
textstringThe text, with t.co links expanded and attached-media links removed.
createdAtstringWhen the post was published, RFC 3339 UTC.
langstring | null—
replyToUrlstring | nullFor a reply, the permalink of the post it answers.
quotedUrlstring | nullThe permalink of a post this one quotes.
linksstring[] | null—
mentionsstring[] | null—
hashtagsstring[] | null—
mediaobject[] | null—
media[].typestringphoto, video or animated_gif.
media[].urlstringThe photo, or a video's preview image.
media[].altstring | nullThe alt text; null when none.
likeCountinteger | nullLikes when the post was read.
replyCountinteger | nullReplies when the post was read.
archivedAtstring | nullWhen the post was first archived, RFC 3339 UTC.

Example

curl https://request.usestring.ai/v1/integrations/x/archived-posts \
  -H "Authorization: Bearer $STRING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "NASA",
    "maxPosts": 1
  }'

data starts with these rows:

[
  {
    "id": "2119902631388680527",
    "url": "https://x.com/NASA/status/2119902631388680527",
    "authorId": "11348282",
    "authorHandle": "NASA",
    "text": "@DeniseRogalins1 There are no age restrictions for applying to be an astronaut. You may be more qualified than you think!",
    "createdAt": "2026-11-09T21:19:07Z",
    "lang": "en",
    "replyToUrl": "https://x.com/DeniseRogalins1/status/2119180198331691107",
    "quotedUrl": null,
    "links": [],
    "mentions": ["DeniseRogalins1"],
    "hashtags": [],
    "media": [],
    "likeCount": 15,
    "replyCount": 6,
    "archivedAt": "2026-11-09T21:19:07Z"
  }
]

Requests and billing

  • Requests: 2–206 Web Access requests per call.
  • Billing: passthrough. Each request the action makes bills at its own rate on your plan; there is no separate charge for the action. See Pricing.