{
  "openapi": "3.0.1",
  "info": {
    "title": "Instagram Location ID Finder: Place Names to IDs",
    "description": "Instagram location ID finder: turn city, neighbourhood, postcode or venue names and coordinates into Instagram location IDs in bulk, no login. Each ID confirmed by Instagram, with name, address, coordinates and check ins. Add place details, posts, website, email. Misses free. CSV or API.",
    "version": "0.1",
    "x-build-id": "TvWAHHWIvXxIY4oxB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~instagram-location-id-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-instagram-location-id-finder",
        "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/automation_craft~instagram-location-id-finder/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-instagram-location-id-finder",
        "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/automation_craft~instagram-location-id-finder/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-instagram-location-id-finder",
        "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": {
          "locations": {
            "title": "Place names or coordinates",
            "type": "array",
            "description": "One per line: a city, neighbourhood, postcode or venue name (add the city or state: \"Blue Bottle Coffee Oakland\", \"Brooklyn, New York\"), or \"latitude, longitude\" for the places near a point. Every place found is one Location row with its Instagram location ID and the name Instagram shows; a line that finds nothing is a free row. Up to 10,000 entries a run across the three lists.",
            "items": {
              "type": "string"
            }
          },
          "locationIds": {
            "title": "Instagram location IDs or links (reverse lookup)",
            "type": "array",
            "description": "Instagram location IDs (531, 64428277906) or instagram.com/explore/locations/<id>/ links: each gives the place's name as Instagram shows it (one Location row; Place details and Place contact work here too). An ID Instagram does not know is a free row.",
            "items": {
              "type": "string"
            }
          },
          "directoryCities": {
            "title": "Directory cities (every place of a city)",
            "type": "array",
            "description": "Instagram's location directory: a city link (instagram.com/explore/locations/c2871929/...), a city ID (c2871929) or \"US/Chicago\" (a country code and the city's exact directory name). Each place Instagram lists for the city is one Location row, up to \"Places per directory city\".",
            "items": {
              "type": "string"
            }
          },
          "locationsFile": {
            "title": "Place names from a file",
            "type": "string",
            "description": "Optional: one https link to a TXT file (one name per line) or a CSV file (one column, or a column named location, place, name, query, search, keyword, city, venue or address) or a Google Sheet shared with anyone with the link. Its names join \"Place names or coordinates\"."
          },
          "placeTypes": {
            "title": "Place types",
            "enum": [
              "all",
              "areas",
              "venues"
            ],
            "type": "string",
            "description": "Which of Facebook's two place lists a name is searched in: areas (cities, neighbourhoods, postcodes, regions) and venues. \"all\" searches both, areas first; one name gives up to 10 places from each list.",
            "default": "all"
          },
          "maxPlacesPerName": {
            "title": "Places per name",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many places one name or point may give, in the source's order (1 for the best match). One name reaches about 20 places at most (10 areas and 10 venues); a point gives up to 10.",
            "default": 10
          },
          "near": {
            "title": "Near (for venue names)",
            "type": "string",
            "description": "Optional: \"latitude, longitude\" or a city name. Venue searches are biased to the places near it, so a chain or a common name returns its local places first (in our test of 32 venues the right one came first on 32 of 32 with a point, 21 of 32 without). A venue answer with no place within 50 km of the point is asked again and never delivered as near. A city name is placed by its first area result, shown on every row."
          },
          "countryCode": {
            "title": "Country (areas only)",
            "type": "string",
            "description": "Optional: a two letter ISO country code (US, GB, FR). Area searches keep to that country (\"Paris\" with US gives Paris, Texas). Facebook ignores it for venues: use \"Near\" there."
          },
          "radiusMeters": {
            "title": "Radius around a point (metres)",
            "minimum": 10,
            "maximum": 50000,
            "type": "integer",
            "description": "For \"latitude, longitude\" lines: only places within this distance of the point are delivered (each row carries its distance). Facebook sometimes answers a point with places around another city; such an answer is asked again on fresh exits and never delivered.",
            "default": 1000
          },
          "maxPerCity": {
            "title": "Places per directory city",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many places of each directory city are read, in Instagram's order (96 a page). Instagram lists at most about 1,000 places a city.",
            "default": 96
          },
          "maxItems": {
            "title": "Max locations",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Optional: the most Location rows this run delivers and charges, across every entry (up to 50,000). Entries past it get a free skipped row. One run delivers at most 50,000 location rows in all (found and repeated), whatever this says."
          },
          "placeDetails": {
            "title": "Place details (add-on)",
            "type": "boolean",
            "description": "Reads each delivered location's Instagram page: category, Instagram post count, phone, price range, coordinates, street, postcode, opening status, the linked business account, and the 15 to 18 top posts the page shows (likes, comments, caption, owner, reel music). Charged per Place details row; a page that cannot be read is free.",
            "default": false
          },
          "recentPosts": {
            "title": "Recent posts too",
            "type": "boolean",
            "description": "With Place details: also reads the page's recent tab and adds its 9 to 12 newest posts. No extra charge.",
            "default": false
          },
          "onlyVideoPosts": {
            "title": "Only video posts",
            "type": "boolean",
            "description": "With Place details: keep only videos and reels in the nested posts.",
            "default": false
          },
          "postsNewerThan": {
            "title": "Posts newer than",
            "type": "string",
            "description": "With Place details: keep only nested posts made on or after this date (YYYY-MM-DD, or an ISO time)."
          },
          "placeContact": {
            "title": "Place contact (add-on)",
            "type": "boolean",
            "description": "For places with a claimed Facebook page: the website, phones, e-mails, address, opening status, price range, categories and recommendation share with its review count from that page's contact section. Charged per Place contact row; a place with no claimed page, or a page that cannot be read, is free.",
            "default": false
          },
          "maxRunSeconds": {
            "title": "Return after (seconds)",
            "minimum": 10,
            "maximum": 86400,
            "type": "integer",
            "description": "Optional: stop new lookups after this many seconds from the run's start and deliver what is ready (for AI agents with a short tool timeout). Entries not reached get a free skipped row."
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Optional: how many lookups run at once (1 to 4, default 4)."
          },
          "maxRetries": {
            "title": "Retries per read",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "How many times a refused or failed read is asked again on a fresh exit (0 to 3).",
            "default": 2
          },
          "includeRawData": {
            "title": "Include raw data",
            "type": "boolean",
            "description": "Adds a raw field to each Location row with the place as Facebook's place search and Instagram's directory gave it. No extra charge.",
            "default": false
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Writes one log line per entry with its candidates, checks and misses.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: the run reads from its own address first and the Apify datacenter proxy behind it; every source answers there. A residential group is read as the datacenter group (it would cost more than a row earns)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}