Get a profile's bio, stats and recent posts
curl --request POST \
--url https://api.stophy.dev/v1/instagram/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": "natgeo"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user: 'natgeo'})
};
fetch('https://api.stophy.dev/v1/instagram/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/instagram/profile"
payload = { "user": "natgeo" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"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>"
},
"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>"
]
}
],
"stats": {
"postsAnalyzed": 0,
"averageLikes": 123,
"averageComments": 123,
"engagementRate": 123,
"postsPerWeek": 123,
"lastPostAt": "2023-11-07T05:31:56Z"
}
},
"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 profile API
Call the Instagram profile API to get profile, stats and posts, as JSON or markdown. 1 credit.
POST
/
v1
/
instagram
/
profile
Get a profile's bio, stats and recent posts
curl --request POST \
--url https://api.stophy.dev/v1/instagram/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user": "natgeo"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({user: 'natgeo'})
};
fetch('https://api.stophy.dev/v1/instagram/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/instagram/profile"
payload = { "user": "natgeo" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"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>"
},
"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>"
]
}
],
"stats": {
"postsAnalyzed": 0,
"averageLikes": 123,
"averageComments": 123,
"engagementRate": 123,
"postsPerWeek": 123,
"lastPostAt": "2023-11-07T05:31:56Z"
}
},
"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.profile - Returns:
datahasprofile,stats,posts. - 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.profile({ user: "natgeo" });
console.log(result.data.profile);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.instagram.profile(user="natgeo")
print(result["data"]["profile"])
curl -X POST https://api.stophy.dev/v1/instagram/profile \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"user":"natgeo"}'
stophy instagram profile natgeo
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.