Klupt Instagram API

v1.0.1
io.klupt/instagram Checked 4 days ago Published 5 days ago

Instagram followers and following in real newest-first order, plus profiles, posts and reels.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_profile Instagram profile

Public Instagram profile for a username or numeric user id: full name, bio, external link, category, verified and private flags, follower / following / post counts, profile picture and the numeric user id. Use it first to check an account exists and is public. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_following Following, newest first

Accounts that a public Instagram account follows, in Instagram's real newest-first order: position 1 is the account they followed most recently. Use this for "who did @user recently follow", "new follows" or tracking follows over time. Up to about 200 accounts per page; meta.order is "newest_first" when the order is guaranteed. Instagram does not share follow dates, and a page can occasionally be one row short, so never treat a missing row as an unfollow. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 2 credits per page (nothing from cache, o…

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.
strict_orderbooleantrue: fail with order_unavailable (free) instead of returning a page that is not newest first. Default false.

get_followers Followers, newest first

Accounts that follow a public Instagram account, newest follower first: position 1 is the most recent follower. Use this for "who started following @user recently" or new-follower checks. Up to 25 accounts per page; meta.order is "newest_first" when the order is guaranteed. Instagram does not share follow dates. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.
strict_orderbooleantrue: fail with order_unavailable (free) instead of returning a page that is not newest first. Default false.

get_posts Recent posts

Posts of a public Instagram account, newest first, about 12 per page: shortcode, URL, date, type, caption, like / comment / view counts and thumbnail. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

search_users Search accounts

Find Instagram accounts by name or username (up to about 40 results). Use it when the user gives a name rather than an exact username. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
q *stringName or username to search for.
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_reels Reels

Reels of a public Instagram account, newest first (sort "recent") or most viewed (sort "views"), about 12 per page, with view counts and video URLs. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.
sortstringOrder: recent or views (default recent).

get_tagged_posts Tagged posts

Posts in which a public Instagram account is tagged, about 12 per page. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_reposts Reposts

Posts a public Instagram account reposted, about 12 per page. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_stories Live stories

Stories a public Instagram account posted in the last 24 hours, with media URLs and expiry times. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_highlights Story highlights

Story highlights of a public Instagram account (id, title, item count, cover). Use get_highlight_stories for the stories inside one. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_account_details Account details

When an Instagram account joined (month and year), its country and how many times it changed username. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_similar_accounts Similar accounts

Accounts Instagram considers similar to this one (up to about 80). Useful for competitor and influencer discovery. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
user *stringNumeric user id (cheapest, e.g. "25025320") or Instagram username (e.g. "instagram"). All digits = an id; write "@12345" for a username made only of digits. A username we have not seen in 7 days may c…
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_post_stats Post stats (batch)

Like, comment and view counts for 1 to 20 posts in one call. Pass shortcodes or ids, comma-separated, in ids. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
ids *string1 to 20 posts, comma-separated (shortcodes or ids).
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_post One post or reel

One Instagram post or reel by shortcode, numeric id or instagram.com URL: caption, date, counts, media URLs, owner, location and audio. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
post *stringPost shortcode, numeric post id, or an instagram.com/p|reel URL (URL-encoded).
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_comments Comments

Comments on an Instagram post, top first (sort "top") or newest first (sort "newest"), about 15 per page. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
post *stringPost shortcode, numeric post id, or an instagram.com/p|reel URL (URL-encoded).
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.
sortstringOrder: top or newest (default top).

get_post_likers Post likers

Accounts that liked an Instagram post, about 100 per page. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
post *stringPost shortcode, numeric post id, or an instagram.com/p|reel URL (URL-encoded).
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_comment_replies Comment replies

Replies to a comment. Pass the comment id and the post it belongs to. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
comment *stringNumeric comment id.
post *stringThe post the comment belongs to (shortcode or id).
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_comment_likers Comment likers

Accounts that liked a comment. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
comment *stringNumeric comment id.
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_story One story

One Instagram story by numeric id. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
story *stringNumeric story id.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_highlight_stories Highlight stories

The stories inside one story highlight (ids come from get_highlights). Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
highlight *stringNumeric highlight id.
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

search_hashtags Search hashtags

Find Instagram hashtags matching a word, with post counts. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
q *stringWhat to search for (1 to 64 characters).
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

search_places Search places

Find Instagram places (locations) by name, or near a point with lat and lng. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.
latnumberLatitude (with lng: places near a point).
lngnumberLongitude.
qstringWhat to search for (1 to 64 characters).

search_audio Search audio

Find songs and original audio used in Reels. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
q *stringWhat to search for (1 to 64 characters).
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_hashtag Hashtag

One Instagram hashtag and its post count. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
tag *stringHashtag, with or without #.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_hashtag_posts Hashtag posts

Top posts for an Instagram hashtag. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
tag *stringHashtag, with or without #.
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_place Place

One Instagram place: name, category, address, city, coordinates, phone and website. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
place *stringNumeric place (location) id.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_place_posts Place posts

Top (sort "top") or most recent (sort "recent") posts tagged at an Instagram place. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
place *stringNumeric place (location) id.
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.
sortstringOrder: top or recent (default top).

get_audio Audio

One song or original audio: title, artist, duration and how many reels use it. Costs 1 credit (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
audio *stringNumeric audio id.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

get_audio_reels Reels using an audio

Reels that use a given song or original audio. Paginate by passing pagination.next_cursor back as cursor while pagination.has_more is true. Costs 1 credit per page (nothing from cache, on errors or with a kd_test_ sandbox key).

ParameterTypeDescription
audio *stringNumeric audio id.
cursorstringpagination.next_cursor from the previous page. Leave out for the first page.
freshbooleantrue skips the cache and fetches live data (full price). Default false.

resolve_instagram_url Resolve an Instagram URL

Turn any instagram.com link (profile, post, reel, story, highlight, hashtag, place or audio) into its type, ids and the tool to call next. Parsed locally: free, no credits.

ParameterTypeDescription
url *stringAn instagram.com URL.

get_balance Klupt API balance

Your Klupt API plan, credit balance, rate limits and this key's usage this month. Free.