{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper",
    "description": "Collect public Instagram profiles, posts, reels, hashtags, places, search results, and tagged posts through anonymous web requests.",
    "version": "0.1",
    "x-build-id": "wNlHkzGCsenQh9whe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kaix~instagram-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kaix-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/kaix~instagram-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kaix-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/kaix~instagram-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kaix-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",
          "targets"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "profile",
              "post",
              "comments",
              "posts",
              "reels",
              "hashtag",
              "hashtagDetails",
              "place",
              "placePosts",
              "search",
              "mentions",
              "explore"
            ],
            "type": "string",
            "description": "Choose the data to collect. Profile posts, reels, comments, and hashtag posts can continue past the first results. Place collection returns a limited set of recent posts and reels. Explore returns one set of public topic, profile, and category metadata. Keyword search, hashtag details, and tagged posts are not available now."
          },
          "targets": {
            "title": "Targets",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Use usernames or profile URLs; post shortcodes, media IDs, share links or URLs; exact hashtags; place IDs or URLs; or search phrases. Explore mode uses https://www.instagram.com/explore/. Profile cards and Story URLs select the owner profile. Numeric profile IDs are not supported. Use @123 for a numeric username.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "profile",
              "hashtag",
              "place",
              "user"
            ],
            "type": "string",
            "description": "Keyword search mode only. Choose the type of matches. Hashtag search puts an exact name match first when available, before applying the match limit. Not available now.",
            "default": "hashtag"
          },
          "searchResults": {
            "title": "Search output",
            "enum": [
              "details",
              "posts",
              "reels",
              "mentions"
            ],
            "type": "string",
            "description": "Return matched details, posts, or reels. Tagged posts require profile search. Not available now.",
            "default": "details"
          },
          "searchLimit": {
            "title": "Maximum search matches",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum matches to process for each query. Instagram can return fewer matches. Not available now.",
            "default": 10
          },
          "onlyNewerThan": {
            "title": "Only newer than",
            "type": "string",
            "description": "Optional UTC date (2026-09-01), ISO timestamp, or duration such as 7 days. Applies to posts and comments. Missing timestamps are excluded. Relative dates use the first run start time."
          },
          "skipPinnedPosts": {
            "title": "Skip pinned posts",
            "type": "boolean",
            "description": "Omit posts marked as pinned. Continue through all available pages.",
            "default": false
          },
          "addParentData": {
            "title": "Add parent data",
            "type": "boolean",
            "description": "Add the source profile, post, hashtag, or place identity to each result. Hashtag posts do not get parent data now.",
            "default": false
          },
          "addProfileStatistics": {
            "title": "Add profile statistics",
            "type": "boolean",
            "description": "Compute average likes, comments, and engagement rate from a bounded profile post sample. Profile detail output only.",
            "default": false
          },
          "addHashtagStatistics": {
            "title": "Add hashtag sample statistics",
            "type": "boolean",
            "description": "Add average likes and comments, sampled posts by date, and related-tag frequency from public posts with an exact caption match. Hashtag details or hashtag search with details output only. These values describe the sample, not all Instagram posts. Not available now.",
            "default": false
          },
          "statisticsLimit": {
            "title": "Statistics sample size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum posts in a profile or hashtag statistics sample. Instagram can supply fewer posts. Missing counts produce null averages. Hashtag statistics are not available now.",
            "default": 12
          },
          "downloadMedia": {
            "title": "Download media",
            "type": "boolean",
            "description": "Save post, reel, and carousel media to the key-value store. Add download links to the result. Data transfer and storage can have a cost.",
            "default": false
          },
          "maxMediaBytes": {
            "title": "Maximum bytes per media file",
            "minimum": 1,
            "maximum": 104857600,
            "type": "integer",
            "description": "Reject a media file above this size. The default is 25 MiB.",
            "default": 26214400
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum rows to save in the full run. A carousel or Explore metadata page counts as one row.",
            "default": 100
          },
          "maxItemsPerTarget": {
            "title": "Maximum items per target",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum rows to save for each target.",
            "default": 100
          },
          "maxRequests": {
            "title": "Maximum requests",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum request attempts across the full run and its restarts. Includes retries, extra lookups needed to complete a result, and media downloads.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. The default works for most runs. Set useProxy to false for direct access. Set proxyUrls to HTTP or HTTPS URLs to use custom proxies.",
            "default": {
              "useProxy": true
            }
          },
          "onlyReels": {
            "title": "Only reels",
            "type": "boolean",
            "description": "Keep only media identified as reels. Use with hashtag or place posts, profile posts, or direct posts.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}