{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper: Profiles, Posts, Reels, Comments & Hashtags",
    "description": "Scrape Instagram profiles, posts, reels, tagged posts, followers, comments and replies, hashtags, places and highlights. Real-time, no login, clean JSON, auto pagination. Pay only for results.",
    "version": "1.0",
    "x-build-id": "VRiKyuyU47c7kppLb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapysocial~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapysocial-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/scrapysocial~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapysocial-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/scrapysocial~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapysocial-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": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "What to scrape",
            "enum": [
              "search-users",
              "search-posts",
              "user-info",
              "user-posts",
              "user-reels",
              "user-tagged",
              "user-followers",
              "user-followings",
              "user-similar",
              "user-highlights",
              "user-reposts",
              "post-detail",
              "post-comments",
              "post-comment-replies",
              "hashtag-info",
              "hashtag-posts",
              "search-hashtags",
              "place-search",
              "place-info",
              "place-posts",
              "highlight-stories"
            ],
            "type": "string",
            "description": "Pick the Instagram data you want. Then fill only the fields that endpoint uses (each field says which endpoints use it). Full list with descriptions: see the README tab.",
            "default": "user-posts"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Keyword or hashtag including # (e.g. `#balisunrise`).<br><br><b>Used by:</b> Search Users, Search Posts, Search Hashtags, Place Search. <b>Required by:</b> Search Users, Search Posts, Search Hashtags, Place Search. <b>Example:</b> <code>jokowi</code>"
          },
          "cursor": {
            "title": "Cursor",
            "type": "string",
            "description": "Pagination cursor from the previous response (base64url). Send back unchanged. Omit on the first page.<br><br><b>Used by:</b> Search Posts, User Posts, User Reels, User Tagged Posts, User Followers, User Followings +5 more."
          },
          "count": {
            "title": "Count",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Page size for subsequent pages.<br><br><b>Used by:</b> Search Posts, User Posts, User Reels, User Tagged Posts, User Followers, User Followings +3 more. <b>Example:</b> <code>12</code>"
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Instagram username without @. Send this or `userId`.<br><br><b>Used by:</b> User Info, User Posts, User Reels, User Tagged Posts, User Followers, User Followings +3 more. <b>Required by:</b> User Posts. <b>Example:</b> <code>jokowi</code>"
          },
          "userId": {
            "title": "User ID",
            "type": "string",
            "description": "Numeric Instagram user id. Optional when `username` is sent (resolved via search).<br><br><b>Used by:</b> User Info, User Reels, User Tagged Posts, User Followers, User Followings, Similar Users +2 more."
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Optional filter inside the following list.<br><br><b>Used by:</b> User Followings."
          },
          "postId": {
            "title": "Post ID",
            "type": "string",
            "description": "Media id: numeric pk, shortcode from /p/{code}/ (e.g. DdaVv2Nysh8), or full Instagram post/reel/tv URL.<br><br><b>Used by:</b> Post Detail, Post Comments, Comment Replies. <b>Required by:</b> Post Detail, Post Comments, Comment Replies. <b>Example:</b> <code>DdaVv2Nysh8</code>"
          },
          "commentId": {
            "title": "Comment ID",
            "type": "string",
            "description": "Parent comment id (`pk`).<br><br><b>Used by:</b> Comment Replies. <b>Required by:</b> Comment Replies. <b>Example:</b> <code>17952895659124454</code>"
          },
          "name": {
            "title": "Name",
            "type": "string",
            "description": "Hashtag without #.<br><br><b>Used by:</b> Hashtag Info, Hashtag Posts. <b>Required by:</b> Hashtag Info, Hashtag Posts. <b>Example:</b> <code>balisunrise</code>"
          },
          "locationId": {
            "title": "Location ID",
            "type": "string",
            "description": "Instagram location id.<br><br><b>Used by:</b> Place Info, Place Posts. <b>Required by:</b> Place Info, Place Posts. <b>Example:</b> <code>269539800619818</code>"
          },
          "tab": {
            "title": "Tab",
            "enum": [
              "recent",
              "ranked",
              "top"
            ],
            "type": "string",
            "description": "Location tab.<br><br><b>Used by:</b> Place Posts."
          },
          "highlightId": {
            "title": "Highlight ID",
            "type": "string",
            "description": "Highlight id from User Highlights (`highlight:123…` or numeric).<br><br><b>Used by:</b> Highlight Stories. <b>Required by:</b> Highlight Stories. <b>Example:</b> <code>highlight:18146604370450952</code>"
          },
          "maxItems": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop paginating a query after this many results. Each saved result is one billable \"result-item\" event.",
            "default": 100
          },
          "maxPages": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper bound on API pages fetched per query (a page is usually 10–50 results).",
            "default": 10
          },
          "batch": {
            "title": "Batch (many queries in one run)",
            "type": "array",
            "description": "Optional JSON array. Each object is one query for the selected endpoint; its keys override the form fields above. Example: <code>[{\"username\":\"natgeo\"},{\"username\":\"nasa\"}]</code>"
          },
          "splitItems": {
            "title": "One row per result",
            "type": "boolean",
            "description": "On (recommended): every post/user/comment is its own dataset row. Off: one row per API page (the list stays nested). Billing is per result either way.",
            "default": true
          },
          "concurrency": {
            "title": "Parallel queries",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many batch queries run at the same time.",
            "default": 3
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}