Getting Started with XCROP API in 5 Minutes
Why XCROP?
XCROP is an X (formerly Twitter) data API built for crypto traders, researchers, and builders. It covers 58 endpoints, interaction verification, and credit-based pricing that's up to 50% cheaper than comparable third-party X APIs, so you get crypto social intelligence without the usual API tax
In this guide, you'll go from zero to your first API call in under 5 minutes
Step 1: Create Your Account
Head to the signup page and create your account. You'll get 10,000 free credits on the Starter plan, plenty to explore the API and test your integration
What You Get on Starter
Step 2: Generate an API Key
After logging in, open the API Keys tab in the Dashboard and click Create New Key. Your API key will look like this:
xc_live_a1b2c3d4e5f6g7h8i9j0...Store this key securely, treat it like a password. Never commit it to version control or expose it in client-side code
Environment Variables
# .env XCROP_API_KEY=xc_live_your_api_key_here
Step 3: Make Your First Request
Let's fetch an X user's profile. Here's how in cURL, JavaScript, and Python:
cURL
curl -X GET "https://xcrop.io/api/v2/users/elonmusk" \ -H "Authorization: Bearer xc_live_your_key"
JavaScript
const response = await fetch("https://xcrop.io/api/v2/users/elonmusk", { headers: { "Authorization": "Bearer " + process.env.XCROP_API_KEY } }); const result = await response.json(); console.log(result.data.name); // "Elon Musk" console.log(result.data.followers); // 200000000+
Python
import requests import os response = requests.get( "https://xcrop.io/api/v2/users/elonmusk", headers={"Authorization": "Bearer " + os.environ["XCROP_API_KEY"]} ) user = response.json()["data"] print(user["name"]) # Elon Musk print(user["followers"]) # 200000000+
Step 4: Understanding Response Structure
Every XCROP response follows a consistent format:
{ "data": { ... }, "meta": { "total": 20, "next_cursor": "abc123...", "has_next_page": true, "latency_ms": 245 } }
Pagination
For list endpoints (tweets, followers, etc.), use the next_cursor to page through results:
import requests import os url = "https://xcrop.io/api/v2/users/elonmusk/tweets" headers = {"Authorization": "Bearer " + os.environ["XCROP_API_KEY"]} all_tweets = [] cursor = None for page in range(3): # Fetch 3 pages params = {"count": 20} if cursor: params["cursor"] = cursor response = requests.get(url, headers=headers, params=params) result = response.json() all_tweets.extend(result["data"]) cursor = result["meta"].get("next_cursor") if not cursor: break print("Total tweets fetched: " + str(len(all_tweets)))
Step 5: Monitor Your Usage
Check your credit consumption in the Dashboard (Usage tab). Each response also carries headers you can use for pacing:
X-RateLimit-Remaining: requests left in the current minute windowX-Response-Time: how long the request tookX-MaxResults-Allowed: the most results one request can return (1,000 on every plan)Credit Costs at a Glance
Tips for Success
What's Next?
Now that you're set up, explore these topics:
One API for X (formerly Twitter) data: profiles, tweets, followers, search and real-time streams. Start free with 10,000 credits/month, no card required