X Twitter Search Scraper - Tweets, People & Media avatar

X Twitter Search Scraper - Tweets, People & Media

Pricing

from $3.00 / 1,000 x/twitter search results

Go to Apify Store
X Twitter Search Scraper - Tweets, People & Media

X Twitter Search Scraper - Tweets, People & Media

Search public X/Twitter results by keyword, hashtag, advanced operator, or tab. Export tweets, profiles, photos, and media with engagement metrics, authors, URLs, cursors, and clean summaries. No cookies required. MCP/API-ready.

Pricing

from $3.00 / 1,000 x/twitter search results

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

88

Total users

37

Monthly active users

a day ago

Last modified

Share

Search public X/Twitter results by keyword, hashtag, username, advanced operator, or search tab, and save one normalized dataset record per result. This Actor accepts a list of search queries and can return tweets, profiles, lists, photos, or media items, depending on the selected tab. Each record can include fields such as text, canonical URLs, author details, engagement metrics, pagination metadata, and scrape timestamps. The outcome is a dataset that is ready for review, reporting, enrichment, and AI-agent workflows through the Apify platform and Apify MCP.

Best fit and connected workflows

This Actor fits public X/Twitter search workflows that need structured records from the search surface:

  • Search tweet-like results with Top or Latest
  • Discover account-like results with People
  • Collect visual results with Photos or Media
  • Narrow searches with hashtags, usernames, and advanced operators
  • Feed records into downstream analysis, dashboards, enrichment, or summarization steps

If a workflow begins with a public X/Twitter query and needs normalized records in a dataset, this Actor provides that handoff.

Practical scenario

A social media analyst wants to review public mentions of a launch keyword. They enter ai agents, choose Latest, and set a result cap for a quick review. The dataset returns fields such as text, tweetUrl, authorUsername, authorFollowers, likeCount, retweetCount, and replyCount. Using those records, the analyst can review the post text, open the source URL for context, and decide whether to continue with a narrower operator in the next run.

Input

Required input is a list of search queries. Each query can be a keyword, hashtag, username, or advanced operator.

FieldTypeDescriptionDefault
queriesarray of stringSearch queries, hashtags, usernames, or advanced operators. Examples include ai agents, #buildinpublic, from:openai min_faves:100, and (marketing OR sales) lang:en.Required
searchTypestringX search tab to scrape: Top, Latest, People, Photos, or Media. Top and Latest return tweet-like results, People returns account-like results, and Photos and Media return media-heavy results.Latest
maxResultsintegerMaximum dataset records saved across all queries. This is also the hard cap for billable result events.100
maxPagesPerQueryintegerMaximum pages per query. Use lower values for quick tests and higher values when the provider returns a next cursor.10
startCursorstringOptional provider cursor from a previous run. Use it when continuing one query and search type from RUN_SUMMARY.nextCursors.
includeRawbooleanAttach the raw provider item to each dataset record for field inspection.false
dedupeResultsbooleanSkip duplicate tweet, account, or list records across pages and queries.true

Valid focused example:

{
"queries": ["ai agents", "#buildinpublic", "from:openai min_faves:100"],
"searchType": "Latest",
"maxResults": 100,
"maxPagesPerQuery": 10,
"dedupeResults": true,
"includeRaw": false
}

Output

Each dataset record is normalized into a stable schema. The exact fields vary by result type and tab, but the dataset is always written to the default dataset.

FieldTypeDescription
recordTypestringNormalized result family: tweet, profile, list, media, or unknown.
searchQuerystringQuery that produced the result.
searchTypestringX search tab used for the result.
positioninteger1-based position within the run after normalization and dedupe.
tweetIdstringTweet status ID when available.
tweetUrlstringCanonical X/Twitter tweet URL when available.
textstringTweet text, profile bio, list description, or available result text.
createdAtstringISO timestamp when the result was created or posted, if available.
authorUsernamestringTweet author or profile username.
authorNamestringTweet author or profile display name.
authorIdstringNumeric X/Twitter user ID when available.
authorUrlstringCanonical X/Twitter profile URL.
authorVerifiedbooleanVerification flag when available.
authorFollowersintegerFollower count for profile and person results when available.
authorFollowingintegerFollowing count for profile and person results when available.
replyCountintegerReply count.
retweetCountintegerRetweet count.
quoteCountintegerQuote count.
likeCountintegerLike count.
viewCountintegerView count.
bookmarkCountintegerBookmark count.
hashtagsarray of stringHashtags found in the result.
mentionsarray of stringMentions found in the result.
urlsarray of stringURLs found in the result.
mediaUrlsarray of stringMedia URLs found in the result.
listNamestringList name for list-like results.
listUrlstringList URL for list-like results.
providerstringProvider used for the result.
providerPageintegerProvider page number within the run.
scrapedAtstringISO timestamp when the record was emitted.
rawobjectRaw provider item, included only when includeRaw is enabled.

