{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Location Scraper With Business Contact Leads",
    "description": "Scrape Instagram posts by location with the Instagram Location Scraper. Extract post captions, images, videos, hashtags, timestamps, and user info from any public location. Ideal for trend tracking, market research, and content analysis. Fast, accurate, and scalable for bulk locations.",
    "version": "0.1",
    "x-build-id": "zhBPMTpDW7OuvLqlT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~instagram-location-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-instagram-location-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/scrapier~instagram-location-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-instagram-location-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/scrapier~instagram-location-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-instagram-location-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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "📍 Locations, usernames, or keywords",
            "type": "array",
            "description": "Instagram location page URLs, @usernames, or place keywords. Type is auto-detected. Example: 'https://www.instagram.com/explore/locations/213131048/berlin-germany/', 'mrbeast', or 'berlin'.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "📦 Max posts (leads) to collect",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on posts scraped across all inputs (0 = unlimited). Each post yields one lead row.",
            "default": 20
          },
          "sessionId": {
            "title": "🔑 Instagram session cookie",
            "type": "string",
            "description": "Your Instagram 'sessionid' cookie value. Required in practice: logged-out, Instagram walls both the location feed and the owner-info lead endpoint. Stored encrypted."
          },
          "enrichOwner": {
            "title": "👤 Enrich owner profile",
            "type": "boolean",
            "description": "Fetch each unique post owner's profile (followerCount, followingCount, mediaCount, biography, externalUrl, category, isBusiness, isProfessionalAccount). One request per unique owner.",
            "default": true
          },
          "includeBusinessContact": {
            "title": "📇 Include business contact details",
            "type": "boolean",
            "description": "Extract opt-in contact-button data (publicEmail, contactPhoneNumber, businessContactMethod, addressStreet, cityName, zip). Available only for business/creator accounts that published it (~30-50% of pros); null otherwise.",
            "default": true
          },
          "requireBusinessContact": {
            "title": "✅ Only keep contactable leads",
            "type": "boolean",
            "description": "Drop any post whose owner has no public email, phone, or contact method (hasBusinessContact = false). Off by default.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Proxy settings. If Instagram rejects the current proxy, the actor falls back to residential automatically."
          },
          "dateFilterType": {
            "title": "⏳ Date filter mode",
            "enum": [
              "absolute",
              "relative"
            ],
            "type": "string",
            "description": "Filter posts by an absolute date range or a relative recent window.",
            "default": "relative"
          },
          "absoluteStartDate": {
            "title": "📅 From date",
            "pattern": "^(|\\d{4}-\\d{2}-\\d{2})$",
            "type": "string",
            "description": "Start date (YYYY-MM-DD). Used when date filter mode is 'absolute'.",
            "default": ""
          },
          "absoluteEndDate": {
            "title": "📅 To date",
            "pattern": "^(|\\d{4}-\\d{2}-\\d{2})$",
            "type": "string",
            "description": "End date (YYYY-MM-DD). Used when date filter mode is 'absolute'. Empty = today.",
            "default": ""
          },
          "relativeValue": {
            "title": "🔢 Recent window amount",
            "minimum": 0,
            "type": "integer",
            "description": "Number of time units for the relative window (e.g. 7). Used when date filter mode is 'relative'. 0 disables date filtering.",
            "default": 0
          },
          "relativeUnit": {
            "title": "🕒 Recent window unit",
            "enum": [
              "days",
              "weeks",
              "months",
              "years"
            ],
            "type": "string",
            "description": "Time unit for the relative window.",
            "default": "days"
          },
          "includeEngagement": {
            "title": "❤️ Include engagement counts",
            "type": "boolean",
            "description": "Include likeCount and commentCount on each post. Turn off to null them out.",
            "default": true
          },
          "includeVideoMetadata": {
            "title": "🎥 Include video metadata",
            "type": "boolean",
            "description": "Include the video object (url, dimensions, duration) on video posts. Turn off to null it out.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}