{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper",
    "description": "One Instagram scraper for everything — profiles, contacts (emails & phones), posts, reels, comments, likers, followers, following, tagged, stories, highlights, hashtags, locations & search. No code: paste usernames or URLs, export to Excel, CSV, JSON or API. Public data needs no login.",
    "version": "2.0",
    "x-build-id": "t4GQNAklL6ecHl9fy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vortex_data~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vortex_data-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/vortex_data~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vortex_data-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/vortex_data~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vortex_data-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",
        "properties": {
          "resultsType": {
            "title": "What do you want to scrape?",
            "enum": [
              "details",
              "contacts",
              "posts",
              "reels",
              "postDetail",
              "comments",
              "likes",
              "followers",
              "following",
              "tagged",
              "stories",
              "highlights",
              "hashtag",
              "location",
              "search"
            ],
            "type": "string",
            "description": "The mode decides how the lines below are read. Modes marked 🔑 need your Instagram login cookie (add it further down). Lines that don't fit the chosen mode are skipped with a note.",
            "default": "posts"
          },
          "directUrls": {
            "title": "Instagram URLs or usernames",
            "maxItems": 1000,
            "uniqueItems": true,
            "type": "array",
            "description": "One input per line, read according to the mode above:\n\n- **Profile modes** (details, contacts, posts, reels, followers, following, tagged, stories, highlights): a username, `@handle`, or `instagram.com/{username}/`.\n- **Post modes** (post/reel detail, comments, likers): a post URL — `instagram.com/p/{code}/`, `/reel/{code}/`, `/tv/{code}/`.\n- **Hashtag**: a `#tag`, a plain word, or `instagram.com/explore/tags/{tag}/`.\n- **Location**: a location id or `instagram.com/explore/locations/{id}/`.\n- **Search**: leave empty and use the Search field below.\n\nMixed / irrelevant lines for the current mode are skipped with a log note.",
            "items": {
              "type": "string"
            }
          },
          "resultsLimit": {
            "title": "Results per input",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many records to get from each line you paste (each username, post, hashtag, and so on). Your total is simply this × the number of lines — e.g. 100 × 2 profiles = up to 200 records. Profiles with fewer posts, or short comment/follower lists, return whatever exists.",
            "default": 100
          },
          "search": {
            "title": "Search query",
            "type": "string",
            "description": "Used only in **Search** mode. What to look for on Instagram (a keyword, name, hashtag or place). Needs your Instagram cookie."
          },
          "searchType": {
            "title": "Search for",
            "enum": [
              "hashtag",
              "profile",
              "place"
            ],
            "type": "string",
            "description": "What the search should return.",
            "default": "hashtag"
          },
          "searchLimit": {
            "title": "Search matches",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many search matches to scrape.",
            "default": 10
          },
          "sessionCookies": {
            "title": "Instagram login cookie",
            "type": "string",
            "description": "Needed for every 🔑 mode (comments, likers, followers, following, tagged, stories, highlights, hashtag, location, search) and any private / login-limited page. Not needed for profile details, contacts, posts, reels or single post/reel detail.\n\nInstall the **EditThisCookie** (or Cookie-Editor) extension, log in to instagram.com, export your cookies, and paste them here — or paste your Cookie header directly, e.g. `sessionid=...; csrftoken=...; ds_user_id=...; mid=...`. Use only your own cookies — they are sensitive and work like a temporary password."
          },
          "proxyCountry": {
            "title": "Country you use Instagram from",
            "enum": [
              "",
              "US",
              "GB",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "PL",
              "SE",
              "UA",
              "TR",
              "CA",
              "BR",
              "MX",
              "AR",
              "AU",
              "IN",
              "ID",
              "JP",
              "KR",
              "AE",
              "SA",
              "ZA"
            ],
            "type": "string",
            "description": "Instagram watches **where** a session is used from. A cookie created in one country but used from another looks stolen — Instagram challenges it, and the run then reports your cookie as expired when it actually isn't.\n\nPick the country you normally open Instagram from, and the scraper will browse from there. Only matters when you paste a cookie above — without one, leave it on Automatic so the scraper can spread across the whole IP pool.\n\nAPI callers may pass any 2-letter country code.",
            "default": ""
          },
          "onlyPostsNewerThan": {
            "title": "Only newer than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^\\d+\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Optional lower date bound for posts/reels. The scraper stops paging once it reaches older posts.\n\nFormats: `2026-01-15`, `2026-01-15T10:00:00Z`, or `1 day` / `2 weeks` / `3 months` / `1 year`."
          },
          "onlyPostsOlderThan": {
            "title": "Only older than",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])(T[0-2]\\d:[0-5]\\d(:[0-5]\\d)?(\\.\\d+)?Z?)?$|^\\d+\\s*(minute|hour|day|week|month|year)s?$",
            "type": "string",
            "description": "Optional upper date bound. Posts newer than this are skipped. Combine with 'Only newer than' for a date window.\n\nFormats: `2026-01-15`, `2026-01-15T10:00:00Z`, or `1 day` / `2 weeks` / `3 months` / `1 year`."
          },
          "addParentData": {
            "title": "Add source info",
            "type": "boolean",
            "description": "Adds `dataSource` and parent fields (username, shortcode, tag, location id, highlight id). Handy when scraping many inputs into one dataset.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}