API DOCUMENTATION

Build with
the resolver.

Everything the XCASPER SPACE IG SCRAPER can do, in one place. Resolve public Instagram posts, Reels and stories, search with filters, and look up public profiles. No key, no login — just a GET request.

THE BASICS

One base URL.

Every endpoint lives at https://ig.xcasper.space and answers with JSON. Responses are pretty-printed. Copy any example URL below and open it in a browser to see the live result.

ENDPOINT 01

Resolve a post, Reel or story.

Paste a public Instagram link — or a username for live stories — and get the media back as ready-to-use links. Carousels return every item.

GET/api/scrape

Auto-detects the kind of link: post, Reel, story or highlight. Returns the media items with direct links, thumbnails and counts.

Parameters

ParameterRequiredDescription
urlYesA public Instagram post, Reel, story or highlight link — or a username for live stories. username works as an alias.

Example request

https://ig.xcasper.space/api/scrape?url=https://www.instagram.com/reel/Dfonr88udK4/

Example response

{
  "success": true,
  "source": "post",
  "author": null,
  "caption": "Bakari signed by WCB  #bakari #flaqo411 #jrstewart #fyp #kenyacomedy @bienaimesol @stevosimpleboy8",
  "count": 1,
  "items": [
    {
      "index": 1,
      "type": "video",
      "url": "https://instagram.fesb4-4.fna.fbcdn.net/o1/v/t2/f2/m86/…mp4",
      "filename": "VG1dKib4Wubyn0fMKXm46PW3JsC-5_8YsR74.mp4",
      "thumbnail": "https://instagram.fesb4-4.fna.fbcdn.net/…jpg",
      "quality": null,
      "size": null
    }
  ],
  "meta": {
    "likes": 6888,
    "comments": 111,
    "published": 1794471915
  }
}

Media URLs are long CDN links — shortened here with …. meta carries the post's likes, comments and publish time.

Try it

GET/api/stories

Stories only. Give it a username or a story link and get whatever is live right now — nothing else.

Parameters

ParameterRequiredDescription
urlYesA username, or a story link like https://www.instagram.com/stories/xcasper.space/4038019744663740041. username works as an alias.

Example request

https://ig.xcasper.space/api/stories?url=xcasper.space

Example response

{
  "success": true,
  "source": "stories",
  "author": "am casper ❣️",
  "username": "xcasper.space",
  "avatar": "https://…",
  "caption": null,
  "count": 1,
  "items": [
    {
      "index": 1,
      "type": "video",
      "url": "https://scontent-lga3-2.cdninstagram.com/o1/v/t2/f2/m86/…mp4",
      "filename": "AEgxjy5WtbhouvzaSr1IFm6wdaBaMETIOZ80.mp4",
      "thumbnail": "https://…",
      "quality": null,
      "size": null,
      "postId": "4038019744663740041",
      "published": 1795589426
    }
  ]
}

Stories disappear after 24 hours — a story link that worked yesterday returns a 404 today. The username form always returns whatever is live right now, or a 404 when the account has no live stories.

Try it

ENDPOINT 03

A second route to the same media.

Server 2 resolves the same public links through a different route. Same request, same response shape — use it when the main route has nothing for a link.

GET/api/server2

Fallback resolver for public Instagram links. Returns the same items shape as /api/scrape.

Parameters

ParameterRequiredDescription
urlYesA public Instagram post, Reel, story or highlight link.

Example request

https://ig.xcasper.space/api/server2?url=https://www.instagram.com/reel/Dfonr88udK4/

Example response

{
  "success": true,
  "source": "reel",
  "author": "real_jr_stewart",
  "caption": "Bakari signed by WCB  #bakari #flaqo411 #jrstewart #fyp #kenyacomedy @bienaimesol @stevosimpleboy8",
  "count": 1,
  "items": [
    {
      "index": 1,
      "type": "video",
      "url": "https://instavideodl.com/api/proxy?t=eyJ1IjoiaHR0cHM6Ly9zY29udGVudC1lemUxLTIuY2R…",
      "filename": "instagram-server2-1.mp4",
      "thumbnail": "https://instavideodl.com/api/proxy?t=eyJ1IjoiaHR0cHM6Ly9zY29udGVudC1lemUxLTEuY2R…&inline=1",
      "quality": null,
      "size": null
    }
  ]
}

Server 2 returns the same items shape as /api/scrape, without the meta block. Media URLs are long proxy links — shortened here with ….

Try it

ENDPOINT 04

Look up a public profile.

The stalk endpoint: everything the public routes can say about a public account — profile, latest Reels with total likes and the top Reel, and the live-story count.

GET/api/user

Takes a username or a full profile link and returns the public profile, the latest Reels (up to 12) with total likes and the top Reel, and how many live stories the account has right now.

Parameters

ParameterRequiredDescription
usernameYesA username, an @handle, or a full profile link like https://www.instagram.com/cristiano/. q and url work as aliases.

Example request

https://ig.xcasper.space/api/user?username=cristiano

Example response

{
  "success": true,
  "source": "user",
  "username": "cristiano",
  "author": "Cristiano Ronaldo",
  "avatar": "https://…",
  "profileUrl": "https://www.instagram.com/cristiano/",
  "is_private": false,
  "uid": "173560420",
  "reels": {
    "count": 12,
    "totalLikes": 130623121,
    "topReel": {
      "postId": "4023629041474068893",
      "postUrl": "https://www.instagram.com/reel/DfWzUuNAeGd/",
      "title": "Portugal estará sempre em mim",
      "thumbnail": "https://…",
      "likes": 41956578,
      "comments": 4090628,
      "published": 1793874106
    },
    "scope": "latest reels"
  },
  "liveStories": 1,
  "note": "Bio, follower and following counts, post count and the verified badge are not available from the public resolver — Instagram only shows them to logged-in accounts."
}

Live example for @cristiano — run the tester below to see live values for any account.

Try it

ENDPOINT 05

Is it up?

A tiny health check for monitoring. It answers fast and never needs a parameter.

GET/health

Returns ok: true while the service is running, with its uptime in seconds.

Example request

https://ig.xcasper.space/health

Example response

{
  "ok": true,
  "service": "xcasper-instagram-scraper",
  "uptime": 13209,
  "time": "2026-11-25T16:59:20.303Z"
}

Try it

WHEN SOMETHING GOES WRONG

Errors, plainly.

Every failure is JSON with an error message that says what happened. The status code says what kind of failure it is.

StatusMeaning
400Something is missing or not allowed — a missing url / q / username, a bad link, or a search that needs a logged-in account (hashtag, keyword, feed posts by username).
403That account is private.
404Nothing was found — the link or account could not be resolved, or the account has no media of that kind.
429Too many requests. Wait a minute and try again.
502The resolver could not finish the request. Try again, or try /api/server2.

Example error body:

{
  "error": "Missing q. Try /api/search?q=xcasper.space&type=reels (post, users, videos, reels)"
}