{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper: Profiles, Posts, Reels, Comments, Locations",
    "description": "Scrape public Instagram data without a login: account profiles and bio links, the profile grid, the reels tab with play counts, single posts with engagement and comments, and location pages with the media posted there. HTTP-only, no browser.",
    "version": "0.1",
    "x-build-id": "ztVfQlOMBtf08ccWm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fanndev~instagram-content-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fanndev-instagram-content-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/fanndev~instagram-content-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fanndev-instagram-content-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/fanndev~instagram-content-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fanndev-instagram-content-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": [
          "targets"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "profile",
              "posts",
              "reels",
              "post_detail",
              "location"
            ],
            "type": "string",
            "description": "Which Instagram surface to scrape. 'profile' = account details, bio links and highlight titles. 'posts' = the profile grid (fast, but Instagram does not publish like/comment counts on this surface). 'reels' = the reels tab, which DOES carry like, comment and play counts. 'post_detail' = one post or reel with full engagement plus the comments Instagram serves logged-out viewers. 'location' = a place's page: its address and coordinates plus the media posted there, with full engagement.",
            "default": "profile"
          },
          "targets": {
            "title": "Targets",
            "type": "array",
            "description": "What to scrape, matched to the mode. For profile/posts/reels: usernames, @handles or profile URLs (e.g. \"nasa\", \"https://www.instagram.com/nasa/\"). For post_detail: post or reel URLs or bare shortcodes (e.g. \"https://www.instagram.com/p/DcOX3hWFiey/\"). For location: a numeric location id or an /explore/locations/ URL (e.g. \"212988663\").",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerTarget": {
            "title": "Max items per target",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on media rows per target for the posts, reels and location modes. Instagram serves 12 media per page for posts and reels, so 60 is five pages. Ignored by the profile and post_detail modes, which always produce exactly one row per target. The location mode cannot paginate at all (see the README), so values above roughly 63 have no effect there.",
            "default": 60
          },
          "includeComments": {
            "title": "Include comments (post_detail only)",
            "type": "boolean",
            "description": "Attach the comments Instagram server-renders for logged-out viewers to each post_detail row. This is roughly the first 13 comments regardless of how many the post has - Instagram's comment pagination endpoint requires a login, so deeper comment scraping is not possible anonymously. Costs no extra request, since the comments arrive with the page.",
            "default": true
          },
          "locationTab": {
            "title": "Location tab (location only)",
            "enum": [
              "recent",
              "ranked"
            ],
            "type": "string",
            "description": "Which tab of a location page to read. 'recent' returns the most media (about 63 in testing) and is the better choice for monitoring. 'ranked' is what Instagram server-renders by default and returns fewer (about 27), ordered by its own popularity ranking, and saves one request.",
            "default": "recent"
          },
          "delaySeconds": {
            "title": "Delay between targets",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Seconds to pause between targets. Instagram throttles anonymous traffic per IP and answers with a login wall rather than an HTTP 429, so pacing keeps a run alive considerably longer than hammering does. Lower this only when running behind rotating residential proxy.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxy is strongly recommended: Instagram rate-limits anonymous traffic by IP, and datacenter ranges are throttled far sooner. A run without a proxy works for a handful of targets and then starts collecting login walls.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}