Twitter Search API
Twitter Search API for keywords, hashtags, mentions, and accounts
TwtAPI gives you a REST endpoint for public Twitter/X search. Run brand terms, hashtags, mentions, exact phrases, language filters, and from:username queries, then process the results in your own backend, scripts, or HTTP-based tools.
Quick Take
Start with the decision, then read deeper if you need to
If you only need the fast decision frame, start with these points before reading the rest of the page.
What you can verify in 5 minutes
Start with one real query before turning search into a scheduled workflow.
- Run q=(your brand OR competitor) lang:en against the latest results.
- For example: q=("TwtAPI" OR "twitter api") lang:en, type=Latest, count=20. Confirm relevance before wiring automation.
- Examples: q=("pricing page" OR "API cost") lang:en, q=#buildinpublic, q=@twtapi. Useful for brand mentions, campaign feedback, and content research.
- Search brand names, product terms, @mentions, and support phrases, then let your own job write selected results to a sheet, ticket queue, or alerting system.
Start Here
Copy this request and replace the query
Run one realistic search first. Then check fields, pagination, and pricing before you schedule it.
After signup, the API Console opens with this query prefilled. No credit card required.
Common search operators
Start with a query you would really run in production, verify relevance, then add pagination and automation.
| Purpose | Query | When to use it |
|---|---|---|
| Keyword | OpenAI | Find posts containing a topic or brand term. |
| Exact phrase | "AI agents" | Keep multi-word intent together. |
| Hashtag | #buildinpublic | Track a campaign or public conversation. |
| Mention | @twtapi | Find public posts that mention an account. |
| Author | from:openai | Limit results to one public account. |
| Language | OpenAI lang:en | Reduce noise before downstream analysis. |
| Boolean group | ("API cost" OR pricing) lang:en | Cover close variants in one query. |
Endpoint, authentication, and parameters
GET
https://api.twtapi.com/api/v1/twitter/SearchSend the API key with Authorization: Bearer $TWTAPI_API_KEY.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
| q | string | Required | Search expression, for example: ("API cost" OR pricing) lang:en. |
| type | enum | Optional | Result order: Latest or Top. Use Latest for monitoring. |
| count | integer | Optional | Requested page size. Start with 20 while validating relevance. |
| cursor | string | Optional | Cursor returned by the previous response for the next page. |
Stable normalized response
The raw payload is preserved and `_normalized` is appended for direct access to tweets, IDs, and pagination cursors.
{
"_normalized": {
"endpoint": "Search",
"tweets": [
{
"rest_id": "1897023456789012345",
"result": {
"legacy": {
"full_text": "AI agents are changing how teams monitor public conversations.",
"created_at": "Wed Jul 22 12:30:00 +0000 2026",
"favorite_count": 128,
"retweet_count": 24
}
}
}
],
"tweet_ids": ["1897023456789012345"],
"returned_count": 1,
"requested_count": 20,
"next_cursor": "scroll:next-page-cursor",
"previous_cursor": null
}
}Turn query cadence into a plan estimate
These examples assume one result page per query and exclude retries or enrichment calls.
- 10 searches per day
- About 300 calls/month, which fits the Free plan for an initial validation.
- 20 keywords checked hourly
- About 14,400 calls/month, below Basic's 50,000 monthly calls at the current published price of $15/month.
- Add three buffers before production
- Model cursor pages, failed-request retries, and TweetDetail or user enrichment as separate calls.
Try a production-style query
curl -G "https://api.twtapi.com/api/v1/twitter/Search" \
-H "Authorization: Bearer $TWTAPI_API_KEY" \
--data-urlencode "q=(your brand OR competitor) lang:en" \
--data-urlencode "type=Latest" \
--data-urlencode "count=20"Swap in your brand, hashtag, competitor, support phrase, or from:username query. If the response has the fields your next step needs, turn it into a scheduled workflow.
Search API comparison
Twitter/X search routes compared by access model
Compare query control, billing unit, and production ownership before choosing a search API. Public pricing and endpoint access can change, so re-open the source pages before purchasing.
Checked September 16, 2026
| Route | Search and setup | Published cost signal | Best fit |
|---|---|---|---|
| TwtAPI Search | GET /api/v1/twitter/Search with q, type, count, and cursor for keywords, hashtags, mentions, and from:username queries. | Free: 300 monthly calls. Basic: $15/month for 50,000 calls. | Public search and monitoring that should feed your own app, workflow, or agent. |
| Official X Search Posts | Official search endpoints, query operators, app credentials, and X developer tooling. | Current X docs use prepaid credits and endpoint-level pay-per-use pricing. | Official platform access, SDK alignment, and account-permissioned workflows. |
| TwitterAPI.io | Third-party search and timeline endpoints with pay-per-use access. | Public pricing advertises $0.15 per 1,000 tweets for pay-per-use reads. | Teams comparing low per-result cost and broad Twitter/X endpoint coverage. |
| Apify Twitter Search | Actor-based scraping through the Apify API and datasets. | Cost depends on actor pricing, compute, runs, and returned data. | Scraping-centric workflows or teams already using Apify for broader web automation. |
Use Cases
Use it when search results need to feed another tool
For one-off manual checks, the browser can be enough. TwtAPI is for repeated search jobs, saved results, and downstream analysis.
Brand mentions and support monitoring
Search brand names, product terms, @mentions, and support phrases, then let your own job write selected results to a sheet, ticket queue, or alerting system.
Competitor and launch tracking
Track competitor names, launch terms, and campaign hashtags with tweet links, timestamps, and author context for weekly review.
Content research and market scanning
Collect samples with keywords, exact phrases, and language filters before classification, summaries, or topic clustering.
AI agents, scripts, and internal tools
Use the Search REST API as the first data step, then connect it through your code, an HTTP Request node, or a backend job to Claude/OpenAI, databases, dashboards, or agent workflows.
Trial and Cost
Estimate usage with one real query
Do not judge only by a successful first request. Check query frequency, pagination depth, and the amount of useful data you will process each day.
Start with a production-like query
For example: q=("TwtAPI" OR "twitter api") lang:en, type=Latest, count=20. Confirm relevance before wiring automation.
Count pagination in your usage model
One page of 20 results and five cursor pages are different workloads. Monitoring jobs also need rules for empty runs and duplicates.
Open pricing before the pilot grows
If a job runs hourly across dozens of keywords, estimate the plan before you decide the final query split and schedule.
Separate historical search from monitoring
Current monitoring and full-archive research are different jobs. If you need older posts from a fixed date range, confirm coverage and cost separately.
Capabilities
Four search jobs you can build from the endpoint
Start with Search, then enrich with tweet detail or account data only when the workflow needs it.
| Area | What to check | Why it matters |
|---|---|---|
| search_tweets | Search keywords, hashtags, mentions, and exact phrases | Examples: q=("pricing page" OR "API cost") lang:en, q=#buildinpublic, q=@twtapi. Useful for brand mentions, campaign feedback, and content research. |
| get_tweet_detail | Use tweet detail when the next step needs more fields | After Search returns tweet IDs, fetch detail to verify text, engagement, links, media, and conversation context before storing the result. |
| get_user_by_username | Look up the author behind a result | When a result matters, enrich the username to see whether the author is a customer, competitor, creator, or casual account. |
| get_user_tweets | Expand one search result into an account timeline | Pull recent posts from the same account to see whether the tweet is a one-off comment or part of an ongoing topic. |
Setup
From the first request to a scheduled search job
Make a single request reliable before you connect it to monitoring, reports, or AI analysis.
- 1
1. Write one real query
Use the actual brand, competitor, support phrase, hashtag, or account pattern you plan to monitor: q=("your brand" OR competitor) lang:en, q=#campaign, or q=from:username.
- 2
2. Inspect the payload
Check for tweet_id, text, timestamp, author, engagement, and source URL. Add TweetDetail or user lookup only if the next step needs more context.
- 3
3. Add cursor, dedupe, and retries
Scheduled jobs should store a cursor or last-seen value, avoid duplicate processing, and retry failures without leaving a sheet or report half updated.
- 4
4. Send results downstream
TwtAPI returns search results; it does not natively push to third-party tools. Use a backend job, Apps Script, an HTTP Request node, or your own webhook handler to write results to a database, sheet, alert, or AI summary step.
FAQ
Questions before you start using it
These are the practical checks teams make before putting tweet search into a real workflow.
How long does it take to run the first Twitter/X search?
Usually a few minutes: get an API key, open the Search docs, and call /api/v1/twitter/Search with curl or your HTTP client. Use a real brand, hashtag, or from:username query for the first test.
Which search query styles are supported?
Use keywords, hashtags, mentions, exact phrases, language filters, and account filters such as q=#AI, q=("pricing" OR "cost") lang:en, or q=from:username. Check the docs and live response for the exact behavior your workflow needs.
How do I search hashtags with the Twitter API?
Pass the hashtag in q, for example q=#buildinpublic, then choose the result type and count. For recurring tracking, store the cursor or last-seen tweet ID, dedupe results, and keep the source URL with every saved record.
Is this the official Twitter API v2 search endpoint?
No. TwtAPI provides a third-party public-data search endpoint. Use the official X API v2 Search Posts endpoints when you need official platform access, official SDK alignment, or account-permissioned capabilities.
How many results can I fetch at once?
Start with count=20 for a small test. For production, model cursor pagination, duplicate handling, empty runs, and how often the job will run each day.
Are n8n, Google Sheets, or webhook integrations built in?
No native integration is built in here. TwtAPI provides the Search REST API. You can call it from an n8n HTTP Request node, Apps Script, a backend job, or your own webhook handler, then write the result to Sheets, alerts, or an AI workflow.
How is this different from the official X API or a scraper?
The official X API is the right path for official permissions, posting, OAuth, ads, or DMs. Scrapers can fit one-off extraction or unusual pages. TwtAPI is for public read workflows such as tweet search, user lookup, timelines, and monitoring when you want a faster integration path.
How should I estimate pricing?
Write down the real schedule first: number of queries, frequency, pages per query, and whether you also call TweetDetail or user lookup. Then compare that usage with the pricing page.
What if I need historical full-archive search?
First decide whether you need current monitoring or historical research. Full-archive jobs usually need separate checks for coverage, pagination, cost, and compliance expectations.
Next step
Validate tweet search before you schedule it
Run a real query, check the payload and expected usage, then connect tweet search to monitoring, reporting, or AI analysis.