image

Let’s be honest: building your own Instagram scraper using Selenium or Puppeteer is a nightmare. The DOM changes constantly, IP bans are aggressive, and maintaining the infrastructure is a full-time job.

If you are a developer looking to analyze social sentiment, vet influencers, or archive content, you need raw JSON data, not a fragile headless browser script.

This guide breaks down how to programmatically fetch high-fidelity Instagram post data—including media URLs, captions, like lists, and comments—using the SteadyAPI Instagram Social endpoints.

Obtain API key

Get your API key


Prerequisites

To interact with these endpoints, you need an API Key.

Base URL: https://api.steadyapi.com

Authentication: Pass your key in the header: Authorization: Bearer {YOUR_AUTH_KEY}


1. The Core: Fetching Post Metadata

Endpoint: GET /v1/instagram/info
View Documentation: SteadyAPI Docs: Instagram Post Details

Everything starts with the shortcode. This is the alphanumeric string found in an Instagram URL (e.g., in instagram.com/p/DESoQn4RgAl/, the code is DESoQn4RgAl).

This endpoint returns the "ground truth" of the post: high-res media URLs (images/videos), the full caption, current engagement counts, and the owner's ID.

Example Request (Python)

import requests

url = "https://api.steadyapi.com/v1/instagram/info"
params = {
    "code": "DESoQn4RgAl" # The shortcode from the URL
}
headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

print(f"Caption: {data['body']['caption']}")
print(f"Likes: {data['body']['like_count']}")

Example Response

The API returns a clean JSON object containing specific media details. Note that media_url provides direct access to the CDN link.

{
  "meta": {
    "version": "v1.0",
    "status": 200,
    "shortcode": "DGTkEHfTEFE"
  },
  "body": {
    "id": "3572357542028525892",
    "shortcode": "DGTkEHfTEFE",
    "media_type": 8,
    "taken_at": 1740078226,
    "caption": "Martin Scorsese is set to direct a new crime thriller...",
    "like_count": 6426,
    "comment_count": 176,
    "media_url": "https://scontent-dfw5-1.cdninstagram.com/v/t51.75761-15/...",
    "user": {
      "id": "10630816462",
      "username": "filmseal",
      "full_name": "FilmSeal",
      "is_verified": true
    }
  }
}

Key Fields

  • code
    The shortcode identifier used as the primary key for Instagram post lookups

  • caption
    The full text caption of the Instagram post

  • like_count
    The total number of likes the post has received

  • comment_count
    The total number of comments on the post

  • media_url
    Direct access to the CDN-hosted image or video file

  • user
    Metadata about the post owner including username and verification status


2. The Conversation: Scraping Comments

Endpoint: GET /v1/instagram/comments
View Documentation: SteadyAPI Docs: Instagram Comments

Engagement numbers (comment_count) are vanity metrics. To understand sentiment, you need the actual text. This endpoint pulls the comment threads associated with a post.

Tip: This endpoint supports a pagination_token. If a post has thousands of comments, the response will include a token in the meta object. Pass that token in your next request to fetch the next batch.

Example Request

url = "https://api.steadyapi.com/v1/instagram/comments"
params = {
    "code": "DESoQn4RgAl"
    # "pagination_token": "..." # Use for page 2+
}

response = requests.get(url, headers=headers, params=params)
comments = response.json()['body']

for comment in comments:
    print(f"{comment['user']['username']}: {comment['text']}")

Example Response

{
  "meta": {
    "version": "v1.0",
    "pagination_token": "eyJjYWNoZWRfY29tbWVudHNfY3Vyc29yIjog..."
  },
  "body": [
    {
      "id": "18062927908813532",
      "text": "The departed meets goodfellas meets forgetting Sarah Marshall",
      "created_at": 1741887385,
      "like_count": 0,
      "user": {
        "id": "2207887249",
        "username": "pmayer988",
        "full_name": "Peter Mayer",
        "is_private": true
      }
    }
  ]
}

Key Fields

  • text
    The actual comment content used for sentiment or keyword analysis

  • pagination_token
    Used for fetching additional batches when posts contain large comment volumes

  • created_at
    The Unix timestamp of when the comment was posted

  • user.username
    The public username of the commenter

  • like_count
    The number of likes on an individual comment


3. The Audience: Fetching Likes

Endpoint: GET /v1/instagram/likes
View Documentation: SteadyAPI Docs: Instagram Likes

If you are building an influencer vetting tool, you need to know who liked a post to determine audience quality. Are the likers real people, or bot accounts with no profile pictures? This endpoint provides the list of users who liked the media.

Example Request

url = "https://api.steadyapi.com/v1/instagram/likes"
params = {
    "code": "DESoQn4RgAl"
}

response = requests.get(url, headers=headers, params=params)
likers = response.json()['body']

Example Response

{
  "meta": {
    "total_users": 6426,
    "pagination_token": "ZWI4MDhlNDY5ODgwNDEwOWJhNmM0ZmM0YTQ4..."
  },
  "body": [
    {
      "id": "46054680327",
      "username": "asport2008",
      "full_name": "",
      "is_private": false,
      "is_verified": false
    }
  ]
}

Key Fields

  • total_users
    The total number of accounts that liked the post

  • username
    The handle of the user who liked the post

  • is_private
    Indicates whether the liker account is private

  • is_verified
    Indicates whether the liker account is officially verified

  • pagination_token
    Used to retrieve more liker accounts beyond the first page


Real-World Use Cases

Why use these endpoints instead of just viewing the app?

Sentiment Analysis Pipelines:
By feeding the JSON output from /comments directly into an NLP library (like NLTK or OpenAI), brands can automatically categorize feedback on product launches as Positive, Negative, or Neutral without manual reading.

Influencer Audit Tools:
Agencies use the /likes endpoint to cross-reference users. If a post has 10,000 likes but 90% of the users returned have profile_pic_url missing or suspicious usernames, the influencer may be buying engagement.

Content Archival:
The /info endpoint returns the high-quality, direct CDN link (media_url). This allows developers to download and back up images and videos programmatically, ensuring content isn't lost if a post is deleted.


Summary

The SteadyAPI Instagram endpoints provide a stable, JSON-based method to extract data that is usually locked behind a login screen or complex UI. By using the code parameter as your primary key, you can deep-dive into any public post to retrieve metadata, user interactions, and media assets instantly.

Learn more or explore other endpoints:
SteadyAPI Stock and Options Data API

How to Read TikTok Video Comments Using SteadyAPI Oct 05, 2026

How to Read TikTok Video Comments Using SteadyAPI

Read TikTok comments 20 at a time. Video 7106594312292453675 has 1269 comments. The next cursor is the string 20.

How to Get a Property Estimate Using SteadyAPI Oct 14, 2026

How to Get a Property Estimate Using SteadyAPI

Current and historical value for one property id. The optional bounds are calendar dates, not year counts.

How to Find Vehicles for Sale Using SteadyAPI Oct 11, 2026

How to Find Vehicles for Sale Using SteadyAPI

Search vehicle listings by make, model, and ZIP. Price and mileage on each row are numbers.

How to Estimate Vehicle Depreciation Using SteadyAPI Oct 11, 2026

How to Estimate Vehicle Depreciation Using SteadyAPI

Project trade-in value across years from a vehicle id, mileage, and condition. Mileage here is an integer.