Skip to content
Docs

Page Capture

A JPEG of one page from the X account's own browser: a public X post cropped to the post, a company blog, outlet or data page cropped to its headline, a status page, the account's own profile, one of its "followed you" notifications with the names blurred, or a news page.

Early access. Tell us what you're building and we'll set you up. Contact us

POST /accounts/{account_id}/capture (accounts.write): a picture of one page, opened in the X account's own browser and proxy. Read-only: the browser opens the page in a new tab, hides cookie banners and X's own overlays with CSS (it never clicks them, so nothing is accepted or dismissed), takes a JPEG and closes the tab. Nothing is clicked or typed. It isn't a write: no Idempotency-Key, no receipt, not paced.

What It Opens#

Only these addresses, written exactly so. Anything else answers 400 errors/invalid_parameters (listing them) before any browser opens.

Page The address The picture
A public X post https://x.com/<handle>/status/<digits>: a handle of 1 to 15 letters, digits or _ (not i), 1 to 25 digits, and nothing after: no query (?s=20), no fragment, no trailing slash, no /photo/1. x.com only: not twitter.com, www.x.com or mobile.x.com. The post alone, read from the account's own signed-in X.
A status page https://<host>, https://<host>/ or https://<host>/incidents/<id> (8 to 40 letters or digits), no query or fragment, on www.vercel-status.com, www.githubstatus.com, status.supabase.com, www.cloudflarestatus.com, status.openai.com, status.claude.com, www.netlifystatus.com, status.render.com, status.flyio.net, status.clerk.com or resend-status.com. The page from its top, or clip.selector.
The account's own X https://x.com/<its handle> and https://x.com/i/account_analytics. From the top.
The account's own notifications https://x.com/notifications exactly: no tab (/mentions), no query, fragment or trailing slash. One "followed you" notification, every name blurred (see Notifications).
News pages Any page on blog.google, developers.google.com, blogs.bing.com, www.seroundtable.com or techcrunch.com; on Hacker News, https://news.ycombinator.com/item?id=<digits> only. From the top, or clip.selector.
Story sources: company blogs and changelogs Any page on openai.com, deepmind.google, developers.googleblog.com, github.blog, vercel.com, blog.cloudflare.com, supabase.com, stripe.com, huggingface.co, cursor.com, blog.replit.com, railway.com, neon.com, developer.apple.com, blogs.nvidia.com or aws.amazon.com. On github.com, a repository's releases only: /<owner>/<repo>/releases, /releases/latest or /releases/tag/<tag>. On replit.com, /blog and /blog/<post> only (where blog.replit.com sends its posts). The headline's area (see Story Sources), or clip.selector.
Story sources: outlets Any page on www.theverge.com, arstechnica.com, www.wired.com, www.theregister.com, 9to5mac.com, www.bloomberg.com, www.theinformation.com, www.404media.co or www.platformer.news. The headline's area, or clip.selector.
Story sources: data pages A package's page on www.npmjs.com (/package/<name>, /package/@<scope>/<name>, optionally /v/<version>); any page on pypistats.org; an app's page on apps.apple.com (/<country>/app/<name>/id<digits>); a post or product page on www.producthunt.com (/posts/<slug>, /products/<slug>, /products/<slug>/launches/<slug>). The headline's area, or clip.selector.
Sites added for your workspace Any page on a site Lempile added to your workspace's list. From the top, or clip.selector.

Hosts are matched exactly: x.com.evil.com, status.claude.com.evil.com, www.openai.com or another subdomain is refused. On a host that opens only some pages (github.com, replit.com, www.npmjs.com, apps.apple.com, www.producthunt.com), the address has no query and no fragment. status.anthropic.com and the bare githubstatus.com, vercel-status.com, cloudflarestatus.com and netlifystatus.com redirect elsewhere: use the address above. The browser checks the address again before it opens it and after the page loads, so a page that goes to another address is never captured (left_allowed_hosts).

X Posts#

