{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Search Scraper - Accounts, Hashtags & Places",
    "description": "Search Instagram by keyword for accounts, hashtags and places: followers, verified flag, linked Facebook page and the full public profile; hashtag post counts and related hashtags; place address, phone, coordinates, category and top posts. Filters and monitor mode. No login.",
    "version": "0.1",
    "x-build-id": "XfiHVzO2ktHw8Tvcr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~instagram-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-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/topapi~instagram-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-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/topapi~instagram-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-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",
        "properties": {
          "search": {
            "title": "🔍 Search terms",
            "type": "string",
            "description": "One or more keywords, comma-separated, e.g. \"coffee\", \"cakes prague, dentist chicago\". Each keyword is searched for the type below and returns up to the limit per keyword."
          },
          "searchType": {
            "title": "Search for",
            "type": "string",
            "description": "Places (Instagram locations), accounts (profiles), hashtags, or all three for every keyword.",
            "default": "place"
          },
          "startUrls": {
            "title": "Place or hashtag URLs",
            "type": "array",
            "description": "Instagram place pages or ids and hashtag pages to read directly, e.g. \"https://www.instagram.com/explore/locations/270309914/bakeshop-praha/\", \"212988663\", \"#coffee\".",
            "items": {
              "type": "string"
            }
          },
          "searchLimit": {
            "title": "Results per keyword",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Maximum results per keyword and type (1-250). Instagram's hashtag search returns at most 55 per keyword.",
            "default": 20
          },
          "countries": {
            "title": "Countries searched for accounts and places",
            "type": "array",
            "description": "Two-letter country codes the Meta Ad Library search is run in (each adds up to 15 matches), \"ALL\" for worldwide. More countries = more accounts per keyword.",
            "default": [
              "ALL",
              "US",
              "GB",
              "DE",
              "FR",
              "ES",
              "IT",
              "BR",
              "IN",
              "CA"
            ],
            "items": {
              "type": "string"
            }
          },
          "placePosts": {
            "title": "Posts on place rows",
            "enum": [
              "top",
              "recent",
              "both",
              "none"
            ],
            "type": "string",
            "description": "Which of the place's posts to nest in its row: the top posts Instagram shows first (12-18), the 12 most recent, both, or none.",
            "default": "top"
          },
          "placeSourceOrder": {
            "title": "Place search order",
            "enum": [
              "adLibraryFirst",
              "googleFirst"
            ],
            "type": "string",
            "description": "Places only: Ad Library first (matches place names, more results per keyword) or Google first (pages about the keyword, usually closer to the city you typed). The other source fills the rest.",
            "default": "adLibraryFirst"
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Accounts only: keep accounts with at least this many followers. 0 = no minimum.",
            "default": 0
          },
          "maxFollowers": {
            "title": "Maximum followers",
            "minimum": 0,
            "type": "integer",
            "description": "Accounts only: keep accounts with at most this many followers, e.g. 50000 for micro-influencers. 0 = no maximum.",
            "default": 0
          },
          "verifiedOnly": {
            "title": "Verified accounts only",
            "type": "boolean",
            "description": "Accounts only: keep accounts with Instagram's verified badge.",
            "default": false
          },
          "accountType": {
            "title": "Account type",
            "enum": [
              "any",
              "business",
              "creator",
              "professional",
              "personal"
            ],
            "type": "string",
            "description": "Accounts only: keep business, creator, professional (business or creator) or personal accounts. Reads each account's profile.",
            "default": "any"
          },
          "excludePrivate": {
            "title": "Skip private accounts",
            "type": "boolean",
            "description": "Accounts only: leave out private accounts. Reads each account's profile.",
            "default": false
          },
          "minPosts": {
            "title": "Minimum posts",
            "minimum": 0,
            "type": "integer",
            "description": "Keep hashtags, places and accounts with at least this many posts (a hashtag's or place's post count, an account's posts). 0 = no minimum.",
            "default": 0
          },
          "keywordFilter": {
            "title": "Must contain",
            "type": "string",
            "description": "Keep results whose name, username, category, bio or address contain one of these words (comma = any), e.g. \"vegan, gluten\"."
          },
          "activeWithinDays": {
            "title": "Active in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep accounts and places with a post in the last N days (an account's latest post, a place's recent posts). 0 = no date filter.",
            "default": 0
          },
          "enrichProfiles": {
            "title": "Add the full profile",
            "type": "boolean",
            "description": "Accounts only: add each account's public profile (bio, links, exact counts, category, business address, 12 latest posts, related accounts). Charged as the profile-enrichment add-on.",
            "default": true
          },
          "includeRelated": {
            "title": "Related hashtags",
            "type": "boolean",
            "description": "Hashtags only: add each hashtag's related hashtags with their post counts, grouped as frequent (1M+), average (100k-1M) and rare. No extra charge.",
            "default": true
          },
          "monitorMode": {
            "title": "Only new results since the last run",
            "type": "boolean",
            "description": "Remembers, per keyword, which accounts, hashtags and places were already delivered and returns only new ones. Pairs with a daily or weekly schedule.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Name of the key-value store that keeps the memory for monitor mode. Give each separate watchlist its own name. Letters, digits and hyphens.",
            "default": "instagram-search-monitor"
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap for the whole run across all keywords and types. 0 = no total cap (each keyword is still capped above).",
            "default": 0
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Core fields only (type, keyword, rank, name or username, counts, category, URL): small rows for AI agents and MCP clients.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is the default; the actor falls back to direct egress, and to residential for the small requests, when a session is refused.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many places, profiles or related-hashtag lookups run at once. 8 is the default; these reads wait on the network, not the CPU.",
            "default": 8
          },
          "maxSerpPagesPerRun": {
            "title": "Google searches per run",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Places only: after the free Ad Library matches, one Google search per keyword (about 10 more places) while this many remain for the run. 0 = Ad Library only.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}