{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Search Scraper",
    "description": "Search Instagram by keyword for profiles, Reels, hashtags, places, music, and exact-hashtag content. Get structured, deduplicated results with automatic pagination.",
    "version": "1.0",
    "x-build-id": "Mc4MinXhdCMdSG4ti"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lance_api~instagram-search-scraper-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lance_api-instagram-search-scraper-api",
        "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/lance_api~instagram-search-scraper-api/runs": {
      "post": {
        "operationId": "runs-sync-lance_api-instagram-search-scraper-api",
        "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/lance_api~instagram-search-scraper-api/run-sync": {
      "post": {
        "operationId": "run-sync-lance_api-instagram-search-scraper-api",
        "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": [
          "queries",
          "searchType"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "One or more search terms, one per line. What each term should be depends on the Search type below — Profiles: a username or account keyword, e.g. @openai. Top results: a keyword or phrase, e.g. hiring freelance developers. Reels: a video topic or phrase, e.g. AI video generator. Hashtags: a topic to discover hashtags for, e.g. travel photography. Places: a city, landmark or venue, e.g. Central Park. Music: a song, artist or music keyword, e.g. lofi beats. Hashtag posts: one exact hashtag with no spaces, e.g. #freelance — a phrase with spaces is rejected here, so use Top results or Reels for those. Duplicate terms are merged, and the run summary reports how many.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "profiles",
              "content",
              "reels",
              "hashtags",
              "places",
              "music",
              "hashtag_content"
            ],
            "type": "string",
            "description": "Pick one search mode per run. Profiles — discover accounts for a username or keyword. Top results — the media Instagram surfaces for a keyword (mostly Reels, sometimes image or carousel posts). Reels — only the short videos for a keyword. Hashtags — which #tags relate to a keyword or topic. Hashtag posts — the posts inside one exact hashtag (the reliable way to reach image and carousel posts). Places — locations matching a keyword. Music — tracks matching a keyword. One type per run keeps the result set and the bill to one shape; run the Actor again for a second type."
          },
          "includeFullProfile": {
            "title": "Full profile data",
            "type": "boolean",
            "description": "Only applies when Search type is Profiles; every other search type ignores it, and the run summary says so. When on, each matched account is also read for its full public profile — biography, exact follower, following and post counts, business and category details, website, bio links, HD profile picture and highlight count — and written into the same row. A profile that cannot be read still returns its search row, marked as not enriched. Each successfully enriched account costs one extra charge on top of the per-result charge.",
            "default": false
          },
          "maxResultsPerQueryType": {
            "title": "Results per search",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many results each search may deliver. 1–200, default 50. An upper bound, not a promise: a search that genuinely has fewer results returns fewer rather than being padded.",
            "default": 50
          },
          "maxTotalResults": {
            "title": "Total results for this run",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Hard ceiling for the whole run across all queries, 1–3000. When it is reached the remaining searches stop before they start, and the run summary lists them as not executed. A large batch can therefore be cut short by this limit before \"Results per search\" is filled.",
            "default": 1000
          },
          "hashtagTab": {
            "title": "Hashtag posts tab (Hashtag posts only)",
            "enum": [
              "top",
              "recent",
              "reels"
            ],
            "type": "string",
            "description": "Only applies when Search type is Hashtag posts; every other search type ignores this field, and the run summary says so when it happens. Top and Reels return one page that cannot be continued; Recent supports paging through older posts.",
            "default": "recent"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}