X (Twitter) scraper API
Public X profiles, tweets, replies, communities, and search over REST — one API key, shared envelope.
Why teams use Social Fetch for X (Twitter)
X's official API requires a developer account, app approval, OAuth, and paid tiers for meaningful read volume. Social Fetch covers the public slice as nine `GET /v1/twitter/...` routes on one API key.
Identity and content: `GET /v1/twitter/profiles/{handle}`; `GET /v1/twitter/profiles/{handle}/tweets` with cursor pagination and optional `includeReplies` / `includePinned`; `GET /v1/twitter/tweets` for one post by permalink or id (optional `trim`); `GET /v1/twitter/tweets/replies`; `GET /v1/twitter/tweets/transcript` for video speech text.
Discovery: `GET /v1/twitter/search` (keyword with `section` tabs and engagement filters), `GET /v1/twitter/hashtags`, `GET /v1/twitter/communities`, and `GET /v1/twitter/communities/tweets`. Every route returns `{ data, meta }` with `data.lookupStatus`, `meta.requestId`, and `meta.creditsCharged`.
What X (Twitter) data can you get?
- Profile card by handle — bio, avatar, verification flags, and follower/post metrics from `GET /v1/twitter/profiles/{handle}`.
- Handle timeline with cursor pagination (`limit` up to 100) and optional `includeReplies` / `includePinned` toggles.
- Single tweet by permalink or numeric id — text, engagement metrics, media, entities, and quote/reply/retweet flags, with an optional `trim` mode for a smaller body.
- Reply thread under a status URL, cursor-paged, with `conversationId` and `inReplyToStatusId` linkage.
- Video tweet transcripts — a plain spoken-text string, an explicit null when speech isn't detected, and a typed rejection for clips too long to transcribe.
- Keyword search with `section` tabs (`top` / `latest` / `people` / `photos` / `videos`), engagement floors, and date/language filters.
- Hashtag-led discovery with the same section-tab pattern plus `data.people` rows.
- Community metadata (member count, join policy, rules, creator) and paged community post feeds by permalink.
X (Twitter) API endpoints
Routes from the live API catalog. Open an endpoint for parameters and examples — credit notes come from OpenAPI pricing extensions.
Profiles & channels
Lists & graphs
Content
Search & discovery
Comments
Transcripts
How to call the X (Twitter) API
1. Create an API key
Sign up at Social Fetch and copy a key (`sfk_…`). New accounts get 100 free credits — enough to check a profile card, pull one tweet, and run a search page against live X data.
2. Call a Twitter route
Start with `GET /v1/twitter/profiles/{handle}` for identity, then add `.../tweets`, `GET /v1/twitter/tweets`, `.../replies`, `.../transcript`, `search`, `hashtags`, or `communities` as the job needs. Send `x-api-key` on every request.
3. Read the shared envelope
Branch on `data.lookupStatus` before writing a row. Log `meta.requestId` for support. Bill against `meta.creditsCharged` — profile, tweet, transcript, and community lookups run 1 credit; timeline, search, hashtag, and reply-thread pages run 2, so trust the field, not a flat assumption.
How much does the X (Twitter) API cost?
Twitter routes are not one flat rate. `GET /v1/twitter/profiles/{handle}`, `GET /v1/twitter/tweets`, `GET /v1/twitter/tweets/transcript`, `GET /v1/twitter/communities`, and `GET /v1/twitter/communities/tweets` charge 1 credit per successful request. `GET /v1/twitter/profiles/{handle}/tweets`, `GET /v1/twitter/search`, `GET /v1/twitter/hashtags`, and `GET /v1/twitter/tweets/replies` charge 2 credits per successful request, and each paginated page is billed separately. Credits never expire on pay-as-you-go packs, and signup includes 100 free credits. Always confirm the actual cost from `meta.creditsCharged` on the response — this note is a guide, not the source of truth.
Social Fetch vs the official X (Twitter) API
X official API is for posting, account management, and enterprise products under your own developer contract — paid tiers with rate limits. Social Fetch is public-data lookup with a Social Fetch API key, credit-metered per request, same envelope as the rest of the marketplace.
X (Twitter) API FAQ
Is there an X / Twitter API that doesn't require a developer account?
Yes. Social Fetch's nine Twitter routes read public profiles, timelines, single tweets, reply threads, video transcripts, search, hashtags, and communities over REST. You authenticate with a Social Fetch API key only — no X developer account, app approval, or OAuth.
What X / Twitter data can I pull with Social Fetch?
Profile cards (`GET /v1/twitter/profiles/{handle}`), handle timelines (`.../tweets`), single tweets by URL or id (`GET /v1/twitter/tweets`), reply threads (`.../replies`), video tweet transcripts (`.../transcript`), keyword and hashtag search (`GET /v1/twitter/search`, `GET /v1/twitter/hashtags`), and community metadata plus community posts (`GET /v1/twitter/communities`, `.../tweets`). Exact parameters and response fields are on each endpoint page linked from this hub.
How do I fetch a single tweet by URL?
Call `GET /v1/twitter/tweets` with a required `url` query param — a tweet permalink (`x.com` or `twitter.com` `/status/...`) or a bare numeric id. Read `data.lookupStatus`, then `data.tweet` and `data.author`. Pass `trim=true` for a smaller payload that omits author and tweet core detail.
How do I list tweets for a handle?
Call `GET /v1/twitter/profiles/{handle}/tweets`. Optional params: `limit` (default 40, max 100), `cursor`, `includeReplies` (default false), and `includePinned` (default false, first page only). Page forward with `data.page.nextCursor` while `data.page.hasMore` is true.
Can I get replies to a specific tweet?
Yes. `GET /v1/twitter/tweets/replies` takes the same `url` (or numeric id) input as the single-tweet route and returns `data.replies` with `conversationId` / `inReplyToStatusId` linkage, cursor-paged the same way as profile tweets.
Can I get a transcript of a video tweet?
Yes, via `GET /v1/twitter/tweets/transcript`. `data.transcript` is a plain string when speech is detected, or null when it isn't — a `found` lookupStatus does not guarantee text. Videos that exceed the supported length return HTTP 400 `video_too_long_for_transcription` rather than a null string on 200.
What is the difference between Twitter search and hashtag search?
`GET /v1/twitter/search` is free-text keyword search — native operators, quotes, and `-negation` work. `GET /v1/twitter/hashtags` is discovery for one specific tag. Both share the same `section` tabs (`top`, `latest`, `people`, `photos`, `videos`) and cursor pagination, but they are separate operations with separate credit charges — a `#tag` keyword query on search is not the same call as the hashtag route.
What are X Communities, and can I pull their posts?
Communities are X's topic rooms, addressed by an `x.com/i/communities/{id}` permalink. `GET /v1/twitter/communities` returns the card — name, member count, `joinPolicy` (`open` or `restricted`), rules, and creator. `GET /v1/twitter/communities/tweets` pages the posts published inside. Both take the community URL, not a handle or hashtag.
What happens for private, suspended, or deleted accounts and tweets?
Social Fetch does not invent public data for inaccessible accounts or posts. Branch on `data.lookupStatus` (`found`, `not_found`, and related typed outcomes documented per route) before writing a row. A `found` profile can still page zero tweets under a restrictive filter, and a `found` community-tweets call can return an empty `tweets` array when the room has no matching posts — check the array length, not just the status.
How much does the Twitter API cost on Social Fetch?
It varies by operation, not a flat rate. Profile card, single-tweet, transcript, and community lookups run 1 credit per successful request. Handle timelines, keyword search, hashtag search, and reply threads run 2 credits per successful request, and each paginated page is a separate billed call. Pack pricing is on `/pricing`; confirm the actual cost on every response with `meta.creditsCharged`.
Start with X (Twitter) data
Create an account, spend the 100 free credits on live X (Twitter) routes, then buy a pack when the JSON fits your pipeline. Credits do not expire on pay-as-you-go packs.