{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Reels Scraper: Views, Outlier Finder, No Login",
    "description": "Scrape Instagram reels by account, hashtag or keyword, sound or link, in bulk. Get views, likes, comments, caption, length, audio with a trending flag, followers and an outlier score that finds viral reels. MP4 download and comments included. No login or cookies.",
    "version": "0.0",
    "x-build-id": "fUf5iTy9Hid8hnGR5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-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/sourabhbgp~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-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/sourabhbgp~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "accounts",
              "topics",
              "audio",
              "reels"
            ],
            "type": "string",
            "description": "Pick what to scrape, then fill the section with the same name below. Other sections are ignored.",
            "default": "accounts"
          },
          "accounts": {
            "title": "Instagram accounts",
            "type": "array",
            "description": "One account per line: a username (nasa), @username or a profile link (https://www.instagram.com/nasa/).",
            "items": {
              "type": "string",
              "pattern": "^\\s*(@?[A-Za-z0-9._]{1,30}|(https?://)?(www\\.)?instagram\\.com/@?[A-Za-z0-9._]{1,30}(/(reels/?)?)?(\\?\\S*)?)\\s*$"
            }
          },
          "maxReelsPerAccount": {
            "title": "Max reels per account",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop after this many reels for each account, in the order of its Reels tab: pinned reels first, then newest first.",
            "default": 24
          },
          "postedAfter": {
            "title": "Posted on or after",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only reels posted on or after this date (UTC). Leave empty for no lower limit."
          },
          "postedBefore": {
            "title": "Posted on or before",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Only reels posted on or before this date (UTC). Leave empty for no upper limit."
          },
          "topics": {
            "title": "Hashtags or keywords",
            "type": "array",
            "description": "One topic per line, for example ai tools or open source. Type topics as words: Instagram's pages often use the spaced form (open source has one, #opensource has none). You get the reels Instagram itself ranks as popular for it, plus how many reels the topic has and related topics. Instagram has these pages for many topics but not all.",
            "items": {
              "type": "string",
              "pattern": "^\\s*#?[^\\s#].{0,99}$"
            }
          },
          "maxReelsPerTopic": {
            "title": "Max reels per hashtag or keyword",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Stop after this many reels for each topic. Instagram shows about 36 to 70 popular reels per topic.",
            "default": 50
          },
          "audioIds": {
            "title": "Audio links or IDs",
            "type": "array",
            "description": "One sound per line: an audio link (https://www.instagram.com/reels/audio/1091134006320233/) or its number. You get how many reels use the sound (audioReelCount) and the reels Instagram shows logged-out visitors on the sound's page: about 12 of the newest, often posted minutes before, so their views are still low. Every reel row carries its audioId, so you can take sounds from any other run.",
            "items": {
              "type": "string",
              "pattern": "^\\s*(\\d{6,25}|(https?://)?(www\\.)?instagram\\.com/reels/audio/\\d{6,25}/?(\\?\\S*)?)\\s*$"
            }
          },
          "maxReelsPerAudio": {
            "title": "Max reels per audio",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Stop after this many reels for each sound. Instagram shows logged-out visitors about 12 reels per sound.",
            "default": 12
          },
          "reelUrls": {
            "title": "Reel links",
            "type": "array",
            "description": "One reel per line: a link (https://www.instagram.com/reel/DeXnAlOqLuU/) or its shortcode.",
            "items": {
              "type": "string",
              "pattern": "^\\s*([A-Za-z0-9_-]{8,60}|(https?://)?(www\\.|m\\.)?instagram\\.com/([A-Za-z0-9._]{1,30}/)?(reel|reels|p|tv)/[A-Za-z0-9_-]{8,60}/?(\\?\\S*)?)\\s*$"
            }
          },
          "includeAuthorStats": {
            "title": "Add author followers, median views and outlier score",
            "type": "boolean",
            "description": "Hashtag, keyword and Audio mode: for every reel's author, followers, the median views of their recent reels, and how many times that median this reel got (outlier score). A few extra requests per author. Accounts and Reels mode always include them.",
            "default": true
          },
          "downloadVideos": {
            "title": "Download the videos",
            "type": "boolean",
            "description": "Save each reel's MP4 to the run's key-value store and add its link as videoFile. Every row has videoUrl either way: Instagram's own link, which stops working at videoUrlExpiresAt (about a day after the run).",
            "default": false
          },
          "includeComments": {
            "title": "Add comments",
            "type": "boolean",
            "description": "Add each reel's comments as a list (text, author, likes, time), newest first. Instagram shows logged-out visitors only part of a reel's comments and no replies, so this is a sample, not every comment. A few extra requests per reel.",
            "default": false
          },
          "maxComments": {
            "title": "Max comments per reel",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Comments to add per reel when comments are on.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. The scraper handles blocks by itself.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}