{
  "openapi": "3.0.1",
  "info": {
    "title": "Meta Instagram Scraper API — Profiles, Posts, Reels, Comments",
    "description": "Instagram scraper and unofficial Instagram API: profiles, posts, reels, comments, likes, followers, tagged, stories, highlights, hashtags, locations, search and bio emails — 15 modes. Posts add carousel slides, media sizes, reel audio and alt text. No login for 8 modes. JSON/CSV/Excel from $0.90/1k.",
    "version": "1.2",
    "x-build-id": "AlkviYyPnewoz5cV5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pro100chok~instagram-scraper-all-in-one/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pro100chok-instagram-scraper-all-in-one",
        "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/pro100chok~instagram-scraper-all-in-one/runs": {
      "post": {
        "operationId": "runs-sync-pro100chok-instagram-scraper-all-in-one",
        "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/pro100chok~instagram-scraper-all-in-one/run-sync": {
      "post": {
        "operationId": "run-sync-pro100chok-instagram-scraper-all-in-one",
        "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": [
          "scrapeType"
        ],
        "properties": {
          "scrapeType": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "profile",
              "contacts",
              "posts",
              "reels",
              "post",
              "comments",
              "likes",
              "followers",
              "following",
              "tagged",
              "stories",
              "highlights",
              "hashtag",
              "location",
              "search"
            ],
            "type": "string",
            "description": "Choose a mode. Modes marked 🔑 need an Instagram login cookie (see the Login section below). Comments and hashtag return their first page without a cookie and go deeper with one; location needs one (Instagram stopped showing location posts to logged-out visitors). Everything else works fully without login. Start here — the mode decides which input fields below are used.",
            "default": "posts"
          },
          "directUrls": {
            "title": "🔗 Instagram URLs or usernames",
            "type": "array",
            "description": "For Scrape Type: all modes except 🔎 Search — users / hashtags / places 🔑. One per line. Accepts what the chosen mode expects:\n• Profile modes (details, posts, reels, followers, following, tagged, stories, highlights) → `https://www.instagram.com/nasa/`, `@nasa` or just `nasa`\n• Post modes (post detail, comments, likes) → `https://www.instagram.com/p/SHORTCODE/` or `/reel/SHORTCODE/`\n• Hashtag mode → `https://www.instagram.com/explore/tags/nature/` or `#nature` or `nature`\n• Location mode → `https://www.instagram.com/explore/locations/212988663/` or the numeric id\nLeave empty when using Search mode. Input is matched to the mode automatically: a bare word is read as a hashtag in hashtag mode, a post URL in a profile mode is resolved to its author, and a profile in a post/comment/likes mode falls back to that profile's latest posts. Nothing here can fail the run.",
            "items": {
              "type": "string"
            }
          },
          "search": {
            "title": "🔎 Search query",
            "type": "string",
            "description": "For Scrape Type: 🔎 Search — users / hashtags / places 🔑. Used only in 🔎 Search mode. Free text, e.g. `nasa`, `coffee`, `new york`."
          },
          "resultsLimit": {
            "title": "📊 Max results per input",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper bound of records collected for each URL/username/hashtag/location. Pagination stops automatically when the source is exhausted.",
            "default": 100
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "all",
              "user",
              "hashtag",
              "place"
            ],
            "type": "string",
            "description": "Limit search results to one entity type, or return all.",
            "default": "all"
          },
          "sessionCookie": {
            "title": "🔑 Instagram login cookie",
            "type": "string",
            "description": "REQUIRED for: ❤️ likes, 👥 followers, ➡️ following, 🏷️ tagged, 📸 stories, 🌟 highlights, 🔎 search and 📍 location. RECOMMENDED for 💬 comments and #️⃣ hashtag: without a cookie Instagram serves only the first page (the newest comments of a post, the first page of hashtag posts — and it hides its biggest hashtags entirely). Profile, contacts, posts, reels and post-detail modes do NOT need it.\n\nHow to get your cookies:\n1. Install the EditThisCookie v3 Chrome extension.\n2. Log into instagram.com in your browser.\n3. Click the EditThisCookie icon and export the cookies (the 5th button at the top of the cookie editor). This copies them as JSON.\n4. Paste the exported JSON into this field.\n\nThe field also accepts just your `sessionid` value or a full `name=value; name=value` cookie string. Stored encrypted.\n\nCookie expiry: Instagram cookies usually last a few days to a few weeks. If a previously working run reports invalid authentication, re-export fresh cookies and paste them again."
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many times to retry a failed request before giving up on it.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}