Twitter Trends API

Twitter (X) Trends Scraper API for Current Topics and Location-Based Trend Data

Retrieve current Twitter trends across news, sports, entertainment, personalized, and general categories, or get trending topics for a specific country or city using its WOEID.

2 Trends endpoints
1 base credit + 1 credit per trend returned
Failed requests cost 0 credits
1,000 free credits
No credit card required
Endpoints

Explore All 2 Trends Endpoints

Pick an endpoint to see what it does, which parameters it accepts, and the JSON your application receives. Authenticate with your API key in the x-api-key header.

GET/v1/twitter/trends/

Get Trends

Access real-time trending topics on Twitter. Get trending hashtags, tweet volumes, and category breakdowns for global trend analysis.

Parameters
categoryoptionalFilter by category: "trending", "for_you", "news", "sports", "entertainment"
countoptionalNumber of trends to return (default: 20)
Sample response
{
  "data": [
    { "name": "#AI", "tweet_volume": 125000, "category": "Technology" },
    { "name": "#SuperBowl", "tweet_volume": 890000, "category": "Sports" },
    { "name": "Breaking News", "tweet_volume": 45000, "category": "News" }
  ]
}
View Get Trends documentation

What Can You Build With the Twitter Trends Scraper API

Global and category trend dashboards

Build dashboards that display current general, personalized, news, sports, or entertainment trends. Show trend names, associated search queries, tweet counts, and contextual categories in a structured, real-time interface.

Regional market intelligence

Compare what is trending across supported countries and major cities. Identify geographic differences in public attention and understand which subjects are gaining visibility in specific markets before your competitors do.

Breaking news and event monitoring

Take regular snapshots of current news trends or location-specific topics to detect newly appearing stories, public events, sports moments, entertainment releases, and other rapidly developing conversations.

Content and campaign planning

Discover subjects already receiving attention before planning social posts, newsletters, campaigns, editorial calendars, or regional marketing activity. Compare general trends with news, sports, entertainment, and location-based results.

More Twitter Data APIs

Why Choose ScrapeBadger?

Build Faster

Sub-100ms response times. Most of that is your network latency, not our infrastructure. Deploy, test, iterate the same day instead of week-long proofs-of-concept.

Scale Confidently

99.9% uptime SLA. Your data pipeline doesn't stop because X changed a selector. Monitoring, patching, and infrastructure are all us. You focus on what you built.

All X Data on One Platform

Tweets, profiles, followers, communities, trends, geo, real-time Streams — 40+ endpoints. Whatever you need from X, it's here. No fragmented tooling, no API gaps forcing you to bolt on a second service.

Integrate Anywhere

RESTful API, SDK support (Python, Node, Go, PHP), MCP, CLI, and no code. Use it in an existing system or a new greenfield; the response shape never surprises you.

Integrate With Your Stack

Use ScrapeBadger through an official SDK, a standard API request, a real-time connection, or the tools already in your workflow.

Python SDK

Build asynchronous data pipelines with typed responses, automatic pagination, retry handling, and access to the complete Twitter API.

Node.js SDK

Add Twitter data to Node.js and TypeScript applications with type definitions, async pagination, and support for both ESM and CommonJS.

REST API

Connect from any backend or programming language using standard HTTP requests. Responses arrive as structured JSON that can be stored, transformed, or passed into another service.

WebSockets and Webhooks

Receive new tweets through a persistent WebSocket connection or deliver them directly to your application through signed webhooks. Available with Twitter Streams for account and query monitoring.

MCP for AI Tools

Give compatible AI agents access to Twitter profiles, tweets, search, trends, communities, lists, and monitoring tools through ScrapeBadger's MCP server.

ScrapeBadger CLI

Search tweets, retrieve profiles, inspect trends, and export results as JSON, CSV, Markdown, or terminal-friendly tables without writing an application.

Trusted by Developers Worldwide

See what our customers say about ScrapeBadger Twitter API.

We switched from the official Twitter API and cut our costs by 95%. The pagination is seamless, and we've never hit a rate limit. Best decision we made this year.

MC
Marcus Chen
Lead Data Engineer at DataFlow Analytics
2 weeks ago

The follower and engagement endpoints are incredibly detailed. We use it for influencer research and competitor analysis. Response times are sub-100ms consistently.

SM
Sarah Mitchell
Marketing Director at SocialPulse Agency
1 month ago

Started with the Apify actor, then moved to the API for more control. The 1,000 free credits were enough to build our MVP. Now processing 2M+ tweets monthly.

JR
James Rodriguez
Founder at TweetMetrics
3 weeks ago

Perfect for academic research. The community and trends endpoints give us data we couldn't get anywhere else. Documentation could use more examples, but support is responsive.

EW
Emily Watson
Research Scientist at Stanford NLP Lab
1 month ago

We monitor 50,000+ accounts for our clients. ScrapeBadger handles it without breaking a sweat. The bulk ID endpoints are a game-changer for large-scale monitoring.

AP
Alex Petrov
CTO at MediaMonitor Pro
2 weeks ago

The geo and trends endpoints power our location-based analytics. Setup took 10 minutes. Their Apify actors are also great for quick one-off scrapes.

LP
Lisa Park
Product Manager at Trendy AI
3 weeks ago
Pricing

Simple, transparent pricing

Start with pay-as-you-go credits (never expire) or save up to 64% with a monthly or annual subscription. Failed requests never consume credits, and the exact charge is returned in the X-Credits-Used response header.

Not Sure Which Plan Fits Your Needs? Calculate Your Cost and Find the Right Plan.

Every endpoint uses the same model: 1 base credit + 1 credit per item returned. Single-item lookups always cost 2 credits. Paginated list endpoints cost 1 + the number of items in the page. Failed requests cost 0 credits.

FAQ

Frequently asked questions

Everything you need to know about the Twitter Trends API.

What is a Twitter Trends Scraper API?

A Twitter Trends Scraper API turns current Twitter trend information into structured data an application can use. ScrapeBadger's two Trends endpoints retrieve current topics by category or return trends for a supported geographic location using its WOEID.

What data does the Twitter Trends API return?

Trend objects can include the trend name or hashtag, its Twitter search URL, the associated search query, tweet count when available, and domain context when available. Location-based responses also include the location's WOEID, name, and country.

Which trend categories can I retrieve?

Get Trending Topics supports trending, for-you, news, sports, and entertainment. The trending category is used by default when the category parameter is omitted.

What is a WOEID, and how do I find one?

WOEID means Where On Earth ID. It identifies a geographic location supported by Twitter trends. For example, 1 represents Worldwide, 23424977 represents the United States, and 23424975 represents the United Kingdom. ScrapeBadger's Geo Search endpoint can help identify WOEIDs for supported countries and cities.

Can I control how many trends are returned?

Yes. The Get Trending Topics endpoint accepts a count parameter from 1 to 100 and defaults to 20. The Get Trends by Location endpoint does not document a count parameter or cursor-based pagination.

How often should I retrieve Twitter trends?

Twitter's trending topics can change every few minutes. For a historical trend tracker, scheduled requests every 5 to 15 minutes can capture regular snapshots while keeping credit use predictable. More frequent requests may be appropriate for time-sensitive monitoring.

How much does the Twitter Trends API cost?

Every successful Trends request costs 1 base credit plus 1 credit for each trend returned. A response containing 20 trends uses 21 credits. Failed 4xx and 5xx requests use 0 credits, and the exact charge is returned in the X-Credits-Used response header.

Does the Twitter Trends API have rate limits?

Yes. Request-per-minute limits depend on the selected ScrapeBadger plan. See the pricing table for the current limits per plan tier.

Start building with the Trends API

Sign up free and get 1,000 API credits. No credit card required.

Disclaimer: ScrapeBadger is not affiliated with, endorsed by, or in any way officially connected with X Corp. (formerly Twitter, Inc.) or any of its subsidiaries or affiliates. The names Twitter, X, and related trademarks are the property of their respective owners.