You have an Instagram Story or Reel URL and need to integrate media retrieval into an application. By the end of this guide, you’ll have a copy-pasteable request for the Instagram Stories Downloader API, a Python example that handles its documented response fields, and a way to distinguish an error from a result your application can use.
What the API does
Instagram Stories Downloader API provides a Get Stories and Reels endpoint that accepts an Instagram URL. It is intended for applications that need to retrieve media from a supplied Story or Reel link, such as an editorial workflow, a media review tool, or an internal content application.
The documented example response contains a media field and an error field. That example is an error response, not a successful download: it returns an empty media array and says the supplied link format is invalid. Build your integration so it can surface that outcome rather than treating every response as a successful retrieval.
The API is available through Zyla API Hub, a marketplace with more than 10,000 public APIs. The Hub uses a subscription and quota model rather than pay-per-call billing.
Getting started on Zyla API Hub
Open the Instagram Stories Downloader API listing linked at the end of this article. Create a free Zyla account if you don’t already have one, then click Subscribe or Start Free Trial when available and get your API key.
For a first API, the stated trial is seven days or 50 requests. Check the API page for current access options and pricing before integrating it. Subscription access and remaining quota matter: having a Hub account alone is not the same as having an active subscription to this API.
Send your key in the Authorization header as Bearer YOUR_API_KEY. Keep the key in a server-side environment rather than shipping it in browser code or a public repository.
Call Get Stories and Reels
The available endpoint is Get Stories and Reels. It uses GET and requires one parameter: url, a string containing the Instagram Story or Reel URL.
The exact Hub request URL is:
https://zylalabs.com/api/1435/instagram-stories-downloader-api/14849/get-stories-and-reels
The following request uses the Reel URL from the Hub listing. Its value is URL-encoded in the query string, so the slashes and other characters in the Instagram URL remain part of the url parameter.
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"
Replace YOUR_API_KEY with your Hub key before running the command. For an application that accepts a URL from a user, encode that value as a query parameter rather than concatenating an unescaped URL into the request.
Read the response in Python
The listing provides this example response:
{
"media": [],
"error": "Invalid Instagram link format! Currently, we support images, reels, and IGTV only."
}
In this example, media is empty and error contains the reason returned by the API. Although the endpoint is named Get Stories and Reels, the example error specifically mentions images, reels, and IGTV. Treat the returned error as the outcome for the submitted link; don’t infer from the endpoint name that every Story or Reel URL will succeed.
The following Python sample calls the same endpoint with the same URL and reads the two fields shown in the documented response. It uses Python’s standard library, so it doesn’t require an additional HTTP client package.
import json
from urllib.error import HTTPError
from urllib.request import Request, urlopen
endpoint = (
"https://zylalabs.com/api/1435/instagram-stories-downloader-api/"
"14849/get-stories-and-reels"
"?url=https%3A%2F%2Fwww.instagram.com%2Freel%2FDL74pQBRymc%2F"
)
request = Request(
endpoint,
headers={"Authorization": "Bearer YOUR_API_KEY"},
method="GET",
)
try:
with urlopen(request) as response:
result = json.load(response)
except HTTPError as exc:
print(f"HTTP request failed: {exc.code}")
else:
error = result.get("error")
media = result.get("media")
if error:
print(f"API error: {error}")
elif media is None:
print("No media field was returned.")
elif not media:
print("The media field is empty.")
else:
print(json.dumps(media, indent=2))
Replace the key before running the sample. The code checks for an API error separately from an HTTP failure, and it distinguishes a missing media field from an empty one.
The supplied example does not show a successful media payload. Inspect an actual successful response and the API listing before writing code that assumes a particular item structure or download URL. In particular, don’t index the first item of media without checking whether the array is empty.
Put the endpoint into a workflow
For an editorial review tool, accept a link from an editor and submit it to Get Stories and Reels. If the response contains an error, show the returned message beside the submitted link so the editor can correct it. Only advance to media processing after you’ve verified that the response contains usable media.
For a content operations application, keep the original user-supplied link associated with the result. That makes it possible to identify which request produced an empty media array, without guessing from the error message alone. Avoid recording your authorization header when logging requests.
For a support or troubleshooting screen, separate subscription and quota checks from link-format errors. A developer can confirm the API subscription and current access options in the listing, then inspect the response to see whether the request returned an error. This avoids presenting every failure as though the Instagram URL itself were necessarily wrong.
Call the API from an AI agent
Zyla API Hub APIs can also be called from MCP-compatible clients, including Claude Code, Cursor, and Windsurf. Configure the client with the MCP endpoint https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY, replacing the placeholder with your Hub key. The MCP link provides the Hub’s MCP entry point.
Give the agent the Instagram URL you want to process and ask it to use the Instagram Stories Downloader API. Have it report an API error or an empty media result explicitly rather than assuming that a requested download succeeded. Protect the MCP endpoint configuration as a secret because its query string contains your API key.
FAQ
What parameter does Get Stories and Reels require?
It requires url, a string containing the Instagram Story or Reel URL. The endpoint is a GET request; encode the supplied URL when placing it in the query string.
Why did the example return an empty media array?
The documented response includes an error saying the Instagram link format is invalid. Check the returned error before using media, and don’t treat an empty array as a successful retrieval.
Can I use the endpoint from Python?
Yes. Send the request to the Hub URL with the required url parameter and the Authorization: Bearer YOUR_API_KEY header. The standard-library example above handles the fields shown in the documented response.
Is access billed per call?
Zyla API Hub uses a subscription and quota model. Check the listing for current access options and pricing, including the first-API trial terms.
Ready to test the request? Create a free Zyla API Hub account, then Start 7-day trial on Instagram Stories Downloader API where available and get your API key from the Hub.