X (Twitter) API

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

Read public profiles, tweets, timelines and communities. Keep posts and their context together in your app.

WHAT YOU CAN BUILD / 04 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 ranked public tweets, including the pinned tweet and each post’s URL.

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.

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 4 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.

TRY IT HERE / LIVE SAMPLE

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.

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 successful requests

Growth

Save 6.3%

For regular workflows and bigger builds.

$89USD / one-time

50,000 credits

$1.78 per 1,000 successful requests

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, a user’s public tweets, individual tweets and community details. Records include identity, text, media and public counters for account and content research.

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

Use User Tweets to retrieve the profile’s public posts in ranked order, including the pinned tweet and a URL for each record. Pass a selected permalink to Tweet Details for its full post context.

Can the X (Twitter) API retrieve public community information?

Yes. Community Details returns the community name, description, member count, join policy, rules, creator and banners. Use the member previews and trending hashtags to add context to a community research card.

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?