{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper — Profiles, Posts, Reels & Hashtags",
    "description": "Scrape Instagram profiles, posts, reels and hashtags with no browser. Get followers, likes, comments, video views, captions, hashtags, mentions, music and media URLs. Residential proxy recommended.",
    "version": "1.0",
    "x-build-id": "YdLQmAYTj6seB1vM3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dltik~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dltik-instagram-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/dltik~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dltik-instagram-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/dltik~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dltik-instagram-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode",
          "inputs"
        ],
        "properties": {
          "mode": {
            "title": "Scraping mode",
            "enum": [
              "profiles",
              "posts",
              "reels",
              "hashtags",
              "comments",
              "search"
            ],
            "type": "string",
            "description": "What to scrape from Instagram. 'profiles' returns the profile (with business email/phone, category, bio links) plus recent posts for each username. 'posts' returns full data for each post/reel URL or shortcode (tagged users, location, paid-partnership, carousel children). 'reels' returns a profile's reels (or a hashtag's reels). 'hashtags' returns top/recent posts for each hashtag. 'comments' returns the comments (and optional replies) of each post/reel. 'search' discovers users, hashtags or places matching each query string.",
            "default": "profiles"
          },
          "inputs": {
            "title": "Inputs",
            "type": "array",
            "description": "Usernames for 'profiles' and 'reels' (e.g. ['natgeo','nasa']), post/reel URLs or shortcodes for 'posts' and 'comments' (e.g. ['https://www.instagram.com/p/C1abcdEFghi/'] or ['C1abcdEFghi']), hashtag names for 'hashtags' (e.g. ['travel','food']), or free-text query strings for 'search' (e.g. ['coffee shop','nasa']). For 'reels' you may also pass a hashtag by prefixing '#'.",
            "items": {
              "type": "string"
            }
          },
          "commentsLimit": {
            "title": "Comments limit (comments mode)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of top-level comments to fetch per post in 'comments' mode. Each delivered comment is one billed result. Replies (when 'includeReplies' is on) are nested under their parent comment and are NOT billed separately. Ignored in other modes.",
            "default": 50
          },
          "includeReplies": {
            "title": "Include comment replies (comments mode)",
            "type": "boolean",
            "description": "When enabled in 'comments' mode, also fetch the threaded replies (child comments) of each top-level comment and nest them under its 'replies' field. This makes extra requests and consumes more proxy bandwidth. Ignored in other modes.",
            "default": false
          },
          "searchType": {
            "title": "Search type (search mode)",
            "enum": [
              "top",
              "user",
              "hashtag",
              "place"
            ],
            "type": "string",
            "description": "What to return in 'search' mode. 'top' returns a blended mix of users, hashtags and places. 'user' returns only user/account matches. 'hashtag' returns only hashtag matches. 'place' returns only location/place matches. Ignored in other modes.",
            "default": "top"
          },
          "onlyPostsNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "Keep only posts on or after this date (applies to 'profiles', 'reels' and 'hashtags' modes). Accepts an absolute date 'YYYY-MM-DD' (e.g. '2025-01-01') or a relative window like '7 days', '2 weeks', '3 months', '1 year'. Older posts are dropped and pagination stops early to save proxy bandwidth. Leave empty to disable."
          },
          "skipPinnedPosts": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "When enabled, drop posts that the account pinned to the top of its grid (applies to 'profiles', 'reels' and 'hashtags' modes). Useful when you only want the natural reverse-chronological feed.",
            "default": false
          },
          "maxResultsPerInput": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum posts/reels to return per input (per username or per hashtag). Ignored in 'posts' mode (one record per URL). Higher values paginate deeper and consume more residential-proxy bandwidth.",
            "default": 30
          },
          "customProxyUrl": {
            "title": "Custom proxy / unblocker URL (recommended)",
            "type": "string",
            "description": "STRONGLY RECOMMENDED for reliable results. This target edge-blocks the shared Apify residential pool (anti-bot challenge / login-wall). When set, this single premium-unblocker URL is used as the ONLY proxy (no rotation — the unblocker handles IPs + challenge solving). Format: http://user:pass@host:port. Works with Bright Data Web Unlocker, Oxylabs Web Unblocker, ScraperAPI (proxy mode), ZenRows. Leave empty to fall back to the Apify proxy below."
          },
          "proxyConfig": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Instagram blocks datacenter IPs, so a RESIDENTIAL proxy is strongly recommended: set {\"useApifyProxy\": true, \"apifyProxyGroups\": [\"RESIDENTIAL\"]}. Without it you will likely hit a login-wall and get an instructions record instead of data.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "sessionCookies": {
            "title": "Session cookies (optional)",
            "type": "array",
            "description": "Optional Instagram session cookies to raise rate limits and unlock more results. In Chrome DevTools -> Application -> Cookies on instagram.com, copy at least sessionid, csrftoken and ds_user_id. Format: [{\"name\": \"sessionid\", \"value\": \"...\"}, {\"name\": \"csrftoken\", \"value\": \"...\"}]. Leave empty to run unauthenticated (residential proxy then recommended).",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Cookie name",
                  "type": "string",
                  "description": "Cookie name (e.g. sessionid)"
                },
                "value": {
                  "title": "Cookie value",
                  "type": "string",
                  "description": "Cookie value"
                }
              }
            },
            "default": []
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}