Illustrative dataset record:

{
"recordType": "tweet",
"searchQuery": "ai agents",
"searchType": "Latest",
"position": 1,
"tweetId": "1234567890",
"tweetUrl": "https://x.com/example/status/1234567890",
"text": "Exploring AI agents for workflow automation.",
"createdAt": "2026-01-15T10:30:00.000Z",
"authorUsername": "example",
"authorName": "Example Account",
"authorVerified": true,
"authorFollowers": 12500,
"replyCount": 8,
"retweetCount": 14,
"quoteCount": 2,
"likeCount": 91,
"viewCount": 2400,
"hashtags": ["aiagents"],
"mentions": ["openai"],
"urls": ["https://example.com"],
"mediaUrls": [],
"provider": "socialvault",
"providerPage": 1,
"scrapedAt": "2026-01-15T10:31:10.000Z"
}

The Actor also writes:

  • OUTPUT for a concise summary
  • RUN_SUMMARY for detailed execution telemetry and next cursors

How it works

This Actor uses a provider-backed API to search the public X/Twitter search surface. The live contract shows support for the Top, Latest, People, Photos, and Media tabs. It includes cursor pagination, provider retries, normalized dataset records, deduplication, and empty-result handling. The live contract also shows that no cookies are required.

Pricing

This Actor uses pay per event pricing plus Apify platform usage. The live Pricing tab on the Actor page shows the current details for both the Actor events and platform usage.

Billable events include:

  • Actor start
  • Each saved X/Twitter search result

Example in words: if a run starts once and saves one hundred search results, the execution includes one Actor start event and one hundred search result events, in addition to any Apify platform usage shown in the live Pricing tab.

Use with AI agents (MCP)

This Actor is available as an Apify Actor usable through Apify MCP. The tool performs a public X/Twitter search workflow that takes queries, search-tab selection, pagination settings, and output options, then returns normalized dataset records plus execution summaries for downstream agent processing.

Exact Actor identity: khadinakbar/x-twitter-search-scraper

Search public X/Twitter results for from:openai min_faves:100 in Latest, return the top records with author info, engagement counts, and canonical URLs, then summarize the results by query and search type.

Output interpretation for agents:

  • Use recordType to separate tweets, profiles, lists, and media items
  • Use text together with tweetUrl or authorUrl for result review
  • Use providerPage and scrapedAt to understand pagination order
  • Use RUN_SUMMARY.nextCursors when continuing a query and search type pair
  • Use includeRaw when field drift needs inspection

Scope and provenance:

  • Results come from public X/Twitter search responses
  • Each dataset row represents one normalized search result
  • The searchQuery, searchType, and provider fields provide provenance for each row

Pagination and cost guidance:

  • Lower maxPagesPerQuery for quick checks
  • Increase it when the provider returns a next cursor and you want deeper coverage
  • maxResults is the cap for saved records and billable search-result events
  • startCursor is intended for continuing one query and search type from a previous run

Apify API example

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
const input = {
queries: ['ai agents', '#buildinpublic'],
searchType: 'Latest',
maxResults: 25,
maxPagesPerQuery: 5,
dedupeResults: true,
};
const run = await client.actor('khadinakbar/x-twitter-search-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems({
clean: true,
limit: 5,
});
console.log('First dataset items:', items);

Best results and outcome guidance

  • Use Latest when you want recent public posts
  • Use Top when you want higher-signal public results from search
  • Use People when the workflow needs accounts rather than posts
  • Use Photos or Media when the workflow needs visual results
  • Start with a narrow query, then expand with additional operators if the dataset is too broad
  • Review authorFollowers, likeCount, retweetCount, and replyCount together for quick triage
  • Use startCursor when continuing the same query and search type from a prior run

Continue the workflow

Design note

I found that the live dataset contract includes recordType values for tweet, profile, list, media, and unknown, which makes the output usable across multiple X search tabs.

FAQ

When should I use Top versus Latest?

Use Latest for recent public search results and Top when you want the search surface to return higher-signal results.

When should I use People?

Use People when your workflow needs account-like results such as usernames, bios, and follower counts.

What does startCursor do?

It lets you continue one query and search type from a previous run using the cursor from RUN_SUMMARY.nextCursors.

Can I collect media-focused results?

Yes. Photos and Media are available as search tabs, and the dataset can include mediaUrls.

What should I read after the execution finishes?

Read the dataset for normalized records, then inspect OUTPUT and RUN_SUMMARY for the concise summary, detailed telemetry, and next cursors.

Responsible use

Use this Actor for public X/Twitter search workflows that fit your data access, privacy, and compliance requirements. Review the resulting public records in context, keep downstream processing aligned with your organization policies, and prefer the narrowest search scope that answers the task.