Передайте это своему ИИ-агенту
Скопируйте этот промпт в Claude Code, Cursor, Codex или любой кодинг-агент. Он подскажет агенту, где документация и как использовать ваш API-ключ.
Use the Lovely Router data tool "Поиск постов в X (Twitter)" (id `x-search`, X (Twitter)) to get data for me. It returns JSON.
- Docs (read first): https://lovelyrouter.com/docs/tools/run.md and https://lovelyrouter.com/docs/api/tools.md
- Input fields and price: GET https://lovelyrouter.com/v1/tools/x-search (public, no key needed). Price: $0.000388 / tweet.
- Run: POST https://lovelyrouter.com/v1/tools/x-search/run with a body like `{"input":{"searchTerms":["\"gemini argon\" min_faves:50 -filter:replies since:2026-10-01 lang:en"],"maxItems":20,"queryType":"Top"},"max_results":10}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Only delivered results are billed. Keep max_results small on the first run, check the output, then scale up (up to 500 per run).
- If you support MCP, you can instead connect the server https://lovelyrouter.com/mcp (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool with tool "x-search".
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <describe the data you need, e.g. which places, profiles, keywords or URLs, and the output format>Вход
searchTermsstring[]One query per entry, written like X's search box; combine operators with spaces, OR and parentheses. Words and "exact phrase"; a OR b; -word / -"phrase" to exclude; #hashtag; @mention; $cashtag; from:user, to:user (replies to them), -from:user; lang:en; since:2026-10-01 / until:2026-10-15 (UTC dates); min_faves:100, min_retweets:20, min_replies:5; filter:replies or -filter:replies; filter:media, filter:images, filter:videos, filter:links (prefix - to exclude); -filter:retweets; url:example.com; conversation_id:; list:. X API-only operators (is:retweet, has:media, place:) are not applied: use the filter: forms. Example: "gemini argon" min_faves:50 -filter:replies since:2026-10-01 lang:en
maxItemsintegerOptional result cap across the whole run. Without a spend cap, Xquik uses its built-in default. Diagnostic rows count toward this cap. The form starts at 1,000. A run can return 100,000 rows & more, so raise it for a full export.
queryTypestringLatest returns newest first. Top is ranked by relevance and is not exhaustive. Latest + Top returns both without duplicates and fills your limit from either. Account timelines ignore this setting.
Latest · Top · Latest + Top
langstringFilter tweets by language using a 2-letter ISO 639-1 code. Every returned tweet matches this language.
twitterHandlesstring[]X usernames whose posts to collect. Profile Tweets matches the Posts tab on X, with posts, reposts & the author's replies to their own posts. Add Exclude replies under Tweet type filters for original posts only. Profile With Replies keeps target-authored posts and replies. Add usernames with or without @. For example, elonmusk, @nasa.
Попробовать
Вызов из кода
Как работают запуски, опрос и тарификация →curl https://lovelyrouter.com/v1/tools/x-search/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{"input":{"searchTerms":["\"gemini argon\" min_faves:50 -filter:replies since:2026-10-01 lang:en"],"maxItems":20,"queryType":"Top"},"max_results":20}'# MCP (agents): suggest_tools → get_tool → run_tool
run_tool({
"tool": "x-search",
"input": {"searchTerms":["\"gemini argon\" min_faves:50 -filter:replies since:2026-10-01 lang:en"],"maxItems":20,"queryType":"Top"},
"max_results": 20
})Сколько это стоит
| Результаты | Запусков (по 500 за запуск) | Стоимость |
|---|---|---|
| 100 | 1 | $0.039 |
| 1,000 | 2 | $0.388 |
| 10,000 | 20 | $3.88 |
Предоплата, без подписки. Если результатов меньше запрошенного, вы платите меньше. Цены
Для чего используется
Частые вопросы
Сколько стоит API Поиск постов в X (Twitter)?
$0.000388 / tweet. 1,000 результатов, полученных запусками до 500, стоят $0.388. Подписки нет: оплата с предоплаченного баланса.
Это парсер Twitter?
Да. Если вы искали парсер Twitter, парсер поиска X или API поиска Twitter, это оно: Твиты по поисковым запросам, хэштегам или от указанных аккаунтов: текст, автор, вовлечённость, дата. Каждый запрос поддерживает операторы расширенного поиска X (from:, since:, min_faves:, filter:, lang: …).
Сколько результатов возвращает один запуск?
По умолчанию 20, до 500 за запуск. Задайте max_results, чтобы ограничить запуск: оплачиваются только полученные результаты.
Нужен ли мне аккаунт X (Twitter) или API-ключ?
Нет. Вы вызываете инструмент со своим API-ключом Lovely Router и получаете JSON. Ничего настраивать на X (Twitter) не нужно.
Может ли ИИ-агент использовать этот инструмент?
Да. Подключите Claude Code, Cursor или любой MCP-клиент к MCP-серверу Lovely Router: агент находит инструмент через suggest_tools и запускает его через run_tool с идентификатором x-search.
Что будет, если запуск завершится ошибкой?
Запуск, который завершился ошибкой или был остановлен, оплачивается только за выданные результаты, без платы за вызов. Максимальная стоимость запуска резервируется при старте, остаток освобождается после расчёта.