Skip to main content

SDKs & Libraries

Official and community client libraries for the XCROP API — get started in minutes.

Get Started

Installation & Quick Start

Pick your language and install the official client library.

JS
JavaScript / TypeScriptOfficial
GitHub ↗
Install
npm install github:xcrop-io/xcrop-js
javascript
import { XCrop } from '@xcrop/sdk'

const client = new XCrop({ apiKey: 'xc_your_key' })

// Get user profile
const user = await client.users.get('elonmusk')
console.log(user.data.followers_count)

// Search tweets
const results = await client.search.tweets({
  query: 'bitcoin',
  count: 50,
})

// Auto-paginate through all followers
for await (const user of client.paginate.userFollowers('elonmusk')) {
  console.log(user.username)
}
PY
PythonOfficial
GitHub ↗
Install
pip install git+https://github.com/xcrop-io/xcrop-python.git
python
from xcrop import XCropClient

client = XCropClient(api_key="xc_your_key")

# Get user profile
user = client.users.get("elonmusk")
print(user["data"]["followers_count"])

# Search tweets
results = client.search.tweets(
    query="bitcoin",
    count=50,
)

# Async support
import asyncio
from xcrop import AsyncXCropClient

async def main():
    async with AsyncXCropClient(api_key="xc_your_key") as client:
        user = await client.users.get("elonmusk")

asyncio.run(main())
GO
GoOfficial
GitHub ↗
Install
go get github.com/xcrop-io/xcrop-go
go
package main

import (
    "context"
    "fmt"
    "github.com/xcrop-io/xcrop-go"
)

func main() {
    client := xcrop.NewClient("xc_your_key")
    ctx := context.Background()

    user, err := client.Users.Get(ctx, "elonmusk")
    if err != nil {
        panic(err)
    }
    fmt.Println(user.FollowersCount)
}
SH
cURLREST
bash
# Get user profile
curl -H "Authorization: Bearer xc_your_key" \
  "https://xcrop.io/api/v2/users/elonmusk"

# Search tweets
curl -X POST -H "Authorization: Bearer xc_your_key" \
  -H "Content-Type: application/json" \
  -d '{"query":"bitcoin","count":50}' \
  "https://xcrop.io/api/v2/search"
Compare

Features Comparison

What each SDK handles for you out of the box.

FeatureJavaScriptPythonGocURL
Auto-paginationYesYesYesNo
Batch operationsYesYesYesNo
Rate limit handlingAutoAutoAutoManual
TypeScript typesYesHintsNoNo
Async/awaitYesYesGoroutinesNo
Retry on failureYesYesYesNo
Security

Authentication

All SDKs authenticate using your API key. Pass it during client initialization.

  • Get your API key from the Dashboard
  • Keys start with xc_ prefix
  • Never expose keys in client-side code or public repos
  • Use environment variables: XCROP_API_KEY
env
# .env
XCROP_API_KEY=xc_your_api_key_here
Resources

Resources & Links

Source code, issues and the full API reference.

xcrop-js
Official JavaScript / TypeScript SDK
xcrop-python
Official Python SDK
xcrop-go
Official Go SDK
API Documentation
39 endpoints — full REST API reference with examples