How to fetch an Instagram profile by user ID
Fetch an Instagram account's core public profile fields by numeric user ID and turn them into a review table
On this page
You have 40 numeric Instagram user IDs from a creator shortlist and need to compare each account's core public profile fields before outreach. Fetch the basic profile for each ID, then put the results into a review table that ranks the creators you want to contact first. No run has been executed for this guide. The tables below are designs, and the values in them are placeholders
Task and table design
The deliverable is one row per creator, with the fields needed to compare reach, posting volume and account status. Keep the numeric ID in the first column so each row can be traced back to the source list. Fill the priority column after you read the profile fields
| userId | handle | displayName | followers | posts | verified | private | bio | outreach priority |
|---|---|---|---|---|---|---|---|---|
| (id) | (handle) | (name) | (integer) | (integer or empty) | true or false | true or false | (bio or empty) | high, review or low |
Values here are placeholders showing the shape. The agent returns a table of this kind after it calls the tool for the 40 IDs. A row with found: false has no profile data; keep the ID and mark the row for review rather than inventing values
Input fields and the numeric ID limit
anyapi.instagram.basic_profile takes userId as a required string. The value is the account's numeric Instagram user id, not the @handle or profile URL. Passing a handle in userId returns no profile. Put that check beside the first step: confirm each of the 40 values is numeric before the agent runs
Example userId: 17841412345678901. Replace it with an id from your own shortlist
requireFields is optional. It can name bioLinks, isBusiness, posts, title or url to require those output fields. Omitting it leaves routing unchanged, with the cheapest source serving. Naming a field can raise the price when the cheapest source cannot return it, because a dearer source serves and you are quoted and charged its price. A named field can still be absent on a profile that genuinely lacks it. A combination that no single source returns together is refused as invalid input, with no charge. Agents call it through POST /v1/runs with toolId anyapi.instagram.basic_profile
Reading output fields for the outreach decision
The response has found and data. When found is true, data carries userId, handle, displayName, followers, following, bio, verified, private, externalUrl and avatarUrl. It can also carry posts, bioLinks and isBusiness; those three can be null when the serving source does not report them. Leave a null posts value empty in the table instead of treating it as zero
Use handle and displayName to identify the creator. Use followers, posts, verified, private and bio to set outreach priority. Keep the row values visible when you assign high, review or low. When found is false, reason is not_found. A found: false answer is a successful call, not an error
Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch Instagram basic profiles for the 40 numeric userId values in my creator shortlist. Check the current inputs and price of anyapi.instagram.basic_profile before running anything. Call the tool once per userId. Use the numeric userId from each row, never the @handle or profile URL. Return a table with userId, handle, displayName, followers, posts, verified, private, bio and outreach priority. Leave posts empty when the field is null. If a profile is not found, keep the userId and mark the row for review. Do not guess missing values.
Example userId: 17841412345678901. Replace it with the first id from my list; the other 39 ids follow in the list I provide.The prompt assumes your shortlist is available to the agent. If your list has handles, convert them to numeric IDs before this run; the tool cannot use a handle as userId
Estimated tool cost
Prices read through the Purrkey catalog on November 12, 2026. The unit is max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Check one profile | calls x max price | $0.0036 per call | 1 | $0.0036 |
| Screen 40 profiles | calls x max price | $0.0036 per call | 40 | $0.144 |
Model fees for the agent are not counted. The 40 profile plan uses 40 calls at up to $0.0036 each. For the account lookup workflow around this tool, see the Instagram account lookup guide
Next action
Open the anyapi.instagram.basic_profile tool page to check the current inputs and price, then run the first ID from your shortlist
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 Instagram.FAQ
How do I fetch an Instagram profile by user ID?
Call the Instagram basic profile tool with the account's numeric user id in userId. The tool returns core public profile fields such as handle, displayName, followers, posts, verified, private and bio.
What userId does the Instagram basic profile tool need?
It needs the numeric Instagram user id, the account's internal id. Do not pass the @handle or profile URL; passing a handle returns no profile.
What output fields can I use to compare Instagram creators?
Use handle and displayName to identify each row, then followers, posts, verified, private and bio to set outreach priority. posts can be null when the serving source does not report it.
What happens when an Instagram profile is not found?
The output has found set to false and reason set to the not-found value. A found false answer is a successful call, not an error.
What does requireFields do on the Instagram basic profile tool?
requireFields is optional and can name bioLinks, isBusiness, posts, title or url. Naming a field can raise the price when a dearer source is needed, and a combination that no single source returns together is refused as invalid input with no charge.
How much does it cost to fetch 40 Instagram profiles?
At up to $0.0036 per call, 40 calls cost at most $0.144. One profile costs at most $0.0036. Agent model fees are not counted.
Can I pass an Instagram handle instead of a numeric user ID?
No. The userId input must be the numeric Instagram user id. Passing a handle returns no profile.
Next step
Try this with Instagram
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.