SocialToAIStart freeConsole

How to search X by date with since and until

To search X by date, pass `since` and `until`, or write `since:` and `until:` inside the query, as in `NASA since:2026-10-20 until:2026-10-25`. Either way X searches that range and a page comes back full: in our test, 17 posts, all in range, for 2 credits.

The test

A search on the live service on 2026-11-05, for posts about NASA from October 20 to 25, came back with 17 posts, all in range. The parameters are put in the query for you, so the two forms below ask X the same thing. On other platforms the parameters are applied differently: see the last question below.

How to write it

WriteExampleTestedWhat came back
since, until"query": "NASA", "since": "2026-10-20", "until": "2026-10-25"The same search as the next row
since: until:NASA since:2026-10-20 until:2026-10-252026-11-0517 posts, dated October 20 to 25
from: since: until:from:NASA since:2026-10-01 until:2026-10-312026-11-0519 posts by that account, all in October
cURL
curl -X POST https://api.socialtoai.com/v1/search \  -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \  -H "Content-Type: application/json" \  -d '{"platform":"x","query":"NASA since:2026-10-20 until:2026-10-25","sort":"latest"}'

More than one page

Each answer gives page.cursor, which reads the next page, usually 20 posts, 2 credits. A thousand posts in a range take about 50 calls, 100 credits, $0.33 at the first pack. An estimate: pages can hold fewer.

In your AI client

Say the dates. A sentence like this is enough:

Say this
Search X for NASA from October 20 to 25, 2026, and show me the most liked posts with links.

Add one MCP server to your AI client: https://mcp.socialtoai.com/mcp. Clients that sign in (Claude, ChatGPT, Claude Code, Cursor, Codex) open a sign-in page: sign in with the code we email you and press Allow, no key to copy. Others send a key in a header. Each client's own steps are on the MCP page.

X's own API

X offers an official API for posts, users and search. Developers sign up in the X developer console and pay per use with prepaid credits; higher volumes need an Enterprise plan.

Source: X's developer documentation, checked 2026-10-17.

X charges per resource returned, from prepaid credits: $0.005 for each post read and $0.010 for each user read. Pay-per-use plans are capped at 3 million post reads per billing cycle; more needs an Enterprise plan. X says its prices are subject to change.

Source: X API pricing (docs.x.com), read 2026-10-29. Rules change; the platform's own pages are the authority.

FAQ

Do I need an X developer account?

No. You need one SocialToAI key, or sign-in from your AI client.

How far back can I search?

Our tests reached a few weeks back. How far it goes depends on what X's search returns for that query, so try your own range first; a call that returns nothing still costs a call.

Do since and until work on other platforms?

The parameters are taken on every platform's search. Where the platform has no such filter, the page is filtered afterwards, and the answer's warnings say so.

Published: Last updated: