Skip to content

X data for your AI agents, priced per call.

Profiles, tweets, search and followers over one REST API. Every call has a fixed token price, known before you make it.

1,000 free tokens on signup · no card · failed calls refunded

From signup to your first paid call in three steps

One balance, one key, one price per endpoint. Watch a call spend its tokens: pick an endpoint in the console.

  1. Sign up, confirm your email

    Your account starts with 1,000 tokens. No card, no plan to pick.

  2. Create your API key

    One key per account, shown once. Send it as the x-api-key header.

  3. Each call spends its price

    Every response carries x-tokens-cost and x-tokens-remaining. Calls that fail on our side are refunded.

Try it now

balance1,000tokens

Built to sit inside an agent loop

Wrap any endpoint as a tool. Your agent sees the price of what it is about to do, and the balance after.

  • Price known before the call

    Every endpoint has a fixed token price from one catalog. Your agent can budget before it acts.

  • Cost on every response

    x-tokens-cost and x-tokens-remaining ride on each reply, so spend is visible inside the loop.

  • Failures are refunded

    Upstream errors and timeouts give the tokens back. Only real answers, including not-found, are charged.

tools/x-profile.ts
// One tool, one fixed price: 1 token per call.
const API = "https://api.xscraper.online";

export const getXProfile = {
  name: "get_x_profile",
  description: "Look up an X profile by username.",
  parameters: {
    type: "object",
    properties: { username: { type: "string" } },
    required: ["username"],
  },
  async run({ username }: { username: string }) {
    const res = await fetch(
      `${API}/api/v1/twitter/users/profile_by_username/${username}`,
      { headers: { "x-api-key": process.env.XSCRAPER_KEY! } },
    );
    // Cost and balance come back as headers on every call.
    const cost = res.headers.get("x-tokens-cost");
    const left = res.headers.get("x-tokens-remaining");
    console.log(`spent ${cost}, ${left} left`);
    return (await res.json()).data;
  },
};

Pricing, per call

19 endpoints, all GET. Flat endpoints cost the same every time. Paged endpoints cost a base price plus a per-page amount, so the price grows with the count you ask for.

Browse the reference
EndpointMinMax
Tweets
User tweets/users/tweets/:username37
Latest tweet/users/latest_tweet/:username11
User tweets and replies/users/replies/:username37
User tweets by ID/users/tweets_by_user_id/:userId37
User tweets and replies by ID/users/replies_by_user_id/:userId37
Liked tweets/users/likes/:username48
Tweet by ID/tweets/:tweetId11
Tweet replies/tweets/:tweetId/replies44
Tweet quotes/tweets/:tweetId/quotes44
Search
Search profiles/users/search_profiles46
Search tweets/tweets/search614
Advanced search/tweets/advanced_search812
Profiles
Profile by username/users/profile_by_username/:username11
Profile by user ID/users/profile_by_userid/:userId33
Username to user ID/users/user_id/:username11
Social graph
Followers/users/followers/:userId44
Following/users/following/:userId44
Lists
List tweets/lists/:listId/tweets37
Trends
Trends/trends22

Questions

What does a token buy?

A profile lookup costs 1 token. Endpoints that page through results cost a base price plus a per-page amount, so asking for 100 tweets costs more than asking for 5. The pricing table lists every endpoint.

Am I charged when a call fails?

Not when it fails on our side. Tokens are taken when the call starts and returned automatically on errors and rate limits. A not-found answer (the user or tweet does not exist) is a real answer and is charged.

What happens when I run out?

Calls return HTTP 402 with the price and your balance. Nothing is billed to a card, because there is no card.

Can I buy more tokens?

Not yet. Paid top-ups are planned. For now every account gets 1,000 tokens after confirming its email.

Is there a rate limit?

Yes, 100 requests per minute per key. Responses include X-RateLimit headers, and a 429 tells you when to retry.

Why only one API key?

It keeps the free tokens fair. You can rotate your key at any time from the dashboard.

1,000 tokens are waiting for you.

Create an account, confirm your email, make your first call.

Create account