X (Twitter) API

X (Twitter) Scraper API for Tweets, Profiles and Communities

Read public profiles, tweets, timelines, account highlights and community posts, and find posts by keyword. Keep posts and their context together in your app.

Gibran Pulga, CEO of Desys FinanceGibran PulgaCEO, Desys Finance

We use ScrapeAtlas to gather social sentiment data for our banking partners at a scale we wouldn't have been able to otherwise.

WHAT YOU CAN BUILD / 07 ENDPOINTS

Put X (Twitter) data to work.

Find your use case, then explore the request and response.

Get an X (Twitter) profile

GET/v1/twitter/profile

Build an account research directory with public bios, counters, images, verification and affiliation labels.

List an X (Twitter) user's public tweets

GET/v1/twitter/user-tweets

Build an account content feed from public tweets, newest first, with the pinned tweet flagged and each post’s URL.

Get an X (Twitter) user’s highlights

GET/v1/twitter/user-highlights

Build an account highlights gallery from the posts its owner selected, with tweet text, media, engagement counters and source links.

Get an X (Twitter) tweet

GET/v1/twitter/tweet

Build a post research view with text, author, media, quoted posts, engagement counters and views.

Get an X (Twitter) community

GET/v1/twitter/community

Build a community discovery card with its description, rules, join policy, member count and trending hashtags.

Get an X (Twitter) community’s tweets

GET/v1/twitter/community/tweets

Build a community reading list with tweet text, author records, media, engagement counters and links to the original posts.

Search X (Twitter) posts

GET/v1/twitter/search/posts

Build a topic research feed with matching tweet text, authors, media, engagement counters and source links.

HOW IT WORKS

From API key to X (Twitter) data in four steps.

Run a sample below without a key.

  1. 01

    Get your API key

    Create a free account and copy your key. You start with 100 free credits; no card needed.

  2. 02

    Choose an endpoint

    Pick one of the 7 X (Twitter) endpoints and add its input, such as a public handle.

  3. 03

    Send one request

    Call it with your key in the x-api-key header. ScrapeAtlas reads the public X (Twitter) data and retries when a read fails.

  4. 04

    Use the JSON

    Get structured JSON with a coverage status. Only successful requests use a credit.

LIVE RESULTS

Try a sample request.

Try the X (Twitter) API right here. This sample uses the List an X (Twitter) user's public tweets endpoint and returns live JSON. No API key needed.

  1. 01
    Choose a sample value

    Start with NASA, or change the handle field to your own value.

  2. 02
    Select Run sample

    Execute the sample code and see the response in the JSON response tab.

  3. 03
    Build on the result

    Open the full playground to try more parameters and copy code for your app.

Open this endpoint in the playground Request and response fields
LIVE SAMPLE / List an X (Twitter) user's public tweetsNo API key needed

Preparing the sample…

// Run this sample here — no API key needed.
const value = "NASA";
const url = new URL("/website/demo/twitter",
  "https://api.scrapeatlas.com");
url.searchParams.set("value", value);

const response = await fetch(url);
const data = await response.json();
console.log(data);
GET/v1/twitter/user-tweets

A live example from our playground. Change the value above, then select Run sample.

CUSTOMER STORIES

What they are saying
about us.

  • Matteo L.Small-Business (50 or fewer emp.)

    “Easy, Affordable Scraping for Product Ideas—More Platforms Needed”

    I use ScrapeAtlas to find product ideas—real ideas that people need. I couldn’t get to people’s ideas on social media platforms without it. I like that it’s easy and capable, and it isn’t expensive. I value the scraping and MCP features. …

    Read on G2
  • Ms H.Sales, Mid-Market (51-1000 emp.)

    “ScrapeAtlas Replaces Multiple Scrapers with One Simple Solution”

    ScrapeAtlas saves me from juggling a different scraper for every platform. … ScrapeAtlas solves the problem of getting reliable public data from many social and e-commerce platforms without building and maintaining my own scrapers.

    Read on G2
  • We use ScrapeAtlas to gather social sentiment data for our banking partners at a scale we wouldn't have been able to otherwise.

    Gibran PulgaCEO, Desys Finance
  • Stas D.Founder, Marketing and Advertising

    “Reliable parsers and flexible API for audience search”

    I like the convenient documentation and conditions at ScrapeAtlas. The parsers work great: I use keyword data from fresh threads to find target audiences and clients in Threads. I also appreciate the higher quality API responses and more detailed request customization. The initial setup was very easy for me.

    Read on G2