The post is opened from the account's own signed-in X (never a signed-out view) and the picture is the post's own article on its page, found by X's markup and the post's own link, never by its words: no other post of the conversation, and the reply box and X's header, bars, sheets and floating buttons hidden. It ends at the post's action bar (reply, repost, like, bookmark, share), without X's sort row under it, and the author's Subscribe and Follow buttons are hidden, like a plain screenshot of the post. With x_post: { counts: false }, the post's time and views row and its action bar are hidden too, and the picture ends 16 px under its last content (its text, media or quoted post): no views, replies, reposts, likes or bookmarks. The post is captured only when X shows it under the handle in the address; otherwise nothing is captured:

code What X showed
x_post_author_mismatch The post under another handle (X's own address for it, or the author on the post), or no author it could read.
x_post_protected A protected account's post, whether the account can see it or not.
x_post_deleted X's "this page doesn't exist": the post was deleted, or never posted.
x_post_age_restricted The post only behind an age or sensitive-content warning. Lempile never clicks through one.
x_post_unavailable X's "This post is unavailable" notice (a suspended author, X's rules, withheld…).
x_post_not_loaded X ran but didn't show the post within 25 seconds; detail quotes what X showed. Try again later.

Notifications#

https://x.com/notifications is opened from the account's own signed-in X, and the picture is one "followed you" notification, never the page: the newest one X shows with at least x_notifications.min_others others (default 0, any). It is found by X's own markup for a notification, never inside a post that quotes the words. Before the picture, every name in it is blurred (an emoji in a name too), so is any other text that isn't X's own words (a time, a label), and every avatar too unless x_notifications.blur_avatars is false. X's header, tabs and bars are hidden. All of it is CSS in that tab: nothing is posted, typed or clicked.

Right before the picture and again right after it, the browser reads which words in the notification are still on show. Only X's own may be ("and 12 others followed you", in English or French). When anything else is readable, or a name isn't blurred, no picture is returned (names_not_blurred).

The answer's notification says what was pictured: kind (followed), others (the number X writes in "and N others", or how many more people it names: "Alice and Bob followed you" is 1), names_blurred (always true) and avatars_blurred.

Opening the page clears the account's unread notifications badge on X, as any visit does. Nothing else changes.

code What X showed
x_no_follow_notification No "followed you" notification with at least min_others others among the ones X showed first. Try again later.
names_not_blurred A word other than X's own stayed readable in the notification, before or right after the picture: no picture. detail says what, as counts (how many texts, how many in a link), never the words.
x_notification_not_loaded X drew the notification again, or dropped it, before the picture. Try again.

Story Sources#

The picture is the article's headline area, not the whole page: the kicker (a section or a date) right above the title, the title, the dek, the byline and the lead picture under them, ending at the picture's bottom edge and never going into the body. A company blog, changelog or data page with no lead picture goes on into its first lines, until the picture is about three quarters as tall as it is wide, and ends at a paragraph's end. A data page's chart counts as its lead picture. The picture is the article's own column (at a phone width, usually the page's whole width). The area's pictures load first (6 seconds at most). A page with no headline is pictured from its top. clip.selector crops to that element instead. The answer's crop says which: article, element or page.

Before the picture, every fixed or sticky layer outside the headline is hidden with CSS: cookie and consent banners, newsletter pop-ups, sticky headers, paywall overlays and chat buttons, along with the usual ad slots, and a scroll lock is released. Nothing is clicked, so nothing is accepted, dismissed or signed into. Another layer that still covers the headline is hidden too, unless it carries a wall's words. Some pages are refused instead of pictured:

code blocked_by What the page showed
page_blocked bot_check A bot check (Cloudflare's "Just a moment", a captcha, "Are you a robot?") that didn't pass by itself within 16 seconds. It is never clicked. Trying again later can help.
page_blocked paywall A paywall over the headline (a layer with "Subscribe to continue reading" or the like), a blurred headline, or a page with no headline under a paywall.
page_blocked consent A consent wall over the headline that CSS couldn't hide. It is never accepted.
page_error The page answered an HTTP error (a 404, a 504 from the host).

Request#

Field
url Required. One of the addresses above.
width CSS pixels, a whole number from 320 to 1280. Default 520 (under 768, X and most sites draw their phone layout).
dpr Device pixel ratio, 1 to 3. Default 2: the JPEG is twice the CSS size.
clip.maxHeight CSS pixels, 100 to 4000. Default 1600: the picture stops there. clip.max_height works too.
clip.selector A CSS selector of at most 200 characters: the picture is that element. Not on an X post (400): a post is always cropped to the post. On a story source page it replaces the headline's area.
x_post.counts X posts only. false leaves out the post's time and views row and its action bar, so the picture shows no counts. Default true. x_post on another address answers 400.
x_notifications.min_others The notifications page only. The fewest others the "followed you" notification must count, a whole number from 0 to 1000. Default 0.
x_notifications.blur_avatars The notifications page only. false leaves the avatars sharp; the names are always blurred. Default true. x_notifications on another address, or clip.selector on the notifications page, answers 400.
Shell
curl -sS -X POST "https://api.lempile.com/accounts/janedemo/capture" \
  -H "X-API-KEY: $LEMPILE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "url": "https://x.com/OpenAI/status/1986000000000000001", "width": 520, "dpr": 2, "x_post": { "counts": false } }'

Answer#

The picture: 200, with the JPEG as base64 and its size in pixels (CSS size times dpr), the address the page ended on and its title. On a story source page, crop too: article (the headline's area), element (clip.selector) or page (no headline: from the top).

Shell
curl -sS -X POST "https://api.lempile.com/accounts/janedemo/capture" \
  -H "X-API-KEY: $LEMPILE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "url": "https://www.theverge.com/tech/1023230/the90-gem-necklace-hands-on-impressions", "width": 520, "dpr": 2, "clip": { "maxHeight": 1000 } }'
JSON
{ "object": "PageCapture", "ok": true, "account_id": "11111111-1111-4111-8111-111111111111",
  "url": "https://x.com/OpenAI/status/1986000000000000001",
  "final_url": "https://x.com/OpenAI/status/1986000000000000001",
  "title": "OpenAI on X: \"…\" / X", "width": 1040, "height": 1224,
  "jpeg_base64": "/9j/4AAQSkZJRg…", "captured_at": "2026-11-07T18:20:00.000Z" }

No picture: still 200, with ok: false, the browser's code and detail. Nothing was clicked or typed; the code says whether trying again can help.

JSON
{ "object": "PageCapture", "ok": false, "account_id": "11111111-1111-4111-8111-111111111111",
  "url": "https://x.com/fakeopenai/status/1986000000000000001",
  "code": "x_post_author_mismatch",
  "detail": "X shows this post under @OpenAI, not @fakeopenai: nothing was captured.",
  "captured_at": "2026-11-07T18:20:00.000Z" }

With https://x.com/notifications, the answer also has "notification": { "kind": "followed", "others": 12, "names_blurred": true, "avatars_blurred": true }.

Besides the X post and notifications codes above:

code Meaning
x_signed_out X is signed out in the account's browser: sign it in again in the dashboard.
x_app_not_loaded X's app didn't load in the account's browser.
left_allowed_hosts The page went to another address after it loaded: another post, another page of the host, another host.
url_not_allowed The browser's own check refused the address.
element_not_found No element for clip.selector within 10 seconds.
browser_busy The account's browser was on another job for 15 seconds. Try again in a minute.
capture_blank The picture came out blank (almost all of it one colour), or X drew the post's box empty: it isn't returned. Try again later.
counts_not_hidden Asked with x_post: { counts: false }, but X's post wasn't built as expected around its views row and action bar, or the browser can't hide them yet: no picture, never one with counts.
page_blocked A story source page behind a bot check, a paywall or a consent wall: blocked_by says which (see Story Sources).
page_error A story source page answered an HTTP error.
no_picture, capture_failed The browser gave no picture, or stopped.

The account itself answers as on other routes: 423 errors/x_account_locked, 422 errors/proxy_auth_failed or errors/proxy_unreachable, 401 errors/disconnected_account. 400 errors/invalid_parameters is a field out of range or an address it doesn't open, 403 a key without accounts.write, 404 no such X account, 503 errors/service_unavailable the browser runner out of reach, and 504 errors/timeout no picture within 90 seconds. See Errors And Limits.

Was this page helpful?