{
  "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": "lVPvdiiRiQEYq0QbR"
  },
  "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",
              "posts",
              "reels",
              "hashtag",
              "hashtagDetails",
              "place",
              "placePosts",
              "search",
              "mentions"
            ],
            "type": "string",
            "description": "Choose the data to collect. Hashtag posts are a limited sample with an exact caption match. Profile reels and place posts use one public page."
          },
          "targets": {
            "title": "Targets",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Use usernames or profile URLs; post shortcodes, media IDs or URLs; exact hashtags; place IDs or URLs; or search phrases. 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.",
            "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.",
            "default": "details"
          },
          "searchLimit": {
            "title": "Maximum search matches",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum source matches to resolve for each query. Instagram can return fewer matches.",
            "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. 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, hashtag, or place identity to each result.",
            "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
          },
          "statisticsLimit": {
            "title": "Statistics sample size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum profile posts in the statistics sample. Missing counts produce null averages.",
            "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 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 HTTP attempts across the full run and its restarts. Includes anonymous session setup, retries, detail and privacy checks, and media downloads.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Use Apify Residential Proxy by default, supply HTTP or HTTPS proxy URLs, or disable the proxy. Proxy use can have a cost. The Actor keeps one proxy session for the run.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "onlyReels": {
            "title": "Only reels",
            "type": "boolean",
            "description": "Keep only media identified as reels. Use with hashtag or place posts, profile feeds, 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}