# Klupt API documentation URL: https://api.klupt.io/docs The Klupt API gives you **public Instagram data as clean JSON**: profiles, followers and following in real **newest-first** order, posts, reels, stories, highlights, comments, likers, hashtags, places, audio and search. You authenticate with one API key, page through lists with cursors, and pay only for successful calls. - Base URL: `https://api.klupt.io/v1` - Auth: `X-Api-Key: kd_live_…` header ([Authentication](/docs/authentication)) - Sandbox: `kd_test_…` keys return realistic sample data, unlimited and at no cost ([Sandbox](/docs/sandbox)). Every endpoint page has a **Try it** panel. - Price: 1 credit per successful call (2 for a following page of up to about 200 accounts), from $2.00 per 1,000 credits ([Pricing](/pricing)) - **Public accounts only.** Private accounts answer `private_account`. ## Quickstart 1. [Create a business account](/signup) (company, website, use case) and confirm your email. Sandbox keys work at once. 2. Accounts that pass our automatic checks can create a live key and buy the two smallest packs right away, with 25 live test calls to start. A person reviews the rest within a business day; approval opens larger packs, plans, higher limits and adds 50 test calls. See [account access](/docs/authentication#account-access). 3. Create a key under **API keys** in the dashboard (it is shown once) and call the API: ```bash # Who did @natgeo follow most recently? Newest first. curl "https://api.klupt.io/v1/users/natgeo/following" \ -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get( "https://api.klupt.io/v1/users/natgeo/followers", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30, ) r.raise_for_status() body = r.json() newest = body["data"][0] # position 1 = most recent follower print(newest["username"], body["meta"]["order"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/users/natgeo/posts", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data, pagination, meta } = await res.json(); ``` ## Endpoints | Endpoint | What it returns | Docs | |---|---|---| | `GET /v1/users/by-username/{username}` | Profile by username (includes the user id) | [User ID lookup](/docs/instagram-user-id-api) | | `GET /v1/users/by-id/{id}` | Profile by numeric user id | [Profile API](/docs/instagram-profile-api) | | `GET /v1/users/{user}` | Profile by username or id | [Profile API](/docs/instagram-profile-api) | | `GET /v1/users/{user}/followers` | Followers, newest first, 25 a page | [Followers API](/docs/instagram-followers-api) | | `GET /v1/users/{user}/following` | Following, newest first, ~200 a page | [Following API](/docs/instagram-following-api) | | `GET /v1/users/{user}/posts` | Recent posts | [Posts API](/docs/instagram-posts-api) | | `GET /v1/search/users?q=` | Accounts matching a name, up to ~40 | [User search API](/docs/instagram-user-search-api) | | `GET /v1/users/{user}/reels` | Reels with views, newest or most viewed | [Reels API](/docs/instagram-reels-api) | | `GET /v1/users/{user}/stories` · `/v1/stories/{story}` | Live stories | [Stories API](/docs/instagram-stories-api) | | `GET /v1/users/{user}/highlights` · `/v1/highlights/{highlight}` | Highlights and their stories | [Highlights API](/docs/instagram-highlights-api) | | `GET /v1/users/{user}/tagged` · `/reposts` | Posts an account is tagged in or reposted | [Tagged posts API](/docs/instagram-tagged-posts-api) | | `GET /v1/users/{user}/related` | Similar accounts | [Similar accounts API](/docs/instagram-similar-accounts-api) | | `GET /v1/users/{user}/account-details` | Join date, country, username changes | [Account details API](/docs/instagram-account-details-api) | | `GET /v1/posts/{post}` · `/v1/posts/stats?ids=` | One post by URL or shortcode; counts for 20 posts | [Post API](/docs/instagram-post-api) | | `GET /v1/posts/{post}/comments` · `/v1/comments/{comment}/replies` | Comments and replies | [Comments API](/docs/instagram-comments-api) | | `GET /v1/posts/{post}/likers` | Who liked a post | [Likers API](/docs/instagram-likers-api) | | `GET /v1/hashtags/{tag}` · `/posts` · `/v1/search/hashtags` | Hashtags and their top posts | [Hashtag API](/docs/instagram-hashtag-api) | | `GET /v1/places/{place}` · `/posts` · `/v1/search/places` | Places and their posts | [Location API](/docs/instagram-location-api) | | `GET /v1/audio/{audio}` · `/reels` · `/v1/audio/trending` · `/v1/search/audio` | Songs, sounds and the reels using them | [Audio API](/docs/instagram-audio-api) | | `GET /v1/resolve?url=` | Any Instagram link to ids (free) | [URL resolver](/docs/instagram-url-resolver) | | `GET /v1/status` | Service status (no key) | | | `GET /v1/account` | Your balance, limits and key (free) | [Authentication](/docs/authentication#account-endpoint) | `{user}` is a username or a numeric user id. Every success looks like `{ data, pagination?, meta }`, and `meta` always carries `request_id`, `cached`, `credits_charged` and `credits_remaining`. ## Machine-readable files - OpenAPI 3.1: [https://api.klupt.io/openapi.json](https://api.klupt.io/openapi.json) - For LLMs and agents: [/llms.txt](/llms.txt) and [/llms-full.txt](/llms-full.txt) - Every docs page as Markdown: add `.md` to its URL, for example [/docs/instagram-followers-api.md](/docs/instagram-followers-api.md) ## FAQ ### Is there an API for Instagram followers in chronological order? Yes. The Klupt API returns a public account's followers and following newest first, with a `position` field (1 = most recent) and `meta.order: "newest_first"` on every list response. ### Does the Klupt API work on private Instagram accounts? No. It only covers public accounts and publicly visible data. Private accounts answer `403 private_account`, and that call is free. ### Do I need an Instagram login? No. You authenticate with a Klupt API key. The accounts you look up are never notified. --- # Authentication and API keys URL: https://api.klupt.io/docs/authentication Send your key in the `X-Api-Key` header on every request. Live keys start with `kd_live_`; sandbox keys start with `kd_test_`. ```bash curl "https://api.klupt.io/v1/account" -H "X-Api-Key: kd_live_YOUR_KEY" ``` ## How keys are protected - Each key carries more than 256 bits of randomness. - We store only a keyed hash (HMAC-SHA256 with a server-side secret). The full key is shown **once**, when you create it. The dashboard shows only the first characters. - **Rotate** issues a new key with the same name and settings. The old one stops at once, or after a grace period of up to 7 days so you can deploy the new one. - **Revoke** stops a key within seconds. - **IP allowlist:** limit a key to your servers' addresses or CIDR ranges (IPv4 or IPv6). Calls from anywhere else answer `403 ip_not_allowed`. - **Per-key limits:** give a key a lower requests-per-second limit or a monthly credit cap, for example for a staging server. - Keep keys on your server. Never ship them in a browser, a mobile app or a public repository. ## Account access The docs, OpenAPI spec and pricing are public. Using the API needs a business account, which moves through these levels: | Level | How you get there | What you can do | |---|---|---| | Email confirmed, in review | You signed up; an automatic check needs a person to look | Unlimited sandbox (`kd_test_`) keys | | Limited | Automatic checks passed (business email, website, no blocklist hit) | Sandbox, 1 live key, 3 requests a second, the $20 and $50 packs, 25 live test calls | | Approved | A person reviewed your account (usually within one business day) | Up to 10 live keys, 10 requests a second, every pack, monthly plans, add-ons, plus 50 live test calls | Accounts that break the [acceptable use policy](/docs/acceptable-use) are suspended: every key answers `403 account_suspended` at once. **Live test calls** are spent only after your paid credits, at 1 request a second and up to 5 pages of any list. When they run out you get `402 insufficient_credits` with a link to buy a pack. ## Dashboard sign-in The dashboard uses one-time sign-in links sent by email (valid 15 minutes, single use). You can turn on **two-factor authentication** (any authenticator app) under **Security**; you then get recovery codes to store safely. ## Account endpoint `GET /v1/account` is free and returns your plan, credit balance, rate limits and this key's monthly spend. Use it as a health check for your integration. ```json { "data": { "plan": "payg", "credits": { "total": 26950.5, "plan_allowance": 0, "prepaid": 26950.5 }, "limits": { "requests_per_second": 10, "concurrent_requests": 5 }, "key": { "prefix": "kd_live_Ab12Cd", "name": "production", "mode": "live", "monthly_credit_limit": null, "credits_used_this_month": 49.5 } }, "meta": { "request_id": "req_…", "credits_charged": 0 } } ``` --- # Sandbox (test keys) URL: https://api.klupt.io/docs/sandbox Create a key with mode **Test** in the dashboard. Test keys work as soon as your email is confirmed, even while your account is in review. They start with `kd_test_`, return **realistic sample data in exactly the live schema** (stable cursors, every error case), are **unlimited and free**, and never fetch anything from Instagram. Responses carry `meta.sandbox: true` and the header `X-Klupt-Sandbox: true`. No account yet? Every endpoint page in these docs has a **Try it** panel that calls the same sandbox. Use special usernames to test your error handling: | Username | Answer | |---|---| | `private_anything` | `403 private_account` on lists and posts | | `ghost_anything` | `404 user_not_found` | | `hidden_anything` | `200` with an empty list and `meta.list_hidden: true` | | any other valid username | a made-up public account | Sandbox data is deterministic: the same request returns the same answer, so your tests stay stable. Sandbox keys are limited to 2 requests per second. --- # Instagram User ID Lookup API URL: https://api.klupt.io/docs/instagram-user-id-api **Turn an Instagram username into its numeric user id** with one call. You get the id together with the full public profile (name, bio, counts, picture). Ids never change when an account renames itself, so store the id and use it in later calls, for example with [profile by id](/docs/instagram-profile-api). ``` GET https://api.klupt.io/v1/users/by-username/{username} ``` **Cost:** 1 credit per successful call (0.5 if served from cache). Failed calls are free. ## Parameters | Parameter | In | Description | |---|---|---| | `username` | path | Instagram username, with or without `@`. Letters, digits, `.` and `_`, up to 30 characters. Always read as a username, even if it is all digits. | | `fresh` | query | `true` skips the cache and fetches live (full price). | ## Response ```json { "data": { "id": "25025320", "username": "instagram", "full_name": "Instagram", "is_private": false, "is_verified": true, "profile_pic_url": "https://scontent.cdninstagram.com/…/profile.jpg", "biography": "Bringing you closer to the people and things you love.", "external_url": "https://about.instagram.com", "category": "Product/service", "is_business": true, "profile_pic_url_hd": "https://scontent.cdninstagram.com/…", "counts": { "followers": 690000000, "following": 180, "posts": 7900 } }, "meta": { "request_id": "req_8Hn2…", "cached": false, "cache_age_seconds": 0, "credits_charged": 1, "credits_remaining": 26949 } } ``` `id` is a string because Instagram ids can be larger than 2^53. ## Examples ```bash curl "https://api.klupt.io/v1/users/by-username/instagram" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/by-username/instagram", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) user_id = r.json()["data"]["id"] ``` ```javascript const r = await fetch("https://api.klupt.io/v1/users/by-username/instagram", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data } = await r.json(); console.log(data.id); ``` ## Errors | Status | Code | When | |---|---|---| | 404 | `user_not_found` | No account with that username (free) | | 400 | `invalid_request` | The username has characters Instagram does not allow | See all [error codes](/docs/errors). ## FAQ ### How do I find an Instagram user id from a username? Call `GET /v1/users/by-username/{username}` with your API key. The `data.id` field is the numeric Instagram user id. ### Does the user id change when someone changes their username? No. The numeric id stays the same for the life of the account, which is why it is the best key to store. --- # Instagram Profile API URL: https://api.klupt.io/docs/instagram-profile-api **Get a public Instagram profile as JSON**: bio, website, category, verified status, HD profile picture, and follower, following and post counts. ``` GET https://api.klupt.io/v1/users/by-username/{username} GET https://api.klupt.io/v1/users/by-id/{id} GET https://api.klupt.io/v1/users/{user} # username or id ``` All three return the same profile. Use **by-id** when you stored ids (ids survive renames), **by-username** when you have a handle, and `{user}` when you accept either. **Cost:** 1 credit per successful call (0.5 from cache). Profiles are cached for 15 minutes. ## Parameters | Parameter | In | Description | |---|---|---| | `username` | path | by-username: an Instagram username (`natgeo`), always read as a username. | | `id` | path | by-id: a numeric Instagram user id (`787132`). | | `user` | path | `{user}` route: a username or a numeric id. | | `fresh` | query | `true` skips the cache (full price). Same as the header `Cache-Control: no-cache`. | ## Response ```json { "data": { "id": "787132", "username": "natgeo", "full_name": "National Geographic", "is_private": false, "is_verified": true, "profile_pic_url": "https://scontent.cdninstagram.com/…", "biography": "Experience the world through the eyes of our photographers.", "external_url": "https://www.nationalgeographic.com", "category": "Media/news company", "is_business": true, "profile_pic_url_hd": "https://scontent.cdninstagram.com/…", "counts": { "followers": 280000000, "following": 160, "posts": 30500 } }, "meta": { "request_id": "req_Zt0q…", "cached": true, "cache_age_seconds": 141, "credits_charged": 0.5, "credits_remaining": 26948.5 } } ``` Private accounts return their public profile fields with `is_private: true`; their lists and posts are not available. ## Examples ```bash curl "https://api.klupt.io/v1/users/by-username/natgeo" -H "X-Api-Key: $KLUPT_API_KEY" curl "https://api.klupt.io/v1/users/by-id/787132" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests p = requests.get("https://api.klupt.io/v1/users/natgeo", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30).json()["data"] print(p["counts"]["followers"]) ``` ```javascript const { data } = await (await fetch("https://api.klupt.io/v1/users/natgeo", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, })).json(); ``` ## FAQ ### How do I get someone's Instagram follower count with an API? Call `GET /v1/users/by-username/{username}`. The follower count is in `data.counts.followers`, next to `following` and `posts`. ### How fresh is the profile data? Answers are cached for 15 minutes and `meta.cache_age_seconds` tells you the age. Pass `fresh=true` for a live fetch. ### Can I get an Instagram profile by user id? Yes: `GET /v1/users/by-id/{id}` returns the same profile for a numeric user id. --- # Instagram Followers API URL: https://api.klupt.io/docs/instagram-followers-api **List the followers of a public Instagram account, newest first.** `position: 1` is the account's most recent follower. Pages hold up to 25 accounts; page on with the cursor. ``` GET https://api.klupt.io/v1/users/{user}/followers ``` **Cost:** 1 credit per page of up to 25 accounts (0.5 from cache), about $0.08 per 1,000 rows. Failed calls are free. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username or numeric user id. Ids save a lookup. | | `cursor` | query | `pagination.next_cursor` from the previous page. Omit for the first page. | | `strict_order` | query | `true`: answer `503 order_unavailable` (free) instead of a list whose order is not newest first. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json { "data": [ { "position": 1, "id": "6860189", "username": "new_follower", "full_name": "New Follower", "is_private": false, "is_verified": false, "profile_pic_url": "https://scontent.cdninstagram.com/…" }, { "position": 2, "id": "3141592", "username": "coffee.place", "full_name": "Coffee Place", "is_private": false, "is_verified": false, "profile_pic_url": "https://scontent.cdninstagram.com/…" } ], "pagination": { "next_cursor": "kJx1…opaque…Qw", "has_more": true, "page_size": 25 }, "meta": { "request_id": "req_…", "order": "newest_first", "list_hidden": false, "cached": false, "cache_age_seconds": 0, "credits_charged": 1, "credits_remaining": 26947.5 } } ``` - `meta.order` is `newest_first`, or `unspecified` on the rare call where only a list in another order was available. Use `strict_order=true` to never receive an unspecified list. - `meta.list_hidden: true` means the account hides its followers from everyone: the page is empty, the list is not. - **A page can be one row short.** Now and then one account is missing from a call while the rest stay in order. Never treat an account missing from one call as an unfollow; confirm it over several calls. ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/followers" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests H = {"X-Api-Key": os.environ["KLUPT_API_KEY"]} url, params, rows = "https://api.klupt.io/v1/users/natgeo/followers", {}, [] for _ in range(4): # newest 100 followers body = requests.get(url, headers=H, params=params, timeout=30).json() rows += body["data"] if not body["pagination"]["has_more"]: break params = {"cursor": body["pagination"]["next_cursor"]} ``` ```javascript let cursor = null, rows = []; do { const url = new URL("https://api.klupt.io/v1/users/natgeo/followers"); if (cursor) url.searchParams.set("cursor", cursor); const body = await (await fetch(url, { headers: { "X-Api-Key": process.env.KLUPT_API_KEY } })).json(); rows.push(...body.data); cursor = body.pagination.next_cursor; } while (cursor && rows.length < 100); ``` ## Errors | Status | Code | When | |---|---|---| | 403 | `private_account` | The account is private (free) | | 404 | `user_not_found` | No such account (free) | | 400 | `invalid_cursor` | The cursor is from another endpoint or account | | 503 | `order_unavailable` | `strict_order=true` and no newest-first list was available (free) | ## FAQ ### How can I see someone's newest Instagram followers with an API? Call `GET /v1/users/{username}/followers`. The list is newest first: `data[0]` (position 1) is the most recent follower. ### Can the API tell me when someone followed an account? No. Instagram does not share follow dates with anyone. The API gives the order (newest first), never a follow time. ### How many followers can I get? As many as the account has, 25 per page. Each page costs 1 credit, so read only as deep as you need: the newest rows are on page one. --- # Instagram Following API URL: https://api.klupt.io/docs/instagram-following-api **List the accounts a public Instagram profile follows, newest first**: see who it followed most recently. Pages hold about 200 accounts, so one call usually covers weeks of new follows. ``` GET https://api.klupt.io/v1/users/{user}/following ``` **Cost:** 2 credits per page of up to about 200 accounts (1 from cache), about $0.02 per 1,000 rows. Failed calls are free. Since Instagram's September 2026 update, the following list in the app is no longer shown newest first. This endpoint returns it in real reverse-chronological order and says so in `meta.order`. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username or numeric user id. | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `strict_order` | query | `true`: refuse (free) rather than return a list that is not newest first. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json { "data": [ { "position": 1, "id": "6860189", "username": "new_friend", "full_name": "New Friend", "is_private": false, "is_verified": false, "profile_pic_url": "https://scontent.cdninstagram.com/…" } ], "pagination": { "next_cursor": "Qm9v…opaque…", "has_more": true, "page_size": 200 }, "meta": { "request_id": "req_…", "order": "newest_first", "list_hidden": false, "cached": false, "cache_age_seconds": 0, "credits_charged": 2, "credits_remaining": 26945.5 } } ``` A page can occasionally be one row short; never report a missing row as an unfollow on its own. See [newest-first order](/docs/newest-first-order). ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/following" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/natgeo/following", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) for row in r.json()["data"][:10]: print(row["position"], row["username"]) ``` ```javascript const body = await (await fetch("https://api.klupt.io/v1/users/natgeo/following", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, })).json(); const latest = body.data.slice(0, 10).map((u) => u.username); ``` ## FAQ ### How do I see who someone recently followed on Instagram with an API? Call `GET /v1/users/{username}/following`. The list is newest first, so the first rows are the accounts they followed most recently. ### Why is Instagram's own following list not in order any more? Instagram changed the in-app order in September 2026. The Klupt API still returns Instagram's real reverse-chronological order and labels each response with `meta.order`. ### How do I detect new follows over time? Call the endpoint on a schedule and compare the top of the list with your last result. Treat an account as unfollowed only after it is missing from several calls in a row. --- # Instagram Posts API URL: https://api.klupt.io/docs/instagram-posts-api **Get a public account's recent posts**, newest first: link, date, type (photo, video or carousel), caption, and like, comment and view counts. ``` GET https://api.klupt.io/v1/users/{user}/posts ``` **Cost:** 1 credit per page (0.5 from cache). About 12 posts a page. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username or numeric user id. | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json { "data": [ { "id": "3500000000000000001", "shortcode": "C9xYzAbCdEf", "url": "https://www.instagram.com/p/C9xYzAbCdEf/", "taken_at": "2026-11-27T18:04:11.000Z", "media_type": "carousel", "caption": "Weekend dump", "counts": { "likes": 1204, "comments": 37, "views": null }, "thumbnail_url": "https://scontent.cdninstagram.com/…" } ], "pagination": { "next_cursor": null, "has_more": false, "page_size": 12 }, "meta": { "request_id": "req_…", "cached": false, "cache_age_seconds": 0, "credits_charged": 1, "credits_remaining": 26945.5 } } ``` `counts.views` is set for videos and `null` otherwise. A count Instagram hides comes back as `null`. ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/posts" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests posts = requests.get("https://api.klupt.io/v1/users/natgeo/posts", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30).json()["data"] avg_likes = sum(p["counts"]["likes"] or 0 for p in posts) / max(len(posts), 1) ``` ```javascript const { data: posts } = await (await fetch("https://api.klupt.io/v1/users/natgeo/posts", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, })).json(); ``` ## FAQ ### How do I get an Instagram account's latest posts with an API? Call `GET /v1/users/{username}/posts`. Posts come newest first with URL, date, caption and engagement counts. --- # Instagram User Search API URL: https://api.klupt.io/docs/instagram-user-search-api **Find Instagram accounts by name or username.** Returns matching users (id, username, name, verified and private flags, picture). Instagram caps a search at about 40 results. ``` GET https://api.klupt.io/v1/search/users?q={query} ``` **Cost:** 1 credit per page (0.5 from cache). ## Parameters | Parameter | In | Description | |---|---|---| | `q` | query | What to search for, 1 to 64 characters. | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json { "data": [ { "id": "787132", "username": "natgeo", "full_name": "National Geographic", "is_private": false, "is_verified": true, "profile_pic_url": "https://scontent.cdninstagram.com/…" } ], "pagination": { "next_cursor": null, "has_more": false, "page_size": 1 }, "meta": { "request_id": "req_…", "cached": false, "cache_age_seconds": 0, "credits_charged": 1, "credits_remaining": 26944.5 } } ``` ## Examples ```bash curl -G "https://api.klupt.io/v1/search/users" --data-urlencode "q=national geographic" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests users = requests.get("https://api.klupt.io/v1/search/users", params={"q": "coffee roasters"}, headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30).json()["data"] ``` ```javascript const url = new URL("https://api.klupt.io/v1/search/users"); url.searchParams.set("q", "coffee roasters"); const { data } = await (await fetch(url, { headers: { "X-Api-Key": process.env.KLUPT_API_KEY } })).json(); ``` ## FAQ ### How many results does Instagram user search return? About 40 at most per search, which is Instagram's own cap. Narrow the query for better matches. --- # Instagram Reels API URL: https://api.klupt.io/docs/instagram-reels-api **Get the reels of a public Instagram account**, newest first or sorted by views, with play counts, likes, comments, the video URL, duration and the audio each reel uses. ``` GET https://api.klupt.io/v1/users/{user}/reels GET https://api.klupt.io/v1/audio/{audio}/reels ``` - `GET /v1/users/{user}/reels`: Reels of an account (about 12 a page) - `GET /v1/audio/{audio}/reels`: Reels that use an audio (see the [Audio API](/docs/instagram-audio-api)) **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username (`natgeo`) or numeric user id. Private accounts answer `403 private_account` (free). | | `sort` | query | `recent` (default) or `views` (most viewed first). | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_user_reels}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/reels?sort=views" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/natgeo/reels?sort=views", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() top = max(r.json()["data"], key=lambda m: m["counts"]["views"] or 0) print(top["url"], top["counts"]["views"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/users/natgeo/reels?sort=views", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data } = await res.json(); console.log(data.map((m) => [m.url, m.counts.views])); ``` ## FAQ ### How do I get the view count of Instagram reels with an API? Call `GET /v1/users/{username}/reels`. Each reel has `counts.views` (plays), `counts.likes` and `counts.comments`. Add `sort=views` to get the most viewed first. ### Can I get the audio used in a reel? Yes. Each reel carries an `audio` object (id, title, artist). Use the id with `GET /v1/audio/{id}/reels` to find other reels with the same sound. --- # Instagram Stories API URL: https://api.klupt.io/docs/instagram-stories-api **Get the live stories of a public Instagram account** (the last 24 hours) with image or video URLs, the time each was posted and when it expires. Viewing through the API never shows up in the account's viewer list. ``` GET https://api.klupt.io/v1/users/{user}/stories GET https://api.klupt.io/v1/stories/{story} ``` - `GET /v1/users/{user}/stories`: All live stories of an account - `GET /v1/stories/{story}`: One story by id (expired stories answer `404`) **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username (`natgeo`) or numeric user id. Private accounts answer `403 private_account` (free). | | `story` | path | Numeric story id (from a story URL or a stories list). | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_user_stories}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/stories" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/natgeo/stories", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() for s in r.json()["data"]: print(s["media_type"], s["taken_at"], s["video_url"] or s["thumbnail_url"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/users/natgeo/stories", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: stories } = await res.json(); ``` ## FAQ ### Does the account see that I viewed their story? No. Stories are fetched by Klupt, not by your Instagram account, so you never appear in the viewer list. ### How fresh are stories? Stories are cached for 5 minutes. Pass `fresh=true` for a live fetch. --- # Instagram Highlights API URL: https://api.klupt.io/docs/instagram-highlights-api **List the story highlights of a public Instagram account** (title, cover image, number of stories) and **get the stories inside each highlight** with their image or video URLs. ``` GET https://api.klupt.io/v1/users/{user}/highlights GET https://api.klupt.io/v1/highlights/{highlight} ``` - `GET /v1/users/{user}/highlights`: Highlights of an account - `GET /v1/highlights/{highlight}`: The stories inside one highlight **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username (`natgeo`) or numeric user id. Private accounts answer `403 private_account` (free). | | `highlight` | path | Numeric highlight id (from the highlights list). | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_user_highlights}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/highlights" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/natgeo/highlights", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() for hl in r.json()["data"]: print(hl["id"], hl["title"], hl["item_count"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/users/natgeo/highlights", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: highlights } = await res.json(); ``` ## FAQ ### How do I download Instagram highlights with an API? Call `GET /v1/users/{username}/highlights` for the list, then `GET /v1/highlights/{id}` for each highlight: every story has a `video_url` or `thumbnail_url`. --- # Instagram Post API URL: https://api.klupt.io/docs/instagram-post-api **Get one Instagram post or reel by its URL, shortcode or id**: caption, images or video, carousel items, like, comment and view counts, location and audio. **Track engagement for up to 20 posts in a single call** with the stats route. ``` GET https://api.klupt.io/v1/posts/{post} GET https://api.klupt.io/v1/posts/stats?ids= ``` - `GET /v1/posts/{post}`: One post or reel - `GET /v1/posts/stats?ids=`: Like, comment and view counts for up to 20 posts (1 credit for the batch) **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `post` | path | Post shortcode (`C9xYzAbCdEf`), numeric id, or a URL-encoded instagram.com/p/… or /reel/… link. | | `ids` | query | stats: 1 to 20 posts, comma-separated shortcodes or ids. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_post}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/posts/C9xYzAbCdEf" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/posts/C9xYzAbCdEf", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() p = r.json()["data"] print(p["media_type"], p["counts"], p["caption"][:80]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/posts/C9xYzAbCdEf", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: post } = await res.json(); ``` ## FAQ ### How do I get Instagram post data from a URL? URL-encode the link and pass it as `{post}`, or pass the shortcode from the URL. The id is worked out locally, so there is no extra call. ### How do I track likes on many posts cheaply? Use `GET /v1/posts/stats?ids=a,b,c` with up to 20 posts: one call, one credit, the like, comment and view counts of each. --- # Instagram Comments API URL: https://api.klupt.io/docs/instagram-comments-api **Get the comments on a public Instagram post**, top or newest first, with author, text, time, like count and reply count. Then **read the replies to any comment** and **who liked it**. ``` GET https://api.klupt.io/v1/posts/{post}/comments GET https://api.klupt.io/v1/comments/{comment}/replies?post= GET https://api.klupt.io/v1/comments/{comment}/likers ``` - `GET /v1/posts/{post}/comments`: Comments on a post (about 15 a page) - `GET /v1/comments/{comment}/replies?post=`: Replies to a comment - `GET /v1/comments/{comment}/likers`: Accounts that liked a comment **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `post` | path | Post shortcode (`C9xYzAbCdEf`), numeric id, or a URL-encoded instagram.com/p/… or /reel/… link. | | `sort` | query | comments: `top` (default) or `newest`. | | `comment` | path | Numeric comment id. | | `post` | query | replies: the post the comment belongs to (shortcode or id). | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_post_comments}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/posts/C9xYzAbCdEf/comments?sort=newest" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/posts/C9xYzAbCdEf/comments?sort=newest", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() for c in r.json()["data"]: print(c["author"]["username"], c["text"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/posts/C9xYzAbCdEf/comments?sort=newest", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: comments, pagination } = await res.json(); ``` ## FAQ ### How do I scrape Instagram comments with an API? Call `GET /v1/posts/{shortcode}/comments` and follow `pagination.next_cursor`. Each comment includes the author, text, time, like count and reply count. --- # Newest-first order URL: https://api.klupt.io/docs/newest-first-order The Klupt API returns followers and following in **Instagram's real reverse-chronological order**: `position: 1` is the most recent follow, and positions keep counting across pages. ## Why this matters Since Instagram's September 2026 update, the following list in the app is no longer newest first, and someone else's followers are shown in a personal order. Getting the real order is the hard part, and the reason the API exists. ## meta.order Every list response says which order it has: | Value | Meaning | |---|---| | `newest_first` | Instagram's reverse-chronological order | | `unspecified` | On a rare call only a list in another order was available | Pass `strict_order=true` to never receive an `unspecified` list: you get a free `503 order_unavailable` instead and can retry a little later. A cursor keeps the order of the page that issued it. ## No follow dates Instagram does not share when a follow happened, with anyone. Responses give the order, never a follow time. To know *when* a new follow appeared, call the endpoint on a schedule and record when an account first shows up at the top. ## A missing row is not an unfollow Now and then a list call comes back **one row short**: one account is missing and the rest stay in order. Never treat an account that is missing from a single call as an unfollow. Confirm it is still missing on several later calls before you act on it. ## Hidden lists Some public accounts hide their follower or following list from everyone. You then get `200` with an empty page and `meta.list_hidden: true`: the page is empty, the list is not. --- # Instagram Post Likers API URL: https://api.klupt.io/docs/instagram-likers-api **Get the accounts that liked a public Instagram post**: about 100 likers per call, with usernames, names, verified and private flags. ``` GET https://api.klupt.io/v1/posts/{post}/likers ``` - `GET /v1/posts/{post}/likers`: Accounts that liked a post **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `post` | path | Post shortcode (`C9xYzAbCdEf`), numeric id, or a URL-encoded instagram.com/p/… or /reel/… link. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_post_likers}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/posts/C9xYzAbCdEf/likers" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/posts/C9xYzAbCdEf/likers", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() usernames = [u["username"] for u in r.json()["data"]] ``` ```javascript const res = await fetch("https://api.klupt.io/v1/posts/C9xYzAbCdEf/likers", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: likers } = await res.json(); ``` ## FAQ ### Can I get every like on a post? Instagram shows a sample of about 100 recent likers per post; the API returns what Instagram shows. Use `counts.likes` from the [Post API](/docs/instagram-post-api) for the total. --- # Pagination URL: https://api.klupt.io/docs/pagination List endpoints return `pagination.next_cursor`, `pagination.has_more` and `pagination.page_size`. Pass the cursor back as `?cursor=` for the next page; `next_cursor: null` is the end. | Endpoint | Rows per page | |---|---| | followers | up to 25 | | following | about 200 | | posts | about 12 | | search | up to 40 in total | - Cursors are **opaque, encrypted and signed**. Do not parse, build or edit them: a changed cursor answers `400 invalid_cursor`. - A cursor works only for the endpoint and account that issued it. - `position` keeps counting across pages. - Each page is one call (1 credit). The newest rows are on page one, so walk only as deep as you need. --- # Caching URL: https://api.klupt.io/docs/caching Answers go into a cache shared by every customer, kept for **15 minutes**. When an identical request is already in flight, yours waits for it instead of fetching again. - A cached answer costs **half the price**: 0.5 credit instead of 1, or 1 instead of 2 for a following page. `meta.credits_charged` on every response says exactly what you paid. - The response tells you what you got: header `X-Klupt-Cache: HIT` or `MISS`, plus `meta.cached` and `meta.cache_age_seconds`. - Need it live? Add `?fresh=true` or send `Cache-Control: no-cache`. That call costs the full credit. - Nothing from Instagram is stored longer than the cache lifetime. --- # Instagram Tagged Posts API URL: https://api.klupt.io/docs/instagram-tagged-posts-api **List the posts a public account is tagged in**, and **the posts it reposted**: useful for creator research and brand mentions. ``` GET https://api.klupt.io/v1/users/{user}/tagged GET https://api.klupt.io/v1/users/{user}/reposts ``` - `GET /v1/users/{user}/tagged`: Posts the account is tagged in - `GET /v1/users/{user}/reposts`: Posts the account reposted **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username (`natgeo`) or numeric user id. Private accounts answer `403 private_account` (free). | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_user_tagged}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/tagged" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/natgeo/tagged", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() brands = {p["owner"]["username"] for p in r.json()["data"] if p["owner"]} ``` ```javascript const res = await fetch("https://api.klupt.io/v1/users/natgeo/tagged", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: tagged } = await res.json(); ``` ## FAQ ### How do I find who tagged a brand on Instagram? Call `GET /v1/users/{brand}/tagged`. Each post includes its `owner`, so you can see which accounts tagged the brand. --- # Errors URL: https://api.klupt.io/docs/errors Errors use HTTP status codes and a stable `error.code`. **Failed calls are never charged**, and neither are our own `429` answers. Quote the `request_id` when you contact us. ```json { "error": { "code": "private_account", "message": "This account is private. The API only covers public accounts.", "request_id": "req_4kd9…", "docs": "https://api.klupt.io/docs/errors" } } ``` | Status | Code | Meaning | |---|---|---| | 401 | `missing_api_key` | Send your API key in the X-Api-Key header. | | 401 | `invalid_api_key` | This API key is not valid or has been revoked. | | 429 | `too_many_bad_keys` | Too many requests with invalid API keys from this address. Wait a minute. | | 403 | `account_suspended` | This account is suspended. Contact api@klupt.io. | | 403 | `account_rejected` | This account was not approved. Contact api@klupt.io if you think this is a mistake. | | 403 | `account_not_approved` | Your account is waiting for review. Sandbox (kd_test_) keys work now; live keys open once the account is approved. | | 402 | `promo_limit` | Free test calls are limited to 1 request per second and the first 5 pages of a list. Buy a credit pack to go further. | | 402 | `insufficient_credits` | Your account is out of credits. Buy a credit pack in the dashboard to continue. | | 429 | `key_quota_exceeded` | This key reached its monthly credit cap. Raise the cap in the dashboard or wait for next month. | | 429 | `rate_limited` | Too many requests per second. Slow down and retry after the Retry-After delay. | | 429 | `concurrency_limited` | Too many requests in flight at once. Wait for one to finish, then retry. | | 403 | `ip_not_allowed` | This API key cannot be used from your IP address. Check the key's IP allowlist. | | 403 | `purchase_locked` | New accounts can buy the two smallest packs first. Larger packs and plans unlock after you use some credits. | | 400 | `invalid_request` | The request is not valid. | | 400 | `invalid_cursor` | This cursor is not valid for this endpoint. Start again without a cursor. | | 404 | `user_not_found` | No Instagram account with this username or id. | | 403 | `private_account` | This account is private. The API only covers public accounts. | | 503 | `order_unavailable` | A newest-first list is not available right now. Retry shortly, or call without strict_order. | | 502 | `upstream_unavailable` | Instagram data is temporarily unavailable. Retry in a moment; failed calls are free. | | 504 | `upstream_timeout` | Fetching this data took too long. Retry in a moment; failed calls are free. | | 503 | `service_busy` | We are at capacity right now. Retry in a minute; failed calls are free. | | 500 | `internal_error` | Something went wrong on our side. Retry in a moment. | ## Retrying Retry `429`, `502`, `503` and `504` with exponential backoff and jitter, honouring `Retry-After` when present. Do not retry `400`, `401`, `402`, `403` or `404`: the answer will not change. --- # Instagram Hashtag API URL: https://api.klupt.io/docs/instagram-hashtag-api **Get a hashtag's post count and its top posts**, and **search for hashtags** by keyword. ``` GET https://api.klupt.io/v1/hashtags/{tag} GET https://api.klupt.io/v1/hashtags/{tag}/posts GET https://api.klupt.io/v1/search/hashtags?q= ``` - `GET /v1/hashtags/{tag}`: A hashtag and its post count - `GET /v1/hashtags/{tag}/posts`: Top posts for a hashtag - `GET /v1/search/hashtags?q=`: Find hashtags **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `tag` | path | Hashtag, with or without `#` (URL-encode `#` as `%23`). | | `q` | query | search: what to look for. | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_hashtag_posts}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/hashtags/coffee/posts" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/hashtags/coffee/posts", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() for p in r.json()["data"]: print(p["url"], p["counts"]["likes"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/hashtags/coffee/posts", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: posts } = await res.json(); ``` ## FAQ ### How many posts does an Instagram hashtag have? Call `GET /v1/hashtags/{tag}`: `post_count` is the number Instagram shows. --- # Instagram Location API URL: https://api.klupt.io/docs/instagram-location-api **Find Instagram places by name or near a latitude and longitude**, get a place's name, category, address and contact, and **read its top or recent posts**. ``` GET https://api.klupt.io/v1/search/places?q=&lat=&lng= GET https://api.klupt.io/v1/places/{place} GET https://api.klupt.io/v1/places/{place}/posts ``` - `GET /v1/search/places?q=&lat=&lng=`: Find places - `GET /v1/places/{place}`: A place - `GET /v1/places/{place}/posts`: Top or recent posts at a place **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `q` | query | search: a place name. | | `lat` | query | search: latitude (with lng). | | `lng` | query | search: longitude. | | `place` | path | Numeric place id. | | `sort` | query | posts: `top` (default) or `recent`. | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_search_places}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/search/places?lat=48.8584&lng=2.2945" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/search/places?lat=48.8584&lng=2.2945", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() for p in r.json()["data"]: print(p["id"], p["name"], p["city"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/search/places?lat=48.8584&lng=2.2945", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: places } = await res.json(); ``` ## FAQ ### How do I get Instagram posts from a location? Find the place with `GET /v1/search/places`, then call `GET /v1/places/{id}/posts?sort=recent` for the newest posts tagged there. --- # Rate limits URL: https://api.klupt.io/docs/rate-limits Limits apply to your **account**, shared by all its keys, so extra keys never add speed. | Account | Requests per second | Requests in flight | |---|---|---| | Approved account | 10 | 5 | | Limited account (before review) | 3 | 2 | | Calls paid with live test calls | 1 | 1 | | Each +10 rps add-on | +10 | +5 | | Sandbox keys | 2 | 1 | | Scale | custom | custom | - Every response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`. - Over the per-second limit you get `429 rate_limited` with `Retry-After`. Too many requests at once gives `429 concurrency_limited`. **Neither is charged.** - You can give a key a **lower** limit and a **monthly credit cap** in the dashboard, for example to keep a staging key from spending your balance. - Need more? Buy the +10 rps add-on on the [pricing page](/pricing), or talk to us about Scale. --- # Instagram Audio API URL: https://api.klupt.io/docs/instagram-audio-api **Get a song or original audio from Instagram Reels**, **the reels that use it**, **what is trending**, and **search sounds** by name. ``` GET https://api.klupt.io/v1/audio/{audio} GET https://api.klupt.io/v1/audio/{audio}/reels GET https://api.klupt.io/v1/audio/trending GET https://api.klupt.io/v1/search/audio?q= ``` - `GET /v1/audio/{audio}`: A song or original audio - `GET /v1/audio/{audio}/reels`: Reels that use it - `GET /v1/audio/trending`: Trending audio - `GET /v1/search/audio?q=`: Find audio **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `audio` | path | Numeric audio id (from a reel's `audio.id` or an audio URL). | | `q` | query | search: a song, artist or sound name. | | `cursor` | query | `pagination.next_cursor` from the previous page. | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_audio_trending}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/audio/trending" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/audio/trending", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() for a in r.json()["data"]: print(a["title"], a["artist"], a["reel_count"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/audio/trending", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: trending } = await res.json(); ``` ## FAQ ### How do I find trending Instagram sounds with an API? Call `GET /v1/audio/trending`. Each audio has a title, artist, duration and `reel_count`; use `GET /v1/audio/{id}/reels` to see the reels using it. --- # Instagram Similar Accounts API URL: https://api.klupt.io/docs/instagram-similar-accounts-api **Get the accounts Instagram suggests as similar to a profile**: up to about 80 related creators, brands or competitors in one call. ``` GET https://api.klupt.io/v1/users/{user}/related ``` - `GET /v1/users/{user}/related`: Accounts similar to this one **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username (`natgeo`) or numeric user id. Private accounts answer `403 private_account` (free). | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_user_related}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/related" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/natgeo/related", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() lookalikes = [u["username"] for u in r.json()["data"]] ``` ```javascript const res = await fetch("https://api.klupt.io/v1/users/natgeo/related", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: related } = await res.json(); ``` ## FAQ ### How do I find similar Instagram accounts? Call `GET /v1/users/{username}/related`. It returns the accounts Instagram itself suggests next to that profile. --- # Instagram Account Details API URL: https://api.klupt.io/docs/instagram-account-details-api **Get Instagram's "About this account" details**: the month the account joined, the country it is based in, whether it is verified, and how many times it changed its username. Useful for spotting fake or recycled accounts. ``` GET https://api.klupt.io/v1/users/{user}/account-details ``` - `GET /v1/users/{user}/account-details`: "About this account" details **Cost:** 1 credit per successful call (0.5 from cache). Failed calls and private accounts are free. ## Parameters | Parameter | In | Description | |---|---|---| | `user` | path | Username (`natgeo`) or numeric user id. Private accounts answer `403 private_account` (free). | | `fresh` | query | `true` skips the cache (full price). | ## Response ```json {{SAMPLE_user_details}} ``` ## Examples ```bash curl "https://api.klupt.io/v1/users/natgeo/account-details" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/users/natgeo/account-details", headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) r.raise_for_status() d = r.json()["data"] print(d["joined"], d["country"], d["former_username_count"]) ``` ```javascript const res = await fetch("https://api.klupt.io/v1/users/natgeo/account-details", { headers: { "X-Api-Key": process.env.KLUPT_API_KEY }, }); const { data: details } = await res.json(); ``` ## FAQ ### How do I see when an Instagram account was created? Call `GET /v1/users/{username}/account-details`: `joined` is the month and year Instagram shows (for example "June 2017"). --- # Instagram URL Resolver URL: https://api.klupt.io/docs/instagram-url-resolver **Turn any Instagram link into its type and ids, free.** Profiles, posts, reels, stories, highlights, hashtags, places and audio links are all recognised, and a post shortcode is converted to its numeric media id. The answer also tells you which Klupt API route to call next. ``` GET https://api.klupt.io/v1/resolve?url={instagram_url} ``` **Cost:** free (no data is fetched). Needs an API key. ## Response ```json { "data": { "type": "post", "shortcode": "C9xYzAbCdEf", "id": "3500000000000000123", "api": "/v1/posts/C9xYzAbCdEf" }, "meta": { "request_id": "req_…", "credits_charged": 0 } } ``` `type` is one of `user`, `post`, `story`, `highlight`, `hashtag`, `place` or `audio`. ## Examples ```bash curl -G "https://api.klupt.io/v1/resolve" --data-urlencode "url=https://www.instagram.com/reel/C9xYzAbCdEf/" -H "X-Api-Key: $KLUPT_API_KEY" ``` ```python import os, requests r = requests.get("https://api.klupt.io/v1/resolve", params={"url": "https://www.instagram.com/p/C9xYzAbCdEf/"}, headers={"X-Api-Key": os.environ["KLUPT_API_KEY"]}, timeout=30) print(r.json()["data"]["id"]) ``` ```javascript const url = new URL("https://api.klupt.io/v1/resolve"); url.searchParams.set("url", "https://www.instagram.com/explore/tags/coffee/"); const { data } = await (await fetch(url, { headers: { "X-Api-Key": process.env.KLUPT_API_KEY } })).json(); ``` ## FAQ ### How do I convert an Instagram shortcode to a media id? Call `GET /v1/resolve?url=` with the post link: `id` is the numeric media id. The conversion is exact and costs nothing. --- # Acceptable use URL: https://api.klupt.io/docs/acceptable-use The Klupt API covers **public accounts and publicly visible data only**. It is for brands, agencies, researchers and product teams: competitor and brand monitoring, creator research, agency reporting, academic and market research, and features in your own product. You may not use it to: - stalk, harass, threaten, intimidate or dox anyone, or monitor a private individual who would not reasonably expect it; - build, enrich, sell or share databases of personal data, or resell raw API output as a data product of its own; - send spam or unsolicited messages to the accounts you look up; - try to reach private accounts or non-public data, share keys outside your organisation, or get around rate limits or credit charges; - break any law that applies to you, including data-protection law (GDPR, CCPA and similar). You are the controller of the data you collect and need your own lawful basis. We review usage and suspend accounts that break these rules. Looking someone up never notifies them. Report abuse to [api@klupt.io](mailto:api@klupt.io). Full terms: [API terms](/terms). --- # Pricing URL: https://api.klupt.io/pricing **1 credit per successful request; a following page (up to about 200 accounts, newest first) costs 2.** The base price is **$2.00 per 1,000 credits**. Failed calls and our own rate-limit answers are free, a cached answer costs half, and every response shows what it cost in `meta.credits_charged`. The sandbox is unlimited and costs nothing. ## Prepaid credits The main way to buy. Credits never expire. | Pack | Price | Per 1,000 | |---|---|---| | 10,000 credits | $20 | $2.00 | | 27,000 credits | $50 | $1.85 | | 120,000 credits | $200 | $1.67 | | 330,000 credits | $500 | $1.52 | Turn on **auto top-up** to recharge a pack automatically when your balance drops below a threshold you choose. Pay in USDT and get **10% bonus credits**. ## Monthly plans Save money on steady volume. Plan credits reset each month (no rollover); usage above the plan draws from your prepaid balance. | Plan | Price | Credits a month | Per 1,000 | |---|---|---|---| | Starter | $49/month | 30,000 credits | $1.63 | | Growth | $199/month | 150,000 credits | $1.33 | ## Scale From **$1.00 per 1,000 requests** for high volume, with custom rate limits. Tell us what you need with the form on this page. ## Add-ons | Add-on | Price | What it does | |---|---|---| | +10 requests / second | $49/month | Adds 10 requests per second and 5 concurrent requests to your account (shared by all its keys). | | Priority support | $99/month | Replies within one business day from the engineers who run the API. | ## What each call costs | Endpoint | Credits per successful call | From cache | |---|---|---| | Following page (up to about 200 accounts, newest first) | 2 | 1 | | Every other data endpoint (29 routes: profiles, followers, posts, reels, stories, highlights, comments, likers, hashtags, places, audio, search) | 1 | 0.5 | | account, status, resolve | 0 | 0 | ## Price per 1,000 rows List endpoints return many accounts per request, so compare list data per row: | List | Rows per request | Credits per request | Per 1,000 rows (base price) | Per 1,000 rows (largest pack) | |---|---|---|---|---| | Following (about 200 per page, newest first) | 200 | 2 | $0.020 | $0.015 | | Followers (25 per page, newest first) | 25 | 1 | $0.080 | $0.061 | | Likers (about 100 per page) | 100 | 1 | $0.020 | $0.015 | | Comments (about 15 per page) | 15 | 1 | $0.13 | $0.10 | | Posts (about 12 per page) | 12 | 1 | $0.17 | $0.13 | Approved accounts get 10 requests per second (3 before review). See [rate limits](/docs/rate-limits). ## FAQ ### How much does the Klupt API cost? $2.00 per 1,000 credits with prepaid packs, less with larger packs or a monthly plan. Most calls cost 1 credit; a following page of up to about 200 accounts costs 2. Failed calls are free and cached answers cost half. ### Do credits expire? No. Prepaid credits never expire. Monthly plan credits reset each billing period. ### Am I charged for errors? No. Only successful calls cost credits. Errors, private accounts, missing accounts and our own 429 answers are free. ### Can I test before paying? Yes. Sandbox keys are unlimited and return realistic sample data in the live schema. Business accounts that pass our checks also get 25 live test calls when they confirm their email, and 50 more when approved. ### Why can I only buy the smaller packs at first? Accounts that pass our automatic checks can buy the $20 and $50 packs at once. Larger packs, monthly plans, add-ons and higher rate limits open after a person reviews the account, usually within one business day. --- # Changelog URL: https://api.klupt.io/changelog Within `/v1` we only add endpoints, fields and error codes: nothing is renamed or removed. Write your client to ignore fields it does not know. Breaking changes ship as `/v2`, announced by email. ## 2026-11-29: accounts and access - Business sign-up with automatic checks, limited access at once, approval to scale. - Unlimited sandbox from email confirmation; a **Try it** panel on every endpoint page. - Live test calls: 25 on email confirmation, 50 on approval. - Price per 1,000 rows on the pricing page. ## 2026-11-29: v1 launch - Profile by username, by id, or either: `/v1/users/by-username/{username}`, `/v1/users/by-id/{id}`, `/v1/users/{user}`. - Followers and following newest first, with `meta.order` and `strict_order`. - Recent posts and user search. - Sandbox keys (`kd_test_`) with sample data. - Prepaid credits, monthly plans, auto top-up, per-key IP allowlists and limits. --- # Klupt API terms URL: https://api.klupt.io/terms These terms add to the [Klupt terms and conditions](https://klupt.io/terms-and-conditions) and [privacy policy](https://klupt.io/privacy-policy), and apply to your use of the Klupt API and its dashboard. ## The service - The API returns data that Instagram makes publicly visible about public accounts. It never covers private accounts, never needs an Instagram login from you, and never notifies the accounts you look up. - We do not guarantee that every list is complete: a list call can occasionally miss a row, and Instagram does not share follow dates. Do not treat a missing row as proof that someone unfollowed. - We may change prices with 30 days' notice. Credits you already bought keep their value. ## Acceptable use Your use must follow the [acceptable use policy](/docs/acceptable-use). We may suspend or close an account that breaks it, with or without notice; unused prepaid credits on an account closed for abuse are not refunded. ## Billing - Only successful calls are charged, at the prices on the pricing page (1 credit; 2 for a following page). Failed calls and our own rate-limit answers are free; cached answers cost half. - Prepaid credits do not expire. Plans renew monthly until cancelled from the billing portal, and plan credits do not roll over. - Card payments are processed by Stripe. Auto top-up charges your saved card only while you keep it turned on. ## Your data We keep your email, billing records, an audit log of account changes, and request logs (endpoint, status, the username or id you asked for) for 90 days. Instagram data is kept only as long as its cache lifetime. ## Availability and liability The API is provided as is, without a guaranteed uptime unless agreed in a Scale contract. Our liability is limited to the amount you paid us in the three months before the claim.