> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape an Instagram profile or post

> Given an Instagram `username` (or `url`), returns the public profile as JSON: `username`, `full_name`, `biography`, `followers`, `following`, `posts_count`, `verified`, `private`, `avatar_url`, `external_urls` and `recent_posts` (shortcode, url, caption, thumbnail, media type). A post/reel URL returns that single post with its engagement instead. Instagram does not ship per-post counts on a profile page, so profile `recent_posts` carry no like/comment counts.



## OpenAPI

````yaml /api-reference/openapi.json post /social/instagram
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Three endpoints are
    documented here: page-source extraction, Google SERP scraping, and image
    fetch. All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /social/instagram:
    post:
      tags:
        - Plugins
      summary: Scrape an Instagram profile or post
      description: >-
        Given an Instagram `username` (or `url`), returns the public profile as
        JSON: `username`, `full_name`, `biography`, `followers`, `following`,
        `posts_count`, `verified`, `private`, `avatar_url`, `external_urls` and
        `recent_posts` (shortcode, url, caption, thumbnail, media type). A
        post/reel URL returns that single post with its engagement instead.
        Instagram does not ship per-post counts on a profile page, so profile
        `recent_posts` carry no like/comment counts.
      operationId: instagram_scrape_social_instagram_post
      parameters:
        - name: username
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Instagram username/handle, e.g. 'nasa' (with or without a leading
              @).
            title: Username
          description: >-
            Instagram username/handle, e.g. 'nasa' (with or without a leading
            @).
        - name: url
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              An instagram.com profile or post/reel URL (alternative to
              `username`).
            title: Url
          description: >-
            An instagram.com profile or post/reel URL (alternative to
            `username`).
        - name: proxy_country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Exit-IP country (ISO-2). Leave blank for a smart exit.
            title: Proxy Country
          description: Exit-IP country (ISO-2). Leave blank for a smart exit.
      responses:
        '200':
          description: JSON with a `data` object (profile or post).
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid parameters.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: Instagram login wall / gated - no public data returned.
        '504':
          description: Fetch timed out.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````