Skip to main content

Quickstart: Make Your First Sorsa API Call in Under a Minute

Get your Sorsa API key and send your first request to the X (Twitter) API in under five minutes. This guide walks you through account creation, authentication, and your first GET and POST requests with working code examples in cURL, Python, and JavaScript.

Step 1: Get your API key

  1. Open the Sorsa Dashboard.
  2. Click Sign in and register using any available option. Sorsa does not require additional personal information beyond what your auth provider shares.
  3. Choose a plan (10k, 100k, or 500k requests) and billing cycle (monthly or yearly).
  4. Select a payment method (crypto or card) and complete the payment.
Once confirmed, your dashboard will show your API key and remaining request quota.
Keep your API key private. Never expose it in frontend code, public repositories, or client-side JavaScript. Treat it like a password.

Step 2: Understand the basics

Before making requests, here are the three things you need to know: Base URL
https://api.sorsa.io/v3
Authentication Every request must include your API key in the ApiKey header:
ApiKey: your_api_key_here
Response format All endpoints return JSON. Successful responses return HTTP 200.

Step 3: Send your first GET request

The simplest way to test your setup is to fetch a user profile with the /info endpoint. cURL
curl --request GET \
  --url 'https://api.sorsa.io/v3/info?username=elonmusk' \
  --header 'ApiKey: YOUR_API_KEY'
Python
import requests

response = requests.get(
    "https://api.sorsa.io/v3/info",
    params={"username": "elonmusk"},
    headers={"ApiKey": "YOUR_API_KEY"}
)

data = response.json()
print(data["display_name"])  # Elon Musk
print(data["followers_count"])  # 236021252
JavaScript
const response = await fetch(
  "https://api.sorsa.io/v3/info?username=elonmusk",
  { headers: { "ApiKey": "YOUR_API_KEY" } }
);

const data = await response.json();
console.log(data.display_name);  // Elon Musk
console.log(data.followers_count);  // 236021252
Example response
{
  "id": "44196397",
  "username": "elonmusk",
  "display_name": "Elon Musk",
  "description": "",
  "followers_count": 236021252,
  "followings_count": 1292,
  "created_at": "Tue Jun 02 20:12:29 +0000 2009",
  "tweets_count": 98479,
  "verified": true,
  "protected": false,
  "profile_image_url": "https://pbs.twimg.com/profile_images/..._normal.jpg",
  "favourites_count": 214650,
  "media_count": 4374,
  "pinned_tweet_ids": ["2028500984977330453"],
  "location": ""
}
If you see a JSON response with user data, your API key is working and you are ready to go.

Step 4: Send your first POST request

Most Sorsa endpoints that involve tweets and search use POST with a JSON body. Here is how to search for recent tweets using /search-tweets: cURL
curl --request POST \
  --url 'https://api.sorsa.io/v3/search-tweets' \
  --header 'ApiKey: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "bitcoin"
  }'
Python
import requests

response = requests.post(
    "https://api.sorsa.io/v3/search-tweets",
    headers={"ApiKey": "YOUR_API_KEY"},
    json={"query": "bitcoin"}
)

tweets = response.json()
for tweet in tweets.get("tweets", []):
    print(tweet["full_text"])
JavaScript
const response = await fetch("https://api.sorsa.io/v3/search-tweets", {
  method: "POST",
  headers: {
    "ApiKey": "YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ query: "bitcoin" })
});

const data = await response.json();
data.tweets?.forEach(tweet => console.log(tweet.full_text));

Step 5: Check your API usage

You can check how many requests you have remaining at any time:
curl --request GET \
  --url 'https://api.sorsa.io/v3/key-usage-info' \
  --header 'ApiKey: YOUR_API_KEY'
This returns your plan limits, current usage, and remaining quota. It is a good practice to call this before running large batch operations. You can also view your usage history in the Dashboard.

Common error codes

CodeMeaningWhat to do
200SuccessRequest completed
400Bad requestCheck your parameters and request body
403UnauthorizedVerify your API key is correct and active
404Not foundCheck the endpoint URL or the resource ID
429Too many requestsYou have hit the rate limit - wait and retry
500Server errorRetry after a short delay; contact support if it persists
For a full breakdown of error types and handling strategies, see the Error Codes Reference.

Try it without code

You can also explore the API directly in the browser using our Interactive API Docs or the API Playground - no setup required. Both tools let you test endpoints, view response schemas, and experiment with parameters before writing any code.

Next steps