How to fetch an X profile by handle
Fetch a public X profile by handle and get bio, follower counts, verification, and account metadata
On this page
You have a 25-handle X creator shortlist for a partnerships review and need one public profile snapshot per account. The tool is anyapi.twitter.profile, called through POST /v1/runs with toolId anyapi.twitter.profile. The worksheet below is the deliverable: one row per handle, with the profile fields that drive an outreach decision. No run has been executed for this guide, so the table is a design, not a result
Example input and worksheet design
The input object lists handle as required
| Handle | Found | Reason | Display name | Bio | Followers | Following | Tweets | Verified | Private | Location | Website | Media count | Created UTC |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| acme_labs | true | (empty) | (text or empty) | (text or empty) | (number or empty) | (number or empty) | (number or empty) | true or false | true or false | (text or empty) | (text or empty) | (number or empty) | (number or empty) |
Values here are placeholders showing the shape. The createdUtc column is a UTC epoch timestamp in seconds; multiply by 1000 for a JS Date in milliseconds. Use the same columns for the 25-handle shortlist
Step 1: supply the handle without the @
anyapi.twitter.profile takes handle as a string. The contract says the handle should be supplied without an @ at the start
Limit: handle must be supplied without an @ at the start
Harvest handles from the profile URL or account reference in your shortlist. A handle is not a display name; use the text after the profile URL slash, without the @
Step 2: read found, reason and data
The output has found, data and reason. found is the first field to read. When found is true, read the profile from data. When found is false, data is null and reason says why
reason is present only when found is false. The enum has two values: not_found means the source states the target does not exist, or returned nothing for it; suspended means the platform has suspended the account. A found: false answer is a successful call, not an error
The tool cannot return profile fields for a missing or suspended account; data is null. For a partnerships shortlist, compare data.followers and data.following for audience scale, data.tweets and data.mediaCount for posting volume, and data.verified and data.private for account status. Read data.bio, data.location and data.website as profile signals. data.displayName gives the public name; data.handle gives the account handle. data.createdUtc is the account creation time in UTC epoch seconds. data.id is the numeric X user id as a string. data.avatarUrl, data.coverUrl and data.pinnedPostIds are also in the contract if your worksheet needs them
If data is present, the contract requires handle, displayName, followers, following, tweets, bio, verified, avatarUrl and website. Fields outside that required list can be absent; leave them empty in the table
Step 3: build the comparison table
The deliverable table has one row per handle. Put the requested handle in the first column, then the fields from data that matter for the outreach decision: displayName, bio, followers, following, tweets, verified, private, location, website, mediaCount and createdUtc
For a found: false row, leave the profile fields empty and put not_found or suspended in the reason column. Do not invent a display name or follower count. The row still counts as a call
A table with 25 rows is enough for a first pass. Sort by data.followers if audience size is the first screen, then use data.verified, data.website and data.bio as tie-breakers. Keep the raw handle string so you can trace each row back to the shortlist
For a follower export workflow, the companion guide is at https://purrkey.app/blog/export-account-followers-list
The agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch one public X profile for each handle in a 25-handle creator shortlist. Check the current inputs and price of anyapi.twitter.profile before running anything. Call anyapi.twitter.profile once per handle, with handle supplied without an @ at the start. Return a table with handle, displayName, bio, followers, following, tweets, verified, private, location, website, mediaCount and createdUtc, plus found and reason when a profile is missing. Do not guess profiles.
Example handle: acme_labs
Replace this example with your 25 handles.The prompt returns a table, not a narrative. If a handle comes back with found: false, the agent should keep the row and show reason
Estimated tool cost
Prices from the Purrkey catalog, read November 13, 2026. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The table below shows ceilings; model fees for the agent are not counted
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single profile | calls x max price | up to $0.0012 per call | 1 | up to $0.0012 |
| 25-handle shortlist | calls x max price | up to $0.0012 per call | 25 | up to $0.03 |
The 25-handle plan assumes one call per handle. A found: false answer is a successful call, not an error, so a missing profile still sits inside the planned quantity. The single-profile row is one call at the ceiling
Next action
Open https://purrkey.app/tools/twitter?q=profile to run the first profile or the 25-handle batch
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with X (Twitter).FAQ
How do I fetch an X profile by handle?
Call anyapi.twitter.profile with handle supplied without an @ at the start. Read data when found is true, and read reason when found is false.
What input does anyapi.twitter.profile take?
handle is required. The contract says to supply the Twitter/X handle without an @ at the start, and it maps username to handle as an alias.
What does found false mean for an X profile lookup?
found: false means data is null and reason is not_found or suspended. The contract calls a found: false answer a successful call, not an error.
Which fields should I compare in a creator shortlist?
Use data.followers, data.following, data.tweets, data.verified, data.private, data.bio, data.location, data.website, data.mediaCount and data.createdUtc. data.createdUtc is UTC epoch seconds, so multiply by 1000 for a JS Date in milliseconds.
How much does it cost to fetch 25 X profiles?
At up to $0.0012 per call, 25 calls are at most $0.03. One profile is at most $0.0012, and agent model fees are not counted.
Can I include the @ in the handle input?
No. The contract says handle is the Twitter/X handle without an @ at the start, so strip the @ before the call.
What happens when an X account is suspended?
The response has found: false, data is null, and reason is suspended. The contract treats that answer as a successful call, not an error.
Next step
Try this with X (Twitter)
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.