Get a post or reel, with its comments
curl --request POST \
--url https://api.stophy.dev/v1/instagram/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"post": "<string>",
"includeComments": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({post: '<string>', includeComments: true})
};
fetch('https://api.stophy.dev/v1/instagram/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/instagram/post"
payload = {
"post": "<string>",
"includeComments": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"post": {
"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>"
]
},
"comments": [
{
"url": "<string>",
"likes": 0,
"replies": 0,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"text": "<string>",
"createdAt": "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 post API
Call the Instagram post API to get post and comments, as JSON or markdown. 1 credit.
POST
/
v1
/
instagram
/
post
Get a post or reel, with its comments
curl --request POST \
--url https://api.stophy.dev/v1/instagram/post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"post": "<string>",
"includeComments": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({post: '<string>', includeComments: true})
};
fetch('https://api.stophy.dev/v1/instagram/post', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/instagram/post"
payload = {
"post": "<string>",
"includeComments": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"post": {
"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>"
]
},
"comments": [
{
"url": "<string>",
"likes": 0,
"replies": 0,
"id": "<string>",
"author": {
"id": "<string>",
"username": "<string>",
"name": "<string>",
"url": "<string>",
"avatar": "<string>",
"isVerified": true
},
"text": "<string>",
"createdAt": "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.post - Returns:
datahaspost,comments. - 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.post({ post: "https://www.instagram.com/p/C1a2B3cD4eF/" });
console.log(result.data.post);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.instagram.post(post="https://www.instagram.com/p/C1a2B3cD4eF/")
print(result["data"]["post"])
curl -X POST https://api.stophy.dev/v1/instagram/post \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"post":"https://www.instagram.com/p/C1a2B3cD4eF/"}'
stophy instagram post https://www.instagram.com/p/C1a2B3cD4eF/
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.