Optimizing API Usage
When you are building a production pipeline on top of the Sorsa API (scraping followers, collecting tweets, enriching profiles, verifying campaign actions), the difference between a well-architected integration and a naive one can be 10x in request volume for the same output. This guide covers the patterns and techniques that minimize wasted API calls while maximizing the data you extract from each request.Tip: Every account includes 100 free requests (no card, no expiry). That is plenty to prototype the patterns below and measure your real request volume before choosing a plan.
Principle 1: Every Tweet Response Already Contains User Data
This is the single most important efficiency insight for working with Sorsa API. Every endpoint that returns tweets (/search-tweets, /user-tweets, /list-tweets, /comments, /quotes, /mentions) embeds the complete author profile inside each tweet object.
user object inside each tweet contains the same data that a dedicated /info call would return: ID, username, display name, bio, follower count, following count, tweet count, verified status, location, creation date, profile image, and more.
What this means in practice: If you search for tweets about a topic and want to build a list of users discussing it, you do not need to make separate /info calls for each author. The user data is already in the response. Extract it directly:
/info requests in a typical workflow.
Principle 2: Use Batch Endpoints When They Exist
Sorsa provides batch variants for the most common lookup operations. Using them instead of looping through the single-item endpoint reduces your request count dramatically./info-batch Instead of Looping /info
If you need profile data for multiple accounts, do not call /info in a loop. Use /info-batch to fetch up to 100 at once:
/tweet-info-bulk Instead of Looping /tweet-info
If you have a list of tweet IDs (from an archive, a mention export, or a list of bookmarked links) and need their current engagement metrics and author data, use the bulk endpoint to hydrate up to 100 tweets in a single request:
Principle 3: Use /list-tweets Instead of Multiple /user-tweets Calls
If you are monitoring or collecting recent tweets from multiple accounts, do not poll each one individually. Add them to an X List and make a single /list-tweets request that returns the combined recent activity from all members.
Principle 4: Use /info as Your Universal Resolver
The /info endpoint accepts a username, user ID, or profile link, in any format. It returns the full profile object including the permanent User ID. This makes it the most flexible endpoint for normalizing mixed inputs.
If you receive account references in different formats and need to resolve all of them to full profiles, use /info once per account instead of calling a conversion endpoint (/username-to-id, /link-to-id) followed by a separate /info call:
/username-to-id directly instead of fetching the full profile again. See ID Conversion for conversion patterns.
Principle 5: Deduplicate in Your Database Layer
When you collect data from multiple sources (search results, follower lists, mention feeds, timeline scrapes), the same user will appear many times. Use the permanent User ID as your deduplication key and update existing records rather than inserting duplicates.Principle 6: Avoid Re-fetching Data You Already Have
When building multi-step pipelines, pass data forward between steps instead of re-fetching it. Example: Audience geography analysis. The workflow is: (1) fetch followers, (2) look up country via/about for each follower. After step 1, you already have the full profile object for every follower (bio, follower count, verified status). Do not call /info again in step 2. You only need /about for the country data that is not in the standard profile. See the Audience Geography guide for the complete workflow.
Example: Campaign verification. When verifying follow + retweet + comment for a participant, the /check-comment response includes the full tweet object of the comment (when commented: true). If you need to analyze the comment text for quality, extract it from the verification response. Do not make a separate /search-tweets or /comments call to find it again.
Example: Building a user list from search results. If you searched for tweets and collected 500 unique users from the embedded user objects, and now want to find which of them have 10K+ followers, filter the data you already collected. Do not call /info for each of the 500 users.
Quick Reference: Choosing the Right Endpoint
Estimating Your Request Budget
When planning a project, estimate your total request count before you start:
The total for a typical competitive intelligence and campaign verification workflow might be: 50 (followers) + 10,000 (geography) + 1 (bulk tweets) + 8,640 (monitoring) + 5,000 (campaign) = ~23,700 requests. At 20 req/s, that is about 20 minutes of execution time. See Pricing to estimate the cost for your plan.
Next Steps
- Rate Limits - handling 429 errors and optimizing throughput.
- Pagination - cursor-based pagination patterns for large-scale extraction.
- Pricing - understand cost per request and plan your budget.
- API Reference - full specification for
/info-batch,/tweet-info-bulk, and all Sorsa API endpoints.