You need to pull reliable Instagram profile details fast—username, verification, follower counts, privacy status—so you can enrich user records, power a signup flow, or validate creators. By the end of this guide, you’ll fetch profile data in one request and know how to grab post, reel, and highlight details when you need them—all through the same API key on Zyla API Hub.
What this API gives you
The Instagram Profile And Media Data API returns profile metadata (id, username, avatar URL, follower and following counts, verification and privacy flags, total posts) and lets you fetch media details for posts, reels, and highlight stories. Teams use it to:
- Validate creators and partners during onboarding.
- Enrich CRM records with follower counts and verification state.
- Resolve a post or reel URL to stats and author info for campaign tracking.
- Build content pickers and download pipelines for highlight stories.
Everything runs through Zyla API Hub with a single subscription and key. You can also call these endpoints from AI coding agents using the MCP endpoint.
Getting started on Zyla API Hub
Open the API page, subscribe, and grab your key. The first API on a new account typically offers a 7-day trial or 50 requests; check the API page for current access options and pricing. Authentication is via the HTTP header Authorization: Bearer YOUR_API_KEY. Billing is subscription + quota, not pay-per-call.
Start 7-day trial on Instagram Profile And Media Data API
Endpoint: Get Profile Details
Use this when you need the core identity and public stats for an Instagram user. It returns id, username, avatar URL, biography, category, follower/following counts, privacy and verification flags, total posts, and more where available.
- Method: GET
- URL: https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23416/get-profile-details
- Required parameter: username (string)
- Auth: Authorization: Bearer YOUR_API_KEY
cURL you can paste
curl -s -X GET "https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23416/get-profile-details?username=a92_mm" \
-H "Authorization: Bearer YOUR_API_KEY"
Official example response
{
"data": {
"id": "8640409651",
"username": "a92_mm",
"fullName": "",
"avatarUrl": "https://scontent-sea5-1.cdninstagram.com/v/t51.2885-19/117330532_764310710994941_3178952573818498232_n.jpg?_nc_cat=105&ig_cache_key=GGRS-gb9R230IrcCALjsQ_iF6B0sbkULAAAB0j-ccb7-5&ccb=7-5&_nc_sid=669407&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLnd3dy42NTYuQzMifQ%3D%3D&_nc_ohc=UhqRB5XucjcQ7kNvwHzZrZa&_nc_oc=AdqQKMjA1CNJE2cZFGaOKLPAekcrEXjIih5fmtbyZIyBJ-ZZBqfAyZouTn139aCO8yM&_nc_zt=24&_nc_ht=scontent-sea5-1.cdninstagram.com&_nc_ss=7b62e&oh=00_AQSK1vbEqHI8iXnKTfwnP4mNcPHclgCyRAq7u5j4Lij_Pg&oe=6AE96358",
"biography": "",
"category": "",
"bioLinks": [],
"linkedFacebookInfo": null,
"followerCount": 5,
"followingCount": 34,
"isPrivateAccount": true,
"isVerified": false,
"totalPosts": 9
}
}
Field notes you’ll actually use:
- id: Stable account identifier.
- username: Current handle (can change; store both id and username).
- avatarUrl: Direct CDN link for rendering.
- followerCount, followingCount: Integers for growth tracking.
- isPrivateAccount: If true, posts aren’t accessible without permission; plan your UI accordingly.
- isVerified: Badge check for creator validation.
- totalPosts: High-level activity signal.
Python example (requests)
import os
import requests
API_KEY = os.getenv("ZYLA_API_KEY", "YOUR_API_KEY")
url = "https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23416/get-profile-details"
params = {"username": "a92_mm"}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(url, headers=headers, params=params, timeout=20)
resp.raise_for_status()
data = resp.json()["data"]
print("ID:", data["id"])
print("Username:", data["username"])
print("Verified:", data["isVerified"])
print("Private:", data["isPrivateAccount"])
print("Followers:", data["followerCount"])
print("Following:", data["followingCount"])
print("Total posts:", data["totalPosts"])
print("Avatar URL:", data["avatarUrl"])
Other useful endpoints for profile-driven workflows
Once you have a user’s profile, you’ll often need to drill into specific media. These endpoints help you fetch detail pages for individual posts, reels, or highlight stories. All use the same Authorization header and return media-specific fields; timestamps are Unix seconds.
Get Post Details
- Method: GET
- URL: https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23420/get-post-details
- Required parameter: idOrUrl (string), for example a post URL like https://www.instagram.com/p/DfALy1PTBSa/
What it does: Retrieve detailed information about a specific post using id or url. The response includes fields such as id, code, title, createdAt (Unix seconds), author object (id, username, fullName, isVerified, profilePictureUrl), totalMedia, statistics (likeCount, commentCount), and mediaList items including downloadUrl where available. Use this to resolve a share link to author metadata and engagement stats.
Get Reel Details
- Method: GET
- URL: https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23421/get-reel-details
- Required parameter: idOrUrl (string), for example a reel URL like https://www.instagram.com/reel/DctYV2qt6S5/
What it does: Retrieve detailed information about a specific Instagram reel using id or url. The response includes fields such as id, code, createdAt (Unix seconds), title, author object, statistics (commentCount, likeCount), and a downloadUrl where applicable. Great for campaign reporting when you only have a reel link from a creator.
Get Highlight Story Details
- Method: GET
- URL: https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23422/get-highlight-story-details
- Required parameter: id (string), a highlight ID like 17910014403011985
What it does: Retrieve all stories inside a specific Instagram highlight using the highlight ID. The response includes the highlight’s id, title, totalStories, and a stories array with fields such as id, mediaType, createdAt (Unix seconds), thumbnailUrl, and downloadUrl where available. Use this to render highlight viewers or back up a highlight set.
Practical integration notes that save time
- Authentication: Always send Authorization: Bearer YOUR_API_KEY.
- Timestamps: createdAt fields are Unix seconds. Convert with your language’s standard utilities.
- Private accounts: If isPrivateAccount is true, expect missing or inaccessible media elsewhere; handle gracefully.
- Caching: Profile counts can be cached for minutes to reduce duplicate calls; tune to your UI’s freshness needs.
- IDs vs URLs: For posts and reels, idOrUrl lets you pass share links directly—no extra parsing step in your app.
- Downloads: Media downloadUrl fields point to CDN links. These may expire; fetch on demand or refresh URLs before use.
- Quotas: Access is subscription + quota. The first API on your account typically comes with a 7-day trial or 50 requests; confirm on the listing page before load testing.
Real-world flows
1) Creator onboarding and verification
When a creator enters their Instagram username, call Get Profile Details to fetch isVerified, followerCount, and isPrivateAccount. Reject private or low-signal accounts automatically or route to manual review. Store id alongside username to remain resilient to handle changes.
2) Campaign performance snapshots
Influencers share links to posts or reels. Pass that link into Get Post Details or Get Reel Details via idOrUrl, then log statistics.likeCount and statistics.commentCount along with author.username. Re-query periodically to keep a performance history.
3) Content pickers and asset downloads
For portfolios, pull highlight sets via Get Highlight Story Details. Display stories with thumbnailUrl and allow users to download assets using downloadUrl if present. Remember that CDN links can expire; fetch just-in-time or refresh links before rendering a download button.
Calling the API from AI agents via MCP
If you use Claude Code, Cursor, Windsurf, or any MCP-compatible client, you can let the agent call Zyla APIs with your existing key through the MCP endpoint. Provide your API key and have the agent issue the same GET requests shown above; the Authorization header remains the same. This is useful for automating data lookups or scaffolding integration code from natural language prompts.
Reference: exact request URLs and parameters
- Get Profile Details (GET): https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23416/get-profile-details
- username (string, required)
- Get Post Details (GET): https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23420/get-post-details
- idOrUrl (string, required), e.g., https://www.instagram.com/p/DfALy1PTBSa/
- Get Reel Details (GET): https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23421/get-reel-details
- idOrUrl (string, required), e.g., https://www.instagram.com/reel/DctYV2qt6S5/
- Get Highlight Story Details (GET): https://zylalabs.com/api/12390/instagram-profile-and-media-data-api/23422/get-highlight-story-details
- id (string, required), e.g., 17910014403011985
Additional official examples you may consult
Get Post Details example (no changes required to headers)
Request:
Response (excerpt):
Get Reel Details example (no changes required to headers)
Request:
Response (excerpt):
Get Highlight Story Details example (no changes required to headers)
Request:
Response (excerpt):
Troubleshooting tips
- 401 or 403 errors: Confirm the Authorization header and that the subscription is active on your account.
- Empty fields: Some profiles have blank biography/category or limited fields when private; handle nulls and empty strings.
- Expired media URLs: If a downloadUrl fails, refetch the media details to obtain a fresh link.
- Malformed URLs: When using idOrUrl, pass the full canonical Instagram URL; URL-encode when constructing query strings.
FAQ
-
How do I authenticate requests?
Send Authorization: Bearer YOUR_API_KEY in the header for every request.
-
Can I fetch a profile by ID instead of username?
The profile endpoint accepts username. Store the returned id for internal keys, but query by username as shown.
-
What if I only have a share link to a post or reel?
Use idOrUrl with the exact Instagram link on Get Post Details or Get Reel Details. The API resolves it and returns author, stats, and media fields.
-
Do timestamps come in a standard format?
Yes. createdAt fields are Unix timestamps in seconds. Convert to your local timezone in your app.
-
Is there a free plan?
Access is subscription + quota. The first API on your account typically offers a 7-day trial or 50 requests—check the API page for current access options and pricing.
Ready to ship your integration? Subscribe and get your key on the Instagram Profile And Media Data API page. Your 7-day trial starts there, and you can call profile, post, reel, and highlight endpoints with the same key: Start 7-day trial on Instagram Profile And Media Data API