Web Scraping API Instagram Target
The API uses GraphQL targets which return data in JSON.
Specific target templates listed below are available with
Advanced
plans.
You can scrapeCore
plans as well by providing page URL (it does not support parsing or target specific parameters). Both solutions can be tested in the Playground in Dashboard.Read more about
Core
solution here.
While the targets in this page use GraphQL under the hood, they are interfaced with via REST.
The following Instagram targets are available:
Target | Sync | Async | Batch | Pagination |
---|---|---|---|---|
instagram_graphql_user_posts | ✅ | ✅ | ✅ | |
instagram_graphql_profile | ✅ | ✅ | ✅ | |
instagram_graphql_post | ✅ | ✅ |
Instagram GraphQL User Posts
Returns information about a specific Instagram user.
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
target | string | ✅ | target | instagram_graphql_user_posts |
query | string | query | Instagram user profile name | nba |
cursor | string | next page string (look for end_cursor value in response) | 3547611165414990351\_1067259270 |
Pagination
When making an initial request:
{
"target": "instagram_graphql_user_posts",
"query": "nba"
}
The response will contain an end_cursor
:
{
...
"page_info": {
"end_cursor": "3547611165414990351_1067259270",
"has_next_page": true,
"has_previous_page": false,
"start_cursor": null
},
...
}
This cursor can be user to fetch the next page of results:
{
"target": "instagram_graphql_user_posts",
"query": "nba",
"cursor": "3547611165414990351_1067259270"
}
Instagram GraphQL profile
Returns information about a specific Instagram user.
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
target | string | ✅ | target | instagram_graphql_profile |
query | string | ✅ | Instagram profile name | nba |
Return value JSON:
- Basic information (name, description, follower count).
- 12 most recent posts.
Instagram GraphQL post
Returns information from a specific Instagram post.
Parameter | Type | Required | Description | Example | |
---|---|---|---|---|---|
target | string | ✅ | target | instagram_graphql_post | |
url | string | ✅ | Instagram post URL | https://www.instagram.com/p/ChYHpdAvnob |
Create callback for Instagram post
POST https://scraper-api.smartproxy.com/v2/task
Payload type: JSON
Parameter | Type | Required | Description | Examples |
---|---|---|---|---|
target | string | ✅ | target | instagram_graphql_post |
url | url | ✅ | Instagram post URL | https://www.instagram.com/p/ChYHpdAvnob |
curl -u username:password -X POST --url https://scraper-api.decodo.com/v2/task -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/p/ChYHpdAvnob/\", \"target\": \"instagram_graphql_post\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
Retrieve parsed results via callback
GET https://scraper-api.decodo.com/v2/task/{Task_ID}/results?type=parsed
Retrieve raw HTML results via callback
GET https://scraper-api.decodo.com/v2/task/{Task_ID}/results?type=raw
Support
Still can't find an answer? Want to say hi? We take pride in our 24/7 customer support. Alternatively, you can reach us via our support email at [email protected].
Updated about 24 hours ago