{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Search Scraper",
    "description": "Search Instagram by keyword for profiles, hashtags, places and popular Reels. Export ranked results with profile metrics, hashtag popularity, location details, engagement data and the source query as clean JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "cWJWPIy9KcrsbOKNI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/coregent~instagram-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-coregent-instagram-search-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/coregent~instagram-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-coregent-instagram-search-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/coregent~instagram-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-coregent-instagram-search-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": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "maxItems": 100,
            "type": "array",
            "description": "Keywords to search on Instagram, one per line, for example fitness coach, canberra cafe or travel. Each query is searched once per selected search type. A # is never needed for hashtag search. Duplicate queries are removed (case-insensitive). Up to 100 queries per run.",
            "items": {
              "type": "string"
            },
            "default": [
              "nike"
            ]
          },
          "searchTypes": {
            "title": "Search types",
            "uniqueItems": true,
            "type": "array",
            "description": "What to search for. Pick one or more: each query runs once per selected type and every row says which type and query it came from.",
            "items": {
              "type": "string",
              "enum": [
                "PROFILES",
                "HASHTAGS",
                "PLACES",
                "POPULAR_REELS"
              ],
              "enumTitles": [
                "Profiles (creators, brands, businesses)",
                "Hashtags",
                "Places (locations, venues)",
                "Popular Reels"
              ]
            },
            "default": [
              "PROFILES"
            ]
          },
          "fetchFullDetails": {
            "title": "Full profile & place details",
            "type": "boolean",
            "description": "Instagram's search only returns identity fields. Profiles: username, name, URL, picture, verified and private flags. Places: name, address and coordinates. Turn this on to look up each profile result for the rest: follower, following and post counts, bio, business category, website, public email and phone, city and address. Place lookups (postcode, phone, website, price range, opening hours) are temporarily unavailable and are not charged. One extra lookup per result, charged as a separate details event. Hashtags and Reels never need it.",
            "default": false
          },
          "maxResultsPerQuery": {
            "title": "Max results per query and type",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum unique results for each query × search type. Example: 2 queries × 3 types × 100 = up to 600 rows. Instagram's search may return fewer than this — places, for instance, usually stop at a few dozen per query. Common values: 10, 25, 50, 100, 250.",
            "default": 50
          },
          "minFollowers": {
            "title": "Min followers (profiles)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profile results with at least this many followers. 0 = no minimum. Search results carry no follower counts, so while a follower filter is set each profile is looked up to check it (charged as the details event when the profile is kept). Profiles whose count can't be determined are left out.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Max followers (profiles)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only profile results with at most this many followers. Leave empty for no maximum."
          },
          "verifiedOnly": {
            "title": "Verified profiles only",
            "type": "boolean",
            "description": "Keep only verified profile results.",
            "default": false
          },
          "includeProfileBusinessDetails": {
            "title": "Include profile business details",
            "type": "boolean",
            "description": "For looked-up profiles (full details on, recent posts on, or a follower filter), return the business fields: business account flag, category, external URL and public email, phone, city and address. Search results alone never include them.",
            "default": true
          },
          "includeRecentPosts": {
            "title": "Include recent posts (profiles)",
            "type": "boolean",
            "description": "Add up to 3 recent posts to each profile result when the lookup returns them (not every lookup does). Needs the profile's full details, so each profile is looked up and charged the details event.",
            "default": false
          },
          "includeRelatedHashtags": {
            "title": "Include related hashtags",
            "type": "boolean",
            "description": "For hashtag results, list the other hashtags Instagram returned for the same keyword, grouped by usage (frequent, average, rare). No extra requests.",
            "default": true
          },
          "includePlaceDetails": {
            "title": "Include place details",
            "type": "boolean",
            "description": "For place results, return the address and coordinates from search, plus postcode, phone, website, price range and opening hours from full details once place lookups are available again (temporarily unavailable). When off, places return only ID, name and URL.",
            "default": true
          },
          "includePopularReelMedia": {
            "title": "Include Reel media URLs",
            "type": "boolean",
            "description": "For Popular Reels results, return thumbnail, video and audio URLs. Instagram CDN URLs are signed and expire — download soon after the run if you need them.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy configuration. Defaults to Apify Proxy (datacenter). Apify Residential is not supported — use Custom proxy URLs for your own residential provider.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Maximum number of query × type searches run in parallel. Pages of one search are always fetched one after another.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max retries per search",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a search is retried on a fresh session/IP after rate limits, blocks or temporary errors. Invalid and no-result searches are never retried.",
            "default": 3
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Enable verbose logging.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}