Get Instagram User Posts by Username or ID
View all Instagram Data API endpoints →Fetch the recent post feed of a public Instagram account. Pass username_or_id; leave pagination_token empty on the first request and pass the returned top-level pagination_token to continue. The live-verified response contains data.count, data.items[] and a data.user summary of the author (id, username, full_name, is_verified, is_private, profile_pic_url). Each item exposes id, code (the shortcode), taken_at (Unix seconds), caption.text with extracted hashtags and mentions, media_type (1=photo, 2=video, 8=carousel), like_count, comment_count, play_count on videos, plus image_versions2 / video_versions media URLs and carousel_media for albums. A call for instagram returned 12 recent posts, all owned by the account, with current timestamps. Treat page size as observed behavior rather than a contract, and deduplicate by media id when merging pages.
API Features
Live API Demo
🔒 Sign in to try it live
Log in to call this API with your own API key. New accounts get 100 free credits — no card required.
Log in / Sign upNo active API key found. Create one in your Dashboard, then reload this page. Dashboard →
/api/project/instagram/user-posts API Response (JSON)
{} curl -X GET 'https://api.opendata-api.com/api/project/instagram/user-posts?key=<API_KEY>&username_or_id=instagram'
Query Result
Use Cases
- Ingest a creator's recent posts into a research pipeline with collection timestamps and id deduplication.
- Compare posting cadence and like/comment snapshots across shortlisted creators — computed client-side, not official Insights.
- Resolve fresh shortcodes from the feed for post detail enrichment and URL building.
- Monitor a brand account's feed for new campaign posts in scheduled collection windows.
Frequently asked questions
How do I fetch an Instagram user's posts in Python and page through them?
Pass only username_or_id on the first request, then send back the top-level pagination_token from each response unchanged until the response no longer returns a token. A simple requests loop is enough — dedupe by media id.
How do I deduplicate when Instagram post pagination returns repeats?
Deduplicate on each post's numeric media id. Overlap between adjacent collection windows is expected, so do not judge duplicates by timestamp or caption text.