Instagram Post Data API: Read Likes, Comments and Caption by URL

Published · 4 min read

Instagram Post Data API: Read Likes, Comments and Caption by URL

An Instagram post data API lets you pass the URL of a public post and get back its likes, comments count and caption as JSON. With SocialLens (sociallens.dev) it is one request, GET https://api.sociallens.dev/v1/post?platform=instagram&url=<post URL>, and it costs 1 credit per read.

The request

You need an API key (it starts with sk_live_) and the URL of a public Instagram post. Send the key as a Bearer token:

curl "https://api.sociallens.dev/v1/post?platform=instagram&url=https://www.instagram.com/p/Df-NlR0PjmN/" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

The base URL is https://api.sociallens.dev/v1. The request shape is the same on the other eight networks SocialLens reads: you change platform and url, nothing else.

The response

This is a real read of a public NASA photo post, made on November 30, 2026 (the caption is shortened here):

{
  "exists": true,
  "id": "Df-NlR0PjmN",
  "url": "https://www.instagram.com/p/Df-NlR0PjmN/",
  "platform": "instagram",
  "author": {
    "username": "nasa",
    "name": "NASA",
    "verified": true
  },
  "caption": "No such thing as \"too much glitter\" ...",
  "published_at": "2026-11-20T18:11:14Z",
  "likes": 778000,
  "views": null,
  "comments": 2499,
  "shares": null,
  "is_exact": true,
  "likes_hidden": false,
  "fetched_at": "2026-11-30T14:37:23Z"
}

What each field means

/post reads one post, /profile-posts lists many

Two routes cover most post work. /post reads one post, identified by its URL, which is what this guide shows. /profile-posts lists many posts from a profile, which is the route to use when you do not yet know which posts you want. A common pattern is to list with /profile-posts and then re-read specific posts with /post when you need a fresh number for one of them.

What it does not do

When another route is the better fit

If you need one profile's recent posts instead of a single post, use /profile-posts. If you only need an account's follower count, see the Instagram follower count API guide. For a wider comparison of Instagram data options, read best Instagram data API. If you want the same metrics across several networks in one shape, the unified social media data API guide explains how.

On scope: SocialLens is built for small and self-serve use, such as a developer, a small agency or a founder who wants a few thousand reads without a sales call. If you need audience demographics, fraud scoring, creator-discovery databases or a contracted enterprise SLA, a platform like Modash (influencer analytics) or a managed data provider such as Data365 or EnsembleData may fit better, and you should check their current terms.

Cost

Each read costs 1 credit. You get 250 free reads with no card, credits never expire, and paid packs start from about US$19. See pricing for the current packs. Reads that return "exists": false still count as a read, so validate URLs before you send them in bulk.

FAQ

Can I get the text of the comments? /post returns the comment count (comments), not the comment text. This guide covers the count only.

Why is views null on some posts? Instagram photos have no view count, so views is null. Video posts return a number.

What happens if the post was deleted or is private? You get HTTP 200 with "exists": false. Branch on that field instead of relying on error codes.

Can I find posts by hashtag? No. SocialLens has no keyword or hashtag search. You supply the URL, or list posts from a profile with /profile-posts.

Is there a free way to test it? Yes, 250 free reads with no card, enough to test several dozen URLs across your own use case.

Last updated and data verified on November 30, 2026.

Run these requests yourself

Every example on this page is a real call to the SocialLens API. A new account starts with 250 free reads, no card needed, and a read that fails is never charged.

Keep reading