{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper",
    "description": "Fast no-login Instagram scraper. Extract profiles, posts, reels, comments, hashtags, locations, tagged feeds and audio reels. Paste URLs or search by keyword — clean structured JSON. Works on any post age via 5-tier HTML fallback. Date filter, dedup, parallel race, residential proxy.",
    "version": "1.0",
    "x-build-id": "TaS29VJuwczCXdtOo"
  },
  "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": {
          "directUrls": {
            "title": "1️⃣ Paste Instagram URLs here",
            "uniqueItems": true,
            "type": "array",
            "description": "Paste exact Instagram URLs here. This is the best place to start.\n\n**No cookies needed in normal Apify runs**\n- 👤 Public profile: `instagram.com/{username}/` — choose Posts, Reels, or Details\n- 🖼️ Public post: `instagram.com/p/{shortcode}/` — choose Posts, Details, or Comments\n- 🎞️ Public reel: `instagram.com/reel/{shortcode}/` — choose Reels, Details, or Comments\n- 🎵 Audio page: `instagram.com/reels/audio/{audio_id}/` — choose Posts/Reels or Details\n\n**Cookies required on Apify**\n- 🔎 Keyword Search — use the Search field below and paste cookies\n- #️⃣ Hashtag URL: `instagram.com/explore/tags/{tag}/`\n- 📍 Location URL: `instagram.com/explore/locations/{id}/`\n- 🎬 Reels tab URL: `instagram.com/{username}/reels/`\n- 🏷️ Tagged URL: `instagram.com/{username}/tagged/`\n- 🔒 Private, age-limited, login-walled, or hidden pages\n\nIf you paste a cookies-required URL without cookies, the actor will skip it before scraping and show a clear message instead of returning a confusing 0-result run.",
            "items": {
              "type": "string",
              "pattern": "^https?://(www\\.)?instagram\\.com/"
            }
          },
          "resultsType": {
            "title": "2️⃣ Choose what you want",
            "enum": [
              "posts",
              "reels",
              "details",
              "comments"
            ],
            "type": "string",
            "description": "Choose the dataset you want.\n\n**No-cookie combinations**\n- Profile URL + Posts: recent public posts\n- Profile URL + Reels: public reels when Instagram exposes them in the profile feed\n- Profile URL + Details: profile information\n- Post/Reel URL + Details: one post or reel\n- Post/Reel URL + Comments: comments available from the public page preview\n- Audio URL + Posts/Reels or Details: reels using that audio or audio details\n\n**Cookies-required combinations**\n- Hashtag URL + Posts/Reels/Details\n- Location URL + Posts/Reels/Details\n- `/username/reels/` + Posts/Reels/Details\n- `/username/tagged/` + Posts/Reels\n- Any Keyword Search result\n\n**Important:** Comments works only with a direct post/reel URL: `/p/...`, `/reel/...`, or `/tv/...`.",
            "default": "posts"
          },
          "resultsLimit": {
            "title": "🔢 Results per URL",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum records to extract from each URL. For example, with `100` and 2 profile URLs you'll get up to 200 posts.",
            "default": 10
          },
          "maxTotalResults": {
            "title": "💸 Max total results (cost safety)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional hard cap on the **total** records emitted by this run, no matter how many URLs you provide. Use this to keep cost predictable — e.g. set `1000` to never spend more than 1000 records' worth of credit. Leave empty for no overall cap."
          },
          "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 date filter — skip posts older than this. The actor stops paging as soon as it crosses the cutoff, which makes the run faster.\n\n**Accepted formats**\n- `2026-01-15` (calendar date, UTC)\n- `2026-01-15T10:00:00Z` (full ISO time)\n- `1 day`, `2 weeks`, `3 months`, `1 year` (relative)"
          },
          "addParentData": {
            "title": "🏷️ Add source info to each result",
            "type": "boolean",
            "description": "If you scrape multiple sources at once, turn this on to add a `dataSource` field to every record (`profile`, `hashtag`, `location`, `post`, or `comments`) plus the parent username / tag / location id. Useful when merging results in a spreadsheet.",
            "default": false
          },
          "dedupResults": {
            "title": "🧹 Remove duplicate posts",
            "type": "boolean",
            "description": "When the same post appears in multiple sources (e.g. a hashtag feed and the author's profile), keep only the first one. Recommended.",
            "default": true
          },
          "sessionCookies": {
            "title": "🔐 Instagram cookies (only for locked features)",
            "type": "string",
            "description": "Leave empty when scraping only:\n- public profile URLs;\n- public post/reel URLs;\n- comments on a public post/reel URL;\n- audio URLs.\n\nPaste your own Instagram cookies when using:\n- Keyword Search;\n- hashtag URLs;\n- location URLs;\n- `/username/reels/` URLs;\n- `/username/tagged/` URLs;\n- private, age-limited, login-walled, or hidden pages.\n\n**How to copy cookies from Chrome / Edge**\n1. Open `instagram.com` and log in to your own account.\n2. Open the Instagram page you want to scrape, or open Instagram search if you want Keyword Search.\n3. Press `F12`, or right-click the page and choose **Inspect**.\n4. Open the **Network** tab and enable **Preserve log** if it is available.\n5. Refresh the Instagram page with `Ctrl+R`.\n6. Click the main document request: `www.instagram.com` or the request named like the username / page path. Do not click image, CSS, JavaScript, GraphQL, or analytics requests.\n7. Open **Headers** -> **Request Headers**.\n8. Find **Cookie** and copy the full value. Copy only the value after `Cookie:`, not the word `Cookie:`.\n9. Paste that value here.\n\nCorrect format:\n`sessionid=...; csrftoken=...; ds_user_id=...; mid=...`\n\nIf you cannot find **Cookie**, keep DevTools open on Network, refresh again, click the request with Type `document` / `doc`, and check **Request Headers**. Do not copy `Set-Cookie` from Response Headers.\n\nYou can also paste JSON from Cookie-Editor or a Netscape cookie export. Cookies are sensitive and work like a password: use only your own Instagram account cookies and do not share them."
          },
          "search": {
            "title": "🔎 Keyword Search (cookies required)",
            "type": "string",
            "description": "Leave this empty for no-cookie runs.\n\nUse Search only when you also paste your own Instagram cookies above. Instagram blocks logged-out keyword search.\n\nExamples: `travel`, `nasa`, `musk`."
          },
          "searchType": {
            "title": "🎯 Search target",
            "enum": [
              "hashtag",
              "profile",
              "place"
            ],
            "type": "string",
            "description": "Only used when Search query is filled and Instagram cookies are provided. Ignored for direct URLs.",
            "default": "hashtag"
          },
          "searchLimit": {
            "title": "🔢 Search matches to scrape",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many profiles, hashtags, or places to take from Search. Direct URLs do not use this setting.",
            "default": 10
          },
          "concurrency": {
            "title": "⚡ Speed: parallel URLs",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many URLs to scrape at the same time. Higher = faster, but more likely to hit rate limits.",
            "default": 4
          },
          "requestRetryBudget": {
            "title": "🔁 Retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "If a single request fails (network blip, 500, 429), how many times to retry it before giving up. Each retry uses a fresh IP.",
            "default": 3
          },
          "urlRetryBudget": {
            "title": "🔁 Retries per URL",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "How many failed pages we'll tolerate inside one URL (e.g. while paginating through 1,000 posts) before skipping that URL.",
            "default": 5
          },
          "globalRateLimitBudget": {
            "title": "🛑 Stop after too many rate limits",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total 429 (rate-limit) responses allowed across the whole run before the actor aborts. Stops runaway costs if Instagram is blocking us hard.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}