Twitter

Fetch a tweet with thread context, or a user profile

Fetch a tweet or a user from a single reference. Tweet URLs, handle-less /i/status URLs, and bare numeric tweet ids return the tweet with full thread context, parent, and optional replies/quotes; a profile URL (https://x.com/<handle>) returns the user with ~20 recent tweets.

post/api/v1/twitter/get

Request

  • Base URL: https://glim.sh
  • URL: https://glim.sh/api/v1/twitter/get
  • Auth: one of:
    • none
    • API key in header x-api-key
    • HTTP bearer
    • API key in query parameter apiKey

Request body

refstring required

Tweet URL/id or profile URL. Tweet URLs including /i/status/<id> and bare numeric tweet ids return the tweet + thread; a profile URL (https://x.com/<handle>) returns the user + recent tweets.

includestring[]

Tweet refs only: extra sections to include (replies, quotes)

include_repliesboolean

Profile refs only: include replies in the timeline

include_mentionsboolean

Profile refs only: include the mentions timeline

cursorstring

Profile refs only: pagination cursor

expand_urlsboolean

When true, auto-crawl entity URLs and attach crawled_content to tweets. Off by default: responses can grow by up to 4KB per expanded URL. Use glim_web_crawl(url) for targeted crawls instead.

Response

Tweet or user payload

tweetobject
threadobject[]
thread_has_moreboolean
thread_next_cursorstring
parentobject
articleobject
userobject
tweetsobject[]
has_moreboolean
next_cursorstring
mentionsobject[]

Changes

No recorded changes to this operation across all 1 revision of this API.