REST API
The Feedframer REST API provides a simple way to access your Instagram posts via HTTP. The API returns Instagram account information along with posts in a clean, developer-friendly format.
Base URL
https://feedframer.com/api/v1
Authentication
All API requests require authentication using your API key. Pass your API key as a query parameter:
?api_key=YOUR_API_KEY
See Authentication for details.
Endpoints
Get Account and Posts
Retrieve Instagram account information and posts for the authenticated user.
GET /api/v1/me
Parameters
| Parameter | Type | Description |
|---|---|---|
api_key |
string | Required. Your API key |
filter[type] |
string | Filter by post type: IMAGE, VIDEO, CAROUSEL_ALBUM, or REELS |
filter[publishedAfter] |
string | Filter posts published after this date (ISO 8601 format) |
filter[publishedBefore] |
string | Filter posts published before this date (ISO 8601 format) |
page[size] |
integer | Number of results per page (1-100, default: 12) |
page[cursor] |
string | Cursor for pagination (returned in response) |
sort |
string | Sort results. Prefix with - for descending. Options: published_at, id |
include |
array | Include optional data: children, comments |
format |
string | Premium only. Image format for responsive images: jpg or webp (default: jpg) |
Example Request
curl 'https://feedframer.com/api/v1/me?api_key=YOUR_API_KEY&filter[type]=IMAGE&sort=-published_at&page[size]=12'
Example Response
{
"username": "your_username",
"name": "Your Name",
"biography": "Your bio text",
"website": "https://example.com",
"profilePictureUrl": "https://scontent.cdninstagram.com/...",
"followersCount": 1234,
"followsCount": 567,
"mediaCount": 89,
"posts": [
{
"id": "18123456789012345",
"caption": "Beautiful sunset over the ocean 🌅 #photography #nature",
"altText": "Sunset over the ocean",
"mediaType": "IMAGE",
"mediaUrl": "https://scontent.cdninstagram.com/...",
"thumbnailUrl": null,
"sizes": {
"320": "https://cdn.feedframer.com/cdn-cgi/image/width=320,format=jpg/your_username/123_media.jpg",
"768": "https://cdn.feedframer.com/cdn-cgi/image/width=768,format=jpg/your_username/123_media.jpg",
"960": "https://cdn.feedframer.com/cdn-cgi/image/width=960,format=jpg/your_username/123_media.jpg",
"1200": "https://cdn.feedframer.com/cdn-cgi/image/width=1200,format=jpg/your_username/123_media.jpg"
},
"permalink": "https://www.instagram.com/p/ABC123/",
"timestamp": "2024-01-15T18:30:00+00:00",
"likeCount": 1542,
"commentsCount": 87
}
],
"pagination": {
"nextCursor": "eyJpZCI6MTJ9",
"prevCursor": null,
"hasMore": true,
"perPage": 12
}
}
Response Structure
The response includes Instagram account information at the root level with posts nested in a posts array.
Account Fields
| Field | Type | Description |
|---|---|---|
username |
string | Instagram username |
name |
string|null | Display name |
biography |
string|null | Bio text |
website |
string|null | Website URL |
profilePictureUrl |
string|null | Profile picture URL |
followersCount |
integer|null | Number of followers |
followsCount |
integer|null | Number of accounts followed |
mediaCount |
integer|null | Total media count |
Post Fields
Each post in the posts array contains:
| Field | Type | Description |
|---|---|---|
id |
string | Instagram's unique ID for the post |
caption |
string|null | Post caption text (may include hashtags and mentions) |
altText |
string|null | Alt text for the post (currently not provided by Instagram API) |
mediaType |
string | Post type: IMAGE, VIDEO, CAROUSEL_ALBUM, or REELS |
mediaUrl |
string | URL to the main media file (image or video) |
thumbnailUrl |
string|null | URL to video thumbnail (null for images) |
sizes |
object|null | Premium only. Responsive image URLs at different sizes (320px, 768px, 960px, 1200px). Uses thumbnail for videos. |
permalink |
string | Public Instagram URL to view the post |
timestamp |
string | ISO 8601 timestamp when posted to Instagram |
likeCount |
integer|null | Number of likes on the post |
commentsCount |
integer|null | Number of comments on the post |
Pagination Fields
| Field | Type | Description |
|---|---|---|
nextCursor |
string|null | Cursor for the next page (null if on last page) |
prevCursor |
string|null | Cursor for the previous page (null if on first page) |
hasMore |
boolean | Whether there are more results available |
perPage |
integer | Number of results per page |
Filtering
Filter by Post Type
Retrieve only posts of a specific type:
# Images only
GET /api/v1/me?api_key=YOUR_API_KEY&filter[type]=IMAGE
# Videos only
GET /api/v1/me?api_key=YOUR_API_KEY&filter[type]=VIDEO
# Carousel posts only
GET /api/v1/me?api_key=YOUR_API_KEY&filter[type]=CAROUSEL_ALBUM
# Reels only
GET /api/v1/me?api_key=YOUR_API_KEY&filter[type]=REELS
Filter by Date Range
Retrieve posts within a specific date range:
# Posts from 2024 only
GET /api/v1/me?api_key=YOUR_API_KEY&filter[publishedAfter]=2024-01-01&filter[publishedBefore]=2024-12-31
# Posts from the last 30 days
GET /api/v1/me?api_key=YOUR_API_KEY&filter[publishedAfter]=2024-01-01
Combine Filters
Filters can be combined:
# Image posts from January 2024
GET /api/v1/me?api_key=YOUR_API_KEY&filter[type]=IMAGE&filter[publishedAfter]=2024-01-01&filter[publishedBefore]=2024-01-31
Sorting
Sort by Published Date
# Newest first (default)
GET /api/v1/me?api_key=YOUR_API_KEY&sort=-published_at
# Oldest first
GET /api/v1/me?api_key=YOUR_API_KEY&sort=published_at
Sort by ID
# Highest ID first
GET /api/v1/me?api_key=YOUR_API_KEY&sort=-id
# Lowest ID first
GET /api/v1/me?api_key=YOUR_API_KEY&sort=id
Pagination
The API uses cursor-based pagination for efficient navigation through results.
Page Size
Specify the number of posts to return (1-100, default 12):
GET /api/v1/me?api_key=YOUR_API_KEY&page[size]=50
Navigating Pages
Use the page[cursor] parameter with the cursor value from the previous response:
# First page
GET /api/v1/me?api_key=YOUR_API_KEY&page[size]=12
# Next page (using nextCursor from previous response)
GET /api/v1/me?api_key=YOUR_API_KEY&page[size]=12&page[cursor]=eyJpZCI6MTJ9
# Previous page (using prevCursor)
GET /api/v1/me?api_key=YOUR_API_KEY&page[size]=12&page[cursor]=eyJpZCI6MX0
Pagination Example
let cursor = null;
let allPosts = [];
do {
const url = cursor
? `https://feedframer.com/api/v1/me?api_key=${apiKey}&page[cursor]=${cursor}`
: `https://feedframer.com/api/v1/me?api_key=${apiKey}`;
const response = await fetch(url);
const data = await response.json();
allPosts = allPosts.concat(data.posts);
cursor = data.pagination.hasMore ? data.pagination.nextCursor : null;
} while (cursor !== null);
Responsive Images (Premium)
Premium users receive optimized responsive image URLs via Cloudflare CDN. The sizes object contains URLs for 4 different image widths (320px, 768px, 960px, 1200px), perfect for responsive design.
Image Format
Control the output format using the format parameter:
# JPEG format (default)
GET /api/v1/me?api_key=YOUR_API_KEY&format=jpg
# WebP format (smaller file sizes, better compression)
GET /api/v1/me?api_key=YOUR_API_KEY&format=webp
Example Response (Premium)
{
"posts": [
{
"id": "18123456789012345",
"mediaType": "IMAGE",
"mediaUrl": "https://cdn.feedframer.com/your_username/123_media.jpg",
"sizes": {
"320": "https://cdn.feedframer.com/cdn-cgi/image/width=320,format=jpg/your_username/123_media.jpg",
"768": "https://cdn.feedframer.com/cdn-cgi/image/width=768,format=jpg/your_username/123_media.jpg",
"960": "https://cdn.feedframer.com/cdn-cgi/image/width=960,format=jpg/your_username/123_media.jpg",
"1200": "https://cdn.feedframer.com/cdn-cgi/image/width=1200,format=jpg/your_username/123_media.jpg"
}
}
]
}
Usage in HTML
<img
src="{{ post.mediaUrl }}"
srcset="
{{ post.sizes.320 }} 320w,
{{ post.sizes.768 }} 768w,
{{ post.sizes.960 }} 960w,
{{ post.sizes.1200 }} 1200w
"
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
alt="{{ post.altText || post.caption }}"
/>
Note: For video posts, the responsive URLs use the thumbnail image. Free tier users will not receive the sizes object.
Rate Limiting
There are no rate limits! Both free and premium tiers include unlimited API requests. You can make as many requests as you need.
We rely on Cloudflare edge caching (1-hour TTL) for performance and protection, which means your frequently accessed data is served instantly from edge locations worldwide.
Error Responses
Errors return a simple error format:
{
"error": "Validation error",
"message": "The page.size must be between 1 and 100."
}
Common HTTP status codes:
| Status | Description |
|---|---|
200 |
Success |
401 |
Missing or invalid API key |
422 |
Validation error (invalid parameters) |
429 |
Rate limit exceeded |
See Error Handling for details.
Examples
Get Latest 10 Posts
curl 'https://feedframer.com/api/v1/me?api_key=YOUR_API_KEY&page[size]=10&sort=-published_at'
Get All Image Posts
curl 'https://feedframer.com/api/v1/me?api_key=YOUR_API_KEY&filter[type]=IMAGE'
Get Posts from Last Week
curl 'https://feedframer.com/api/v1/me?api_key=YOUR_API_KEY&filter[publishedAfter]=2024-01-08'
Code Examples
For complete integration examples, see: