You need to programmatically fetch Instagram Stories or Reels URLs for downstream processing—rendering previews, moderating content, or saving assets to storage—and you need it working this week. By the end of this guide, you’ll have a working call to a production endpoint that takes a public Instagram Story or Reel URL and returns the media payload, using one API key from Zyla API Hub.
What this API does and when to use it
The Instagram Stories Downloader API exposes one focused capability: given the URL of an Instagram Reel or Story, it attempts to resolve and return the underlying media. This is useful for:
- Building social media schedulers that need to fetch source media before re-posting.
- Content moderation workflows that extract media for automated checks.
- Backup and archiving services that preserve user-submitted Instagram links.
- Data ingestion pipelines that need deterministic media URLs for processing.
It’s part of the Social Media & Networking category on Zyla API Hub, which offers more than 10,000 ready-to-use APIs under one account and one key. Subscription is quota-based (not pay-per-call). For this API, you can start with a 7-day trial or 50 requests—check the API page for current access options and pricing.
Getting started on Zyla API Hub
To get an API key:
- Open the marketplace listing for the Instagram Stories Downloader API and start the trial.
- Subscribe to obtain your API key.
- Call the endpoint with Authorization: Bearer YOUR_API_KEY.
Use this direct link to begin: Start 7-day trial on Instagram Stories Downloader API. You can also browse other social media APIs on Zyla API Hub.
Endpoint: Get Stories and Reels
This API exposes a single endpoint to retrieve media from a provided Instagram Story or Reel URL.
- Method: GET
- URL: https://zylalabs.com/api/1435/instagram-stories-downloader-api/14849/get-stories-and-reels
- Required query parameter:
- url (string): The full Instagram URL of the Story or Reel. Example: https://www.instagram.com/reel/DL74pQBRymc/
- Authentication: HTTP header Authorization: Bearer YOUR_API_KEY
Important: URL-encode the url parameter when constructing the request. The example below already includes proper encoding.
Official cURL example
curl -s -X GET "https://zylalabs.com/api/1435/instagram-stories-downloader-api/14849/get-stories-and-reels?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FDL74pQBRymc%2F" \
-H "Authorization: Bearer YOUR_API_KEY"
Official example response
{
"media": [],
"error": "Invalid Instagram link format! Currently, we support images, reels, and IGTV only."
}
Field notes:
- media: An array intended to contain resolved media objects when the URL is valid and supported.
- error: A message describing what went wrong when resolution fails (e.g., unsupported or malformed URL).
When integrating, treat error as authoritative. If error is non-empty or media is empty, handle gracefully (e.g., prompt for a different link, log and retry later, or surface a user-visible validation message).
Working Python example
The snippet below calls the same endpoint, parses the JSON, and demonstrates basic error handling. Replace YOUR_API_KEY with your actual key from your Zyla API Hub subscription.
import requests
import urllib.parse
API_KEY = "YOUR_API_KEY"
endpoint = "https://zylalabs.com/api/1435/instagram-stories-downloader-api/14849/get-stories-and-reels"
# Always URL-encode the Instagram link for the `url` query parameter
ig_link = "https://www.instagram.com/reel/DL74pQBRymc/"
params = {
"url": urllib.parse.quote(ig_link, safe="")
}
# Build the final URL with the encoded parameter as the API expects
final_url = f"{endpoint}?url={params['url']}"
headers = {
"Authorization": f"Bearer {API_KEY}"
}
resp = requests.get(final_url, headers=headers, timeout=20)
resp.raise_for_status()
data = resp.json()
# Minimal parsing: prefer `error` if present, otherwise use `media`
if data.get("error"):
print("API reported an error:", data["error"])
else:
media_items = data.get("media", [])
print(f"Resolved {len(media_items)} media item(s).")
# Example iteration (structure of items depends on the API response)
for i, item in enumerate(media_items, 1):
# Use dict access defensively since fields are not documented here
# e.g., possible keys might include 'url', 'type', etc. (check live responses)
print(f"Item {i}: {item}")
Developer notes that save time
- URL encoding: Always encode the Instagram URL when sending it as the url query parameter. The curl above shows the correct encoding.
- Authentication: Use a single header—Authorization: Bearer YOUR_API_KEY. Do not place your key in the query string.
- Input validation: Validate that users supply full Instagram URLs that represent Reels or Stories. The example response demonstrates the error message you might see with unsupported or malformed links.
- Retries: If you receive transient HTTP errors, back off and retry. On a consistent error field in the JSON body, surface it to the user rather than retrying.
- Caching: If your workflow processes popular links repeatedly, cache successful media resolutions by the canonical Instagram URL to reduce duplicate requests.
- Quotas: Access is subscription + quota (not pay-per-call). For this API you can start with a 7-day trial or 50 requests; verify your current limits on the listing page before load testing.
Practical use cases
1) Social content ingestion
Let users paste a Reel URL; resolve the media; upload it to your storage; attach metadata; enqueue for transformation (e.g., transcoding, clipping, or thumbnail generation). Handle the error path by showing a clear prompt when the URL is unsupported.
2) Moderation pipeline
Resolve media from a Reel or Story link, then run it through your moderation stack. With consistent input (a single Instagram URL), you can standardize processing and logging across your services.
3) Creator tooling
Build a simple “import from Instagram” feature, resolving Reels into an editor timeline. Provide instant feedback when the API flags unsupported link formats via the error field.
4) Archival and backups
When users supply links as references, use this endpoint to fetch media and archive it with provenance. Store the original Instagram URL and the resolution timestamp for auditability.
How to call it from an AI agent via MCP
Every API on Zyla can also be called through the Model Context Protocol (MCP), which works with MCP-compatible tools. Point your client to the MCP gateway at: https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY
Within your MCP client, configure a tool that makes a GET request to:
- https://zylalabs.com/api/1435/instagram-stories-downloader-api/14849/get-stories-and-reels
- Headers: Authorization: Bearer YOUR_API_KEY
- Query param: url (URL-encoded Instagram link)
Once wired, your agent can accept a Reel/Story URL as input and return the parsed JSON (media or error) to your coding session. For reference material on MCP itself, see: MCP.
End-to-end checklist
- Get an API key by subscribing on the listing page.
- Ensure the Instagram URL is URL-encoded when passed as url.
- Send Authorization: Bearer YOUR_API_KEY on every request.
- Check JSON for error; if present, do not assume media is available.
- Log the original input URL and the API response for debugging and audits.
- Cache successful resolutions keyed by the canonical Instagram URL.
FAQ
What content types does the endpoint support?
The error message indicates support for images, reels, and IGTV. If you pass a format outside what the API supports or an invalid link, expect an error message like the one in the sample response.
How do I authenticate?
Include an HTTP header: Authorization: Bearer YOUR_API_KEY. Do not include keys in the query string.
Do I need to URL-encode the Instagram link?
Yes. The url query parameter must contain a URL-encoded Instagram link. The official curl example shows the correct encoding.
What should I do when the API returns an error field?
Treat the error as the authoritative outcome for that request. Show a validation message to the user, allow correction, or log and halt processing. Avoid retrying if the error indicates an unsupported format.
Is there a free plan?
No free plan. Access is subscription + quota, with a first-step option of a 7-day trial or 50 requests. Check the API page for current access options.
Ready to ship your Instagram Reel/Story integration? Start your trial and get your API key here: Instagram Stories Downloader API on Zyla API Hub. Once subscribed, you can make your first request in minutes and plug the response into your social workflows.