Call it
curl https://api.peume.com/v1/call/instagram-api \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"resultsType": "posts",
"searchType": "hashtag",
"addParentData": false
}
}'const res = await fetch("https://api.peume.com/v1/call/instagram-api", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"resultsType": "posts",
"searchType": "hashtag",
"addParentData": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/instagram-api",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"resultsType": "posts",
"searchType": "hashtag",
"addParentData": False
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: instagram-api.
Parameters
directUrlsarrayAdd one or more Instagram URLs to scrape. The field is optional, but you need to either use this field or search query below.
resultsTypestringYou can choose to get posts, comments or details from Instagram URLs. Comments can only be scraped from post URLs.<br>❗Please note that the stories type has been deprecated. It used to return reels data, which wasn’t aligned with its purpose. Please use reels instead.
posts · comments · details · mentions · reels · stories
Example: posts
resultsLimitintegerHow many posts or comments (max 50 comments per post) you want to scrape from each Instagram URL. If you set this to 1, you will get a single post from each page.
onlyPostsNewerThanstringLimit how far back to the history the scraper should go. The date should be in YYYY-MM-DD or full ISO absolute format or in relative format e.g. 1 days, 2 months, 3 years. All time values are taken in UTC timezone
searchstringProvide a search query which will be used to search Instagram for profiles, hashtags or places.
searchTypestringWhat type of pages to search for (you can look for hashtags, profiles or places).
user · hashtag · place
Example: hashtag
searchLimitintegerHow many search results (hashtags, users or places) should be returned.
addParentDatabooleanOnly for feed items - add data source to results, i.e. for profile posts metadata is profile, for tag posts metadata is hashtag
Example: false