Nigel Yong — Founder, PostOnce

Pay as you go

Start free.
Build at your pace.

One-time credit packs, priced in US dollars. Credits never expire, and there is no monthly commitment.

Free

Try the API with your next idea.

$0No credit card needed

100 free credits

One starter grant per account

Starter

For a new idea or a one-off project.

$19USD / one-time

10,000 credits

$1.90 per 1,000 credits

Growth

Popular

For regular workflows and bigger builds.

$89USD / one-time

50,000 credits

$1.78 per 1,000 credits

Save 6.3% compared with Starter

Scale

For high-volume data collection.

$249USD / one-time

200,000 credits

$1.25 per 1,000 credits

Save 34.5% compared with Starter

Enterprise Plan

Want to scrape larger volumes?

Let’s talk about a plan that fits your scale.

X (Twitter) API

Frequently Asked Questions

Explore the API reference

X (Twitter) API and scraping

What public data can I retrieve with the X (Twitter) API?

Retrieve profiles, user tweets and highlights, individual tweets, and community details and posts, and search posts by keyword. Records include identity, text, media, public counters and source links for account and content research.

How do I scrape X (Twitter) posts from a public account?

Use User Tweets to retrieve public posts newest first, with the pinned tweet flagged and a URL for each record. User Highlights returns the posts the account owner selected for the Highlights tab. Pass a permalink to Tweet Details for its full post context.

Can the X (Twitter) API retrieve community details and posts?

Yes. Community Details returns the name, description, member count, join policy, rules, creator and banners. Community Tweets returns posts with text, author records, media, public engagement counters and links to the original tweets.

X (Twitter): profile research and tweet records

Can I retrieve X (Twitter) profile bios, counts and verification?

Yes. Profile accepts a handle and returns public identity, bio, entities, counters, images, verification and affiliation labels. Use those fields to enrich an account research directory.

Can I retrieve long posts and quoted tweets from X (Twitter)?

Tweet Details preserves note text for long posts and includes quoted or retweeted tweet data. The response also brings author, media, engagement counters and views together for a detailed post research view.

Which X (Twitter) tweet fields can I retrieve from a permalink?

Tweet Details returns the author, text, media, quoted or retweeted content, long-post note text, engagement counters and views. Keep the permalink with the record to support source-linked content analysis.

API access and integration

How do I get a ScrapeAtlas API key and authenticate requests?

Create a ScrapeAtlas account and generate an API key in the dashboard. Send the key in the x-api-key request header when calling https://api.scrapeatlas.com. The API playground lets you enter an endpoint’s parameters and inspect its JSON response.

Can I call the scraping API from Python, JavaScript or the CLI?

Yes. Send authenticated HTTP requests from Python, JavaScript or another language that supports HTTP. The endpoint reference includes request examples and response fields. Use the ScrapeAtlas CLI for terminal workflows and pass the returned pagination values when requesting additional result pages.

Can I connect an AI assistant to the ScrapeAtlas MCP server?

Yes. Connect an MCP-compatible assistant to the ScrapeAtlas MCP server to discover and call the public platform tools with your ScrapeAtlas account. The agent reference also gives coding assistants a readable guide to the endpoints and their request schemas.

Make something with it

Ready to build?

Bring social data into your next project.
Start with 100 free credits and see what you can build.

No credit card needed.Building with an AI agent?