Get any Instagram profile, post or reel from its link
curl --request POST \
--url https://api.stophy.dev/v1/instagram/url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.instagram.com/natgeo/"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.instagram.com/natgeo/'})
};
fetch('https://api.stophy.dev/v1/instagram/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/instagram/url"
payload = { "url": "https://www.instagram.com/natgeo/" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"kind": "profile",
"profile": {
"url": "<string>",
"isVerified": true,
"isPrivate": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"bio": "<string>",
"bioLinks": [
{
"url": "<string>",
"title": "<string>"
}
],
"pronouns": [
"<string>"
],
"followers": 0,
"following": 0,
"posts": 0,
"avatar": "<string>"
},
"stats": {
"postsAnalyzed": 0,
"averageLikes": 123,
"averageComments": 123,
"engagementRate": 123,
"postsPerWeek": 123,
"lastPostAt": "2023-11-07T05:31:56Z"
},
"posts": [
{
"url": "<string>",
"type": "photo",
"isPinned": true,
"isPaidPartnership": true,
"id": "<string>",
"code": "<string>",
"text": "<string>",
"hashtags": [
"<string>"
],
"mentions": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"likes": 0,
"comments": 0,
"views": 0,
"width": 0,
"height": 0,
"thumbnail": "<string>",
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
],
"videos": [
{
"url": "<string>"
}
],
"imageDescription": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"taggedUsers": [
"<string>"
],
"coauthors": [
"<string>"
],
"audio": {
"isOriginal": true,
"title": "<string>",
"artist": "<string>"
},
"sponsors": [
"<string>"
]
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Instagram
Instagram link API
Call the Instagram link API to get profile, stats, posts, post and comments, as JSON or markdown. 1 credit.
POST
/
v1
/
instagram
/
url
Get any Instagram profile, post or reel from its link
curl --request POST \
--url https://api.stophy.dev/v1/instagram/url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.instagram.com/natgeo/"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.instagram.com/natgeo/'})
};
fetch('https://api.stophy.dev/v1/instagram/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/instagram/url"
payload = { "url": "https://www.instagram.com/natgeo/" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"kind": "profile",
"profile": {
"url": "<string>",
"isVerified": true,
"isPrivate": true,
"id": "<string>",
"username": "<string>",
"name": "<string>",
"bio": "<string>",
"bioLinks": [
{
"url": "<string>",
"title": "<string>"
}
],
"pronouns": [
"<string>"
],
"followers": 0,
"following": 0,
"posts": 0,
"avatar": "<string>"
},
"stats": {
"postsAnalyzed": 0,
"averageLikes": 123,
"averageComments": 123,
"engagementRate": 123,
"postsPerWeek": 123,
"lastPostAt": "2023-11-07T05:31:56Z"
},
"posts": [
{
"url": "<string>",
"type": "photo",
"isPinned": true,
"isPaidPartnership": true,
"id": "<string>",
"code": "<string>",
"text": "<string>",
"hashtags": [
"<string>"
],
"mentions": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"likes": 0,
"comments": 0,
"views": 0,
"width": 0,
"height": 0,
"thumbnail": "<string>",
"images": [
{
"url": "<string>",
"caption": "<string>",
"alt": "<string>"
}
],
"videos": [
{
"url": "<string>"
}
],
"imageDescription": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"taggedUsers": [
"<string>"
],
"coauthors": [
"<string>"
],
"audio": {
"isOriginal": true,
"title": "<string>",
"artist": "<string>"
},
"sponsors": [
"<string>"
]
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
instagram.url - Returns:
datais one ofprofile,post.data.kindsays which. - Cost: 1 credit. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.instagram.url({ url: "https://www.instagram.com/natgeo/" });
console.log(result.data.kind);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.instagram.url(url="https://www.instagram.com/natgeo/")
print(result["data"]["kind"])
curl -X POST https://api.stophy.dev/v1/instagram/url \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"url":"https://www.instagram.com/natgeo/"}'
stophy instagram url https://www.instagram.com/natgeo/
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json