PeumeAPI

E-commerce · X

X / Twitter Search

Search with full advanced-search syntax (operators like from:, since:, until:, min_faves: work inline in the query) and get structured tweets with text, author, engagement, and cursor pagination. Every call returns one full native page of about 20 tweets; follow nextCursor for more. For a window with clock times use `since_time:` / `until_time:` (epoch seconds), e.g. `since_time:1795168800 until_time:1795172400` for 2026-11-20 10:00 to 11:00 UTC: on `Latest` every post is inside the window, on each page. A time on `until:` is usually dropped on `Latest` (`until:2026-11-20_11:00:00_UTC` stops at 2026-11-20 00:00 UTC), so a window inside one day comes back HTTP 200 with no items though posts exist, and a longer one loses its last day. A date alone (`until:2026-11-20`) is not read as a UTC day and `until:` then includes that day, so posts dated after it come back. `Top` is not ordered by likes, can return posts below a `min_faves:` floor and posts outside the window: use `Latest` when the bounds must hold, or filter each item on `createdUtc` (epoch seconds) and `likeCount`. Even on the default route a post need not contain every word of the query (`product photography listing images` returned 7 of 20 posts with all four words): check each item's `text` before counting it as a match; there is no relevance score. A post that shares an X Article (long-form post) carries only the article's link in `text`, `https://x.com/i/article/<id>`, alone or after a line from the poster, and no title or body. The query can match words in the article that are not in `text`, so check such a post with `twitter.article` (pass its `url`), not on `text`.

From $0.00069 per call

Call it

curl https://api.peume.com/v1/call/x-twitter-search-2 \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "query": "your query",
    "queryType": "Latest"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: x-twitter-search-2.

Parameters

cursorstring

Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of search results. Pages can overlap: a page may repeat items an earlier page returned and is billed like any other, so de-duplicate by item id and stop when a page adds no new id. Neither an empty `items` nor a `nextCursor` is proof on its own: one source has returned an empty page for a query another answered with posts, and a source can return a `nextCursor` next to an empty page. An empty page is billed like any other, so stop paging at the first one; before reading an em

routestring

Upstream source to run on; omit for "lynx". giraffe ($0.00046 per call, 96.6% uptime); bison ($0.00047 per call, 90.2% uptime); lynx ($0.00048 per call, 97.2% uptime); jackal ($0.00055 per call, 93% uptime); capybara ($0.0006 per call, 75.1% uptime); badger ($0.0021 per call, 76.1% uptime). A route can refuse an input it cannot apply with a 400 source_unknown (not charged): retry on another route, or omit that input. Route `badger` can fill a page with posts that hold only some of the query's words (a 6-word query returned 2 of 20 with all six, where `lynx` returned 9 of 9) and, with `Top`, po

giraffe · bison · lynx · jackal · capybara · badger

queryRequiredstring

Search query using advanced-search syntax. IMPORTANT: bare terms are ANDed - a tweet must contain EVERY word, so a list of loosely related keywords matches nothing; use one short phrase or OR between alternatives (e.g. ' OR getanyapi'). When an operator follows an OR list, put the list in parentheses, e.g. '( OR getanyapi) -filter:replies': without them X applies the operator to the last alternative only, so such a query still runs as X reads it and the response's hint carries the corrected query. You can embed X advanced-search operators directly in the query to filter

queryTypestring

Which posts to return: 'Latest' (newest first, the default), 'Top' (most popular), 'Photos' (newest posts with images), or 'Videos' (newest posts with video). Photos and Videos search your query as written with filter:images or filter:videos added after it, so they cost the same as a Latest search.

Latest · Top · Photos · Videos

Example: Latest

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.