List replies
Early access. Tell us what you're building and we'll set you up. Contact us
api.lempile.com/posts/{post_id}/commentsThe replies an X post's page shows. sort_by: MOST_RECENT (the default) puts them newest first by date; MOST_RELEVANT keeps X's own order. comment_id: a reply's id, whose own replies come back instead. X's replies come in one page: a cursor answers 400 errors/invalid_parameters, and every answer's cursor is null.
Scope: accounts.read.
Authentication
X-API-KEY header·A Lempile API key, made in the dashboard under Access tokens.Path parameters
post_idstringrequiredThe post.
Query parameters
account_idstringrequiredThe connected X account: its Lempile id, its X user id, or its handle.
limitintegerUp to 100, default 50 on X.
≥ 1 · ≤ 100sort_bystringMOST_RECENT(default): newest first.MOST_RELEVANT: X's own order.One ofMOST_RECENTMOST_RELEVANTDefaultMOST_RECENTcomment_idstringA reply's id: its own replies come back instead.
Pattern^[0-9]+$
Responses
200Replies.
›
application/json
objectanyAlwaysCommentListitemsarray of anycursornulltotal_itemsinteger
400errors/invalid_parameters: a cursor (X's replies come in one page), or an invalid limit, sort_by or comment_id.
›
errors/invalid_parameters: a cursor (X's replies come in one page), or an invalid limit, sort_by or comment_id.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
401Missing or invalid API key ({error, message}), errors/disconnected_account, or errors/reauth_required when X is signed out in the account's browser.
›
{error, message}), errors/disconnected_account, or errors/reauth_required when X is signed out in the account's browser.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
402subscription_required: the workspace has no active trial or subscription.
›
subscription_required: the workspace has no active trial or subscription.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
404errors/resource_not_found: no such account in this workspace, or it isn't an X account.
›
errors/resource_not_found: no such account in this workspace, or it isn't an X account.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
423errors/x_account_locked: X shows the account its lock page (x.com/account/access). Nothing was done; someone has to pass X's check.
›
errors/x_account_locked: X shows the account its lock page (x.com/account/access). Nothing was done; someone has to pass X's check.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
503errors/service_unavailable (the account isn't ready, or the browser runner can't be reached), errors/no_client_session, or errors/maintenance with retry_at.
›
errors/service_unavailable (the account isn't ready, or the browser runner can't be reached), errors/no_client_session, or errors/maintenance with retry_at.application/problem+json
typestringrequiredtitlestringstatusintegerrequireddetailstringretry_atstring · date-timecodestringThe browser's own reason, when it refused before the click:
replies_limited,post_not_accepted,gif_not_found,browser_busy…
Was this page helpful?