Targets
The instagram_post
, instagram_profile
, and instagram_reel
targets allow you to scrape Instagram's HTML and receive data parsed in JSON.
The instagram_graphql_post
, instagram_graphql_profile
, instagram_graphql_reel
, and instagram_graphql_hashtag
target allows you to scrape Instagram's GraphQL API endpoint and receive data parsed in JSON.
Instagram profile
API Link: https://scraper-api.smartproxy.com/v1/scrape
POST /scrape
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/nba)
target
(in this example, instagram_profile)
Parameter | Type | Description |
---|---|---|
url | url | Instagram profile URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |
curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/scrape -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/nba\", \"target\": \"instagram_profile\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/nba',
'target': 'instagram_profile',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/scrape',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/nba',
'target' => 'instagram_profile',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/scrape');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Instagram GraphQL profile
API Link: https://scraper-api.smartproxy.com/v1/scrape
POST /scrape
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/nba)
target
(in this example, instagram_graphql_profile)
Parameter | Type | Description |
---|---|---|
url | url | Instagram profile URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |
curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/scrape -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/nba\", \"target\": \"instagram_graphql_profile\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/nba',
'target': 'instagram_graphql_profile',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/scrape',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/nba',
'target' => 'instagram_graphql_profile',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/scrape');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Instagram post
API Link: https://scraper-api.smartproxy.com/v1/scrape
POST /scrape
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/p/ChYHpdAvnob/)
target
(in this example, instagram_post)
Parameter | Type | Description |
---|---|---|
url | url | Instagram post URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |
curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/scrape -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/p/ChYHpdAvnob/\", \"target\": \"instagram_post\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/p/ChYHpdAvnob/',
'target': 'instagram_post',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/scrape',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/p/ChYHpdAvnob/',
'target' => 'instagram_post',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/scrape');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Instagram GraphQL post
API Link: https://scraper-api.smartproxy.com/v1/scrape
POST /scrape
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/p/ChYHpdAvnob/)
target
(in this example, instagram_graphql_post)
Parameter | Type | Description |
---|---|---|
url | url | Instagram post URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |
curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/scrape -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/p/ChYHpdAvnob/\", \"target\": \"instagram_graphql_post\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/p/ChYHpdAvnob/',
'target': 'instagram_graphql_post',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/scrape',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/p/ChYHpdAvnob/',
'target' => 'instagram_graphql_post',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/scrape');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Instagram reel
API Link: https://scraper-api.smartproxy.com/v1/scrape
POST /scrape
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/reel/ClfPAdQgqTc/)
target
(in this example, instagram_reel)
Parameter | Type | Description |
---|---|---|
url | url | Instagram reel URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |
curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/scrape -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/reel/ClfPAdQgqTc/\", \"target\": \"instagram_reel\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/reel/ClfPAdQgqTc/',
'target': 'instagram_reel',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/scrape',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/reel/ClfPAdQgqTc/',
'target' => 'instagram_reel',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/scrape');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Instagram GraphQL reel
API Link: https://scraper-api.smartproxy.com/v1/scrape
POST /scrape
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/reel/ClfPAdQgqTc/)
target
(in this example, instagram_graphql_reel)
Parameter | Type | Description |
---|---|---|
url | url | Instagram reel URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |
curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/scrape -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/reel/ClfPAdQgqTc/\", \"target\": \"instagram_graphql_reel\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/reel/ClfPAdQgqTc/',
'target': 'instagram_graphql_reel',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/scrape',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/reel/ClfPAdQgqTc/',
'target' => 'instagram_graphql_reel',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/scrape');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Instagram GraphQL hashtag
API Link: https://scraper-api.smartproxy.com/v1/scrape
POST /scrape
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/explore/tags/nba/)
target
(in this example, instagram_graphql_hashtag)
Parameter | Type | Description |
---|---|---|
url | url | Instagram hashtag URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |
curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/scrape -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/explore/tags/nba/\", \"target\": \"instagram_graphql_hashtag\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/explore/tags/nba/',
'target': 'instagram_graphql_hashtag',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/scrape',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/explore/tags/nba/',
'target' => 'instagram_graphql_hashtag',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/scrape');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Create callback for Instagram post
API Link: https://scraper-api.smartproxy.com/v1/task
POST /task
Payload type: JSON
Required parameters:
url
(in this example, https://www.instagram.com/p/ChYHpdAvnob/)
target
(in this example, instagram_post)
Parameter | Type | Description |
---|---|---|
url | url | Instagram post URL |
target | string | target |
locale | string | language locale |
geo | string | geolocation |

curl -u username:password -X POST --url https://scraper-api.smartproxy.com/v1/task -H "Content-Type: application/json" -d "{\"url\": \"https://www.instagram.com/p/ChYHpdAvnob/\", \"target\": \"instagram_post\",\"locale\": \"en-us\",\"geo\": \"United States\" }"
import requests
headers = {
'Content-Type': 'application/json'
}
task_params = {
'url': 'https://www.instagram.com/p/ChYHpdAvnob/',
'target': 'instagram_post',
'locale': 'en-us',
'geo': 'United States'
}
username = 'username'
password = 'password'
response = requests.post(
'https://scraper-api.smartproxy.com/v1/task',
headers = headers,
json = task_params,
auth = (username, password)
)
print(response.text)
<?php
$params = array(
'url' => 'https://www.instagram.com/p/ChYHpdAvnob/',
'target' => 'instagram_post',
'locale' => 'en-us',
'geo' => 'United States'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v1/task');
curl_setopt($ch, CURLOPT_USERPWD, 'username' . ':' . 'password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
echo $result;
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
?>
Retrieve parsed results via callback
API Link: https://scraper-api.smartproxy.com/v1/task/{Task_ID}/results?type=parsed
GET /task/{{Task ID}}/results?type=parsed
Retrieve raw HTML results via callback
API Link: https://scraper-api.smartproxy.com/v1/task/{Task_ID}/results?type=raw
GET /task/{{Task ID}}/results?type=raw
Updated 7 days ago