Support needed? Reach out! πŸ“§

How to Scrape Instagram Tagged Posts

This tutorial shows how to use Instagram Tagged Posts API to scrape and crawl structured Instagram data in real-time.
Monitor brand visibility on Instagram with our tagged posts API and retrieve every post where a user or brand is tagged, including engagement data and post context.

Access Instagram Data in 3 Steps

Start crawling Instagram tagged content data. Follow these steps to extract social media data in minutes.

1

Create Your Account

Go to our registration page and make an account. It's free, no credit card, and you get credits right away to play around with.

2

Verify Your Email Address

You'll get a verification email, click the link in it. Once that's done, you can grab your API token from the dashboard.

3

Make Your First API Call

Copy the code snippet below, swap in your API key, and run it. You'll get Instagram data back as JSON within a few seconds.

Code Sample

Here's a JavaScript example to get you going. Swap out the token and you're good, works the same way in any language that can make HTTP requests. Start collecting tagged content data via our REST API!

javascript-logo JavaScript
Instagram User Tagged Posts
1 const root = 'https://ensembledata.com/apis'
2 const endpoint = '/instagram/user/tagged-posts'
3 const params = {
4   "user_id"325734299,
5   "cursor""",
6   "chunk_size""10",
7   "token""YOUR-TOKEN-HERE"
8 }
9  
10 const queryString = new URLSearchParams(params).toString();
11 const url = `${root}${endpoint}?${queryString}`;
12  
13 await fetch(url)
14   .then(response => response.json())
15   .then(data => console.log(data))
16   .catch(error => console.error(error));
17  

Parameters

user_id (integer) User ID. REQUIRED
cursor (string) Parameter to manually handle pagination. Each response contains a `nextCursor` which can be used to retrieve the next page of results by sending it as the next `cursor`. If the `nextCursor` is not present in the response, it means that there are no more results to retrieve.
chunk_size (integer) Number of posts to fetch per request.
token (string) Private token assigned to each client to access the APIs. REQUIRED

Example Response

Explore the fields returned by this endpoint. Click a row to expand nested objects and arrays, hover a value to copy it, or use "Expand all" to see everything at once.

JSON
Instagram User Tagged Posts
dataobject2 fields
postsarray1 item Β· schema from #0 1 item
nodeobject17 fields
idstring"3035227396822402922"
__typenamestring"GraphVideo"
edge_media_to_captionobject1 field
edgesarray1 item Β· schema from #0 1 item
nodeobject1 field
textstring"#Flowers 🌻🌼🌻 With the beauty @mileycyrus πŸ’‹ . . . @dianaskova_art #…"
shortcodestring"CofSzxwIgdq"
edge_media_to_commentobject1 field
countnumber13
comments_disabledbooleanfalse
taken_at_timestampnumber1676047570
dimensionsobject2 fields
heightnumber1137
widthnumber640
display_urlstring"https://instagram.fmad20-1.fna.fbcdn.net/v/t51.2885-15/329664007_11983…"
edge_liked_byobject1 field
countnumber49
edge_media_preview_likeobject1 field
countnumber70
ownerobject2 fields
idstring"9129067435"
usernamestring"dianaskova_art"
thumbnail_srcstring"https://instagram.fmad20-1.fna.fbcdn.net/v/t51.2885-15/329664007_11983…"
is_videobooleantrue
has_upcoming_eventbooleanfalse
video_view_countnumber25910
product_typestring"clips"
nextCursorstring"QVFDY2ZDeG1pY01YenVvazR0bVBkQnZhVmhES1Y3blpvU1FWc3BUQ0xEcFprejRPV1BRVl…"

Response Codes

Status codes this endpoint can return, so you can handle errors before they surprise you in production.

200SuccessSuccessful Response
422Client ErrorValidation Error
491Client ErrorToken not found
492Client ErrorEmail not verified
493Client ErrorSubscription expired
495Client ErrorAll daily units used
500Server ErrorSomething went wrong

API Pricing

#returned_posts units Cost per successful call to this endpoint.

Fetch Instagram Data at Scale

Scrape Instagram tagged post data at scale for brand monitoring, UGC campaigns, and influencer outreach research.

deco-icon

Tag Monitoring

Find every public post where a user or brand was tagged.

deco-icon

UGC Discovery

Surface user-generated content mentioning your brand organically.

deco-icon

Engagement Data

Get engagement and context for each tagged post returned.