Developer API Portal
Integrate StoryGrab content feed into external applications
Authentication
The StoryGrab API uses token-based authorization. Generate an API token from your Partner Dashboard and authenticate your requests by providing the token as a Bearer credentials in the request headers:
1. List Authorized Profiles
Retrieve a list of Instagram profiles linked to your partner client. Only profiles associated with your client will be visible.
Response Example
[
{
"id": "01kty5r28x8hb5z48x9d0j3abc",
"username": "twins_on_ice",
"status": "approved"
}
]
2. Get Profile Posts
Fetch the archival feed of posts (including photos, videos, and multi-image carousels) for a specific Instagram profile. Results are returned in reverse chronological order and paginated.
URL Parameter: {username} (e.g., twins_on_ice)
Query Parameter: page (optional, defaults to 1)
Response Example
{
"current_page": 1,
"data": [
{
"id": "01kty5z12x8hb5z48x9d0j3xyz",
"external_id": "3128956272",
"shortcode": "Ct9J-f-O5xK",
"caption": "Championship details coming soon...",
"like_count": 4821,
"comment_count": 92,
"type": "carousel",
"taken_at_timestamp": 1687985400,
"media": [
{
"id": "01kty6a44x8hb5z48x9d0j3111",
"type": "image",
"image_path": "posts/twins_on_ice_1687985400_Ct9J-f-O5xK_c0.jpg",
"video_path": null,
"order": 0
},
{
"id": "01kty6a55x8hb5z48x9d0j3222",
"type": "video",
"image_path": "posts/twins_on_ice_1687985400_Ct9J-f-O5xK_c1.jpg",
"video_path": "posts/twins_on_ice_1687985400_Ct9J-f-O5xK_c1.mp4",
"order": 1
}
]
}
],
"next_page_url": "https://storygrab.net/api/v1/partner/profile/twins_on_ice/posts?page=2",
"prev_page_url": null,
"total": 128
}
Code Snippets
Fetch via JavaScript (Fetch API)
fetch('https://storygrab.net/api/v1/partner/profile/twins_on_ice/posts', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json'
}
})
.then(res => res.json())
.then(data => console.log(data));
Fetch via PHP (cURL)
$ch = curl_init('https://storygrab.net/api/v1/partner/profile/twins_on_ice/posts');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_TOKEN',
'Accept: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);