Search And Reads
X search on the Latest tab, a profile's newest posts, and the account's own posts, replies and reposts.
Early access. Tell us what you're building and we'll set you up. Contact us
Read-only: nothing is clicked, typed or followed.
Search Posts#
GET /posts/search?account_id=&q=&limit= (accounts.read): the latest posts
for a search, as the account sees X's Latest tab, newest first, reposts left
out. q takes X's search words and operators (up to 300 characters); limit
is 1–50, default 20.
curl -sS "https://api.lempile.com/posts/search?account_id=janedemo&q=%22just%20launched%22%20min_faves%3A50&limit=10" \
-H "X-API-KEY: $LEMPILE_API_KEY"{ "object": "PostList", "provider": "X", "query": "\"just launched\" min_faves:50", "items": [ { "object": "Post", "id": "1850000000000000001", "...": "as in Read A Post" } ] }422 errors/search_not_loaded means X showed neither posts nor its
no-results notice; it's an error, never an empty list.
A Profile's Posts#
GET /users/{identifier}/posts?account_id=&limit= (accounts.read): an X
profile's newest posts, reposts left out (identifier is the handle; limit
default 20, at most 100). It comes in one page: a cursor answers
400 errors/invalid_parameters, and the answer's cursor is always null.
An empty list means no post showed within 25 seconds.
404 errors/user_not_found when there's no such profile.
There's no read of another X profile (GET /users/{identifier} is
LinkedIn's). The account's own profile is GET /users/me
(Profile And Analytics).
The Account's Own Posts#
GET /users/me/posts?account_id=&kind=&limit=&cursor= (accounts.read): the
account's own posts, replies or reposts, newest first, from its profile's
tabs. This is what a rebrand deletes or undoes
(Rebrand An X Account).
kind |
From | Each item has |
|---|---|---|
posts (default) |
its Posts tab | pinned: true on the pinned post |
replies |
its Replies tab | in_reply_to: the post it answers |
reposts |
its Posts tab | reposted_id: the post it reposted, for POST /posts/repost with undo: true |
{ "object": "OwnPostList", "provider": "X", "account_id": "11111111-1111-4111-8111-111111111111", "kind": "reposts",
"items": [{ "object": "OwnPost", "id": "1850000000000000003", "kind": "repost", "text": "Shipped my app",
"created_at": "2026-11-07T09:00:00.000Z", "reposted_id": "1700000000000000009" }],
"cursor": "1850000000000000003" }limitis 1–100, default 20.cursorisnullat the end; otherwise pass it back ascursorfor the next page. It still works after you deleted the post it names: the next page starts from the posts older than it.- A repost's
idis the repost itself;textis the reposted post's. - X's own data is read first; when it can't be had, the tab itself is read while it's scrolled like a person. Nothing is clicked.
422 errors/timeline_not_loadedmeans the profile showed neither posts nor its empty notice: it's an error, never an empty list.
On a LinkedIn account, /users/me/posts is /users/{identifier}/posts, as
before.
Was this page helpful?