{
  "openapi": "3.0.1",
  "info": {
    "title": "Address Autocomplete, Nearby Places and Routing API: LocationIQ",
    "description": "Address autocomplete, nearby POI search, timezone lookup, driving and walking directions, route optimization and distance matrix through the LocationIQ API, plus forward and reverse geocoding. Worldwide OpenStreetMap based data with US and EU servers. Bring your own key.",
    "version": "0.1",
    "x-build-id": "hXMHD4raDmAEjcmZy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~address-autocomplete-nearby-places-routing-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-address-autocomplete-nearby-places-routing-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/nabeelbaghoor~address-autocomplete-nearby-places-routing-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-address-autocomplete-nearby-places-routing-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/nabeelbaghoor~address-autocomplete-nearby-places-routing-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-address-autocomplete-nearby-places-routing-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",
        "properties": {
          "mode": {
            "title": "What to do",
            "enum": [
              "autocomplete",
              "search",
              "reverse",
              "nearby",
              "timezone",
              "directions",
              "optimize",
              "matrix"
            ],
            "type": "string",
            "description": "Autocomplete returns place and address suggestions for partial text, as a search box would. Forward geocoding turns addresses and place names into coordinates; reverse geocoding turns coordinates into addresses. Nearby places lists points of interest around a coordinate. Timezone returns the time zone and UTC offset of a coordinate. Directions, route optimization and distance matrix use the driving or walking road network.",
            "default": "autocomplete"
          },
          "queries": {
            "title": "Search texts",
            "type": "array",
            "description": "Autocomplete and forward geocoding. One search text per line: a partial or full address, a place name or a postal code. Autocomplete takes up to 200 characters. Duplicates are sent once.",
            "items": {
              "type": "string"
            }
          },
          "coordinates": {
            "title": "Coordinates",
            "type": "array",
            "description": "Reverse geocoding, nearby places, timezone and distance matrix. One latitude,longitude pair per line, latitude first, in decimal degrees. The distance matrix takes 2 to 25 points and numbers them 0, 1, 2 in the order given.",
            "items": {
              "type": "string"
            }
          },
          "routes": {
            "title": "Routes",
            "type": "array",
            "description": "Directions and route optimization. One route per line: 2 to 25 latitude,longitude waypoints separated by semicolons. The actor sends them to LocationIQ in its longitude,latitude order for you.",
            "items": {
              "type": "string"
            }
          },
          "countryCodes": {
            "title": "Countries",
            "type": "string",
            "description": "Autocomplete and forward geocoding. Optional. Limit results to these countries, as ISO 3166-1 alpha-2 codes separated by commas, such as us,ca,gb."
          },
          "viewbox": {
            "title": "Preferred area (viewbox)",
            "type": "string",
            "description": "Autocomplete and forward geocoding. Optional. Two corners of a box as longitude,latitude,longitude,latitude, such as -74.02,40.70,-73.93,40.80. Results inside it are preferred; turn on Only inside the viewbox to restrict them to it."
          },
          "bounded": {
            "title": "Only inside the viewbox",
            "type": "boolean",
            "description": "Autocomplete and forward geocoding. Restrict results to the viewbox above instead of only preferring it.",
            "default": false
          },
          "layers": {
            "title": "Autocomplete layers",
            "type": "array",
            "description": "Autocomplete. Optional. Return only these kinds of places. Postcode works only when it is the only layer and no tag is set.",
            "items": {
              "type": "string",
              "enum": [
                "road",
                "neighbourhood",
                "suburb",
                "city",
                "county",
                "state",
                "country",
                "postcode"
              ],
              "enumTitles": [
                "Roads",
                "Neighbourhoods",
                "Suburbs",
                "Cities",
                "Counties",
                "States",
                "Countries",
                "Postal codes"
              ]
            }
          },
          "tag": {
            "title": "Place type (tag)",
            "type": "string",
            "description": "Autocomplete and nearby places. Optional. For nearby places, a simple tag such as restaurant, hotel, pub, atm, bank, hospital, pharmacy, school, fuel, parking, supermarket, airport or all, or OpenStreetMap class:type pairs such as amenity:cafe,tourism:hotel. For autocomplete, class:type pairs such as place:city; prefix ! to exclude, as in !place:village."
          },
          "limit": {
            "title": "Results per lookup",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Autocomplete (up to 20), forward geocoding and nearby places (up to 50). The most results LocationIQ returns for each search text or coordinate; each result is its own row.",
            "default": 5
          },
          "acceptLanguage": {
            "title": "Language",
            "type": "string",
            "description": "Autocomplete, forward and reverse geocoding. Optional. Preferred language of the results, such as en, fr or de,en, or native for the local language. Autocomplete takes one code from en, cs, nl, fr, de, id, it, no, pl, es, ru, sv, uk. LocationIQ defaults to en."
          },
          "normalizeAddress": {
            "title": "Normalized address fields",
            "type": "boolean",
            "description": "Forward and reverse geocoding. Return the address in LocationIQ's predictable element list (name, house number, road, neighbourhood, suburb, city, county, state, postcode, country), which LocationIQ recommends.",
            "default": true
          },
          "extraTags": {
            "title": "Extra tags",
            "type": "boolean",
            "description": "Forward and reverse geocoding. Add extra OpenStreetMap details when available, such as a Wikipedia link, opening hours or website.",
            "default": false
          },
          "radius": {
            "title": "Nearby radius (meters)",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Nearby places. Search radius around each coordinate in meters, from 1 to 500,000. A result is returned when the radius reaches its location point.",
            "default": 100
          },
          "zoom": {
            "title": "Reverse geocoding detail (zoom)",
            "minimum": 0,
            "maximum": 18,
            "type": "integer",
            "description": "Reverse geocoding. Level of detail: 3 country, 5 state, 8 county, 10 city, 14 suburb, 16 street, 18 building.",
            "default": 18
          },
          "timestamp": {
            "title": "Timezone at this time (Unix seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Timezone. Optional. The moment to return the offset for, as Unix time in seconds, so daylight saving time is applied for past or future dates. Defaults to now."
          },
          "profile": {
            "title": "Travel profile",
            "enum": [
              "driving",
              "walking"
            ],
            "type": "string",
            "description": "Directions, route optimization and distance matrix. Driving or walking.",
            "default": "driving"
          },
          "alternatives": {
            "title": "Alternative routes",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Directions. Ask for up to this many alternative routes when available; each route is its own row.",
            "default": 0
          },
          "steps": {
            "title": "Turn by turn steps",
            "type": "boolean",
            "description": "Directions and route optimization. Include the steps (maneuvers and instructions) of every leg.",
            "default": false
          },
          "geometries": {
            "title": "Route geometry format",
            "enum": [
              "polyline",
              "polyline6",
              "geojson"
            ],
            "type": "string",
            "description": "Directions and route optimization. The format of the route line.",
            "default": "polyline"
          },
          "overview": {
            "title": "Route geometry detail",
            "enum": [
              "simplified",
              "full",
              "false"
            ],
            "type": "string",
            "description": "Directions and route optimization. A simplified line, the full line, or no line at all.",
            "default": "simplified"
          },
          "roundtrip": {
            "title": "Round trip",
            "type": "boolean",
            "description": "Route optimization. Return to the first stop at the end of the trip.",
            "default": true
          },
          "optimizeSource": {
            "title": "Trip start",
            "enum": [
              "any",
              "first"
            ],
            "type": "string",
            "description": "Route optimization. Start at any stop, or at the first stop of the line.",
            "default": "any"
          },
          "optimizeDestination": {
            "title": "Trip end",
            "enum": [
              "any",
              "last"
            ],
            "type": "string",
            "description": "Route optimization. End at any stop, or at the last stop of the line.",
            "default": "any"
          },
          "matrixAnnotations": {
            "title": "Matrix values",
            "enum": [
              "duration,distance",
              "duration",
              "distance"
            ],
            "type": "string",
            "description": "Distance matrix. Travel time, distance, or both, for each pair of points.",
            "default": "duration,distance"
          },
          "matrixSources": {
            "title": "Matrix origins",
            "type": "string",
            "description": "Distance matrix. Optional. Point numbers to use as origins, counting from 0, separated by semicolons, such as 0;1. Empty means all points."
          },
          "matrixDestinations": {
            "title": "Matrix destinations",
            "type": "string",
            "description": "Distance matrix. Optional. Point numbers to use as destinations, counting from 0, separated by semicolons, such as 2;3;4. Empty means all points."
          },
          "region": {
            "title": "LocationIQ region",
            "enum": [
              "us1",
              "eu1"
            ],
            "type": "string",
            "description": "The US (us1.locationiq.com) or Europe (eu1.locationiq.com) data center. Autocomplete always uses api.locationiq.com, which routes to the closest one.",
            "default": "us1"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Pacing for calls to LocationIQ. The free plan allows 2 requests per second and 60 per minute; paid plans allow more. Throttled calls are retried after a pause.",
            "default": 60
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own LocationIQ API access token (it starts with pk.), from the Access Tokens page at my.locationiq.com. Stored as a secret and sent only to LocationIQ; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}