{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Scraper Ultimate",
    "description": "Scrape public Instagram profiles, posts, Reels, hashtags, places, comments, and media links. Export clean data for research, monitoring, and analysis.",
    "version": "1.0",
    "x-build-id": "scnNCem8JVOXkmuoF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~instagram-scraper-ultimate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-instagram-scraper-ultimate",
        "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/qaseemiqbal~instagram-scraper-ultimate/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-instagram-scraper-ultimate",
        "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/qaseemiqbal~instagram-scraper-ultimate/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-instagram-scraper-ultimate",
        "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": {
          "operation": {
            "title": "Operation",
            "enum": [
              "mixedAuto",
              "profileDetails",
              "profilePosts",
              "profileReels",
              "postDetails",
              "reelDetails",
              "comments",
              "hashtagDetails",
              "hashtagPosts",
              "placeDetails",
              "placePosts",
              "searchResults",
              "mentions"
            ],
            "type": "string",
            "description": "Choose the extraction workflow. Auto-detect works with mixed URLs and plain targets.",
            "default": "mixedAuto"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Instagram profile, post, reel, hashtag, or location URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Public Instagram URL to process."
                }
              }
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Public Instagram usernames, with or without @.",
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags, with or without #.",
            "items": {
              "type": "string"
            }
          },
          "placeUrls": {
            "title": "Place URLs or IDs",
            "type": "array",
            "description": "Instagram location URLs or numeric place IDs.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post or Reel URLs",
            "type": "array",
            "description": "Instagram post or Reel URLs.",
            "items": {
              "type": "string"
            }
          },
          "search": {
            "title": "Search query",
            "type": "string",
            "description": "Search query for profile, hashtag, and place discovery."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "auto",
              "all",
              "user",
              "profile",
              "hashtag",
              "place",
              "post"
            ],
            "type": "string",
            "description": "Legacy-compatible search target hint.",
            "default": "auto"
          },
          "searchLimit": {
            "title": "Search result limit",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum search records to output.",
            "default": 10
          },
          "maxItemsPerTarget": {
            "title": "Maximum items per target",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum posts, reels, or discovered items to process per target.",
            "default": 10
          },
          "includeProfileDetails": {
            "title": "Include profile details",
            "type": "boolean",
            "description": "Write profile metadata when profile targets are processed.",
            "default": false
          },
          "includePostDetails": {
            "title": "Include post details",
            "type": "boolean",
            "description": "Write post metadata when post targets are discovered.",
            "default": true
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Attempt to extract public comments for post and Reel targets.",
            "default": false
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Include public comment replies when they are exposed.",
            "default": false
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum public comments to output per post.",
            "default": 25
          },
          "fromDate": {
            "title": "From date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Only include posts at or after this ISO date when timestamps are available."
          },
          "toDate": {
            "title": "To date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Only include posts at or before this ISO date when timestamps are available."
          },
          "mediaTypes": {
            "title": "Media types",
            "uniqueItems": true,
            "type": "array",
            "description": "Post media types to keep.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "sidecar",
                "thumbnail",
                "unknown"
              ]
            },
            "default": [
              "image",
              "video",
              "sidecar"
            ]
          },
          "downloadMedia": {
            "title": "Download media files",
            "type": "boolean",
            "description": "Store public media files in the key-value store so output is not dependent on temporary Instagram CDN URLs.",
            "default": false
          },
          "downloadMediaTypes": {
            "title": "Download media types",
            "uniqueItems": true,
            "type": "array",
            "description": "Media types to download when media downloading is enabled.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "thumbnail",
                "video",
                "sidecar",
                "unknown"
              ]
            },
            "default": [
              "image",
              "thumbnail",
              "video"
            ]
          },
          "maxMediaFiles": {
            "title": "Maximum media files",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum media files to download in one run.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy or custom proxy settings.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of targets processed concurrently.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum retries per crawl job.",
            "default": 0
          },
          "requestDelaySecs": {
            "title": "Request delay seconds",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Delay before each target request.",
            "default": 0
          },
          "deduplicateAcrossRuns": {
            "title": "Deduplicate across runs",
            "type": "boolean",
            "description": "Use a named key-value store to remember previously seen items.",
            "default": false
          },
          "deduplicateBy": {
            "title": "Deduplicate by",
            "enum": [
              "shortCode",
              "postId",
              "url",
              "commentId"
            ],
            "type": "string",
            "description": "Primary key used for deduplication.",
            "default": "shortCode"
          },
          "outputOnlyNewItems": {
            "title": "Output only new items",
            "type": "boolean",
            "description": "When cross-run deduplication is enabled, output only unseen records.",
            "default": false
          },
          "changeDetection": {
            "title": "Change detection",
            "type": "boolean",
            "description": "Track metric changes across runs using the named state store.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store for cross-run deduplication or change detection."
          },
          "removePersonalTextFields": {
            "title": "Remove personal text fields",
            "type": "boolean",
            "description": "Remove biography, caption, comment text, and similar text fields from output where supported.",
            "default": false
          },
          "redactUsernames": {
            "title": "Redact usernames",
            "type": "boolean",
            "description": "Replace usernames with deterministic coarse labels where supported.",
            "default": false
          },
          "saveRawSnapshots": {
            "title": "Save raw snapshots",
            "type": "boolean",
            "description": "Reserved for debugging. Raw responses are not saved by default.",
            "default": false
          },
          "enablePayPerEvent": {
            "title": "Enable pay-per-event charging",
            "type": "boolean",
            "description": "Enable only after PPE events are configured in Apify Console.",
            "default": false
          },
          "debugUseFixtures": {
            "title": "Use local fixtures",
            "type": "boolean",
            "description": "Developer-only local smoke mode. Leave disabled for production runs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}