{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-place-search-request-schema.json",
  "title": "PlaceSearchRequest",
  "description": "Place search request: places matching `query` in or near a location.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parallel-ai-places-api-openapi.yml#/components/schemas/PlaceSearchRequest",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "title": "Query",
      "description": "What to find, e.g. `ramen`, `24 hour pharmacy` or a place's name."
    },
    "location": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200,
          "minLength": 2
        },
        {
          "type": "null"
        }
      ],
      "title": "Location",
      "description": "Where to search: a city, neighborhood, address or postal code. Set this, `latitude` and `longitude`, or both; a request with neither is rejected."
    },
    "latitude": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 90.0,
          "minimum": -90.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Latitude",
      "description": "Search center latitude; set with `longitude`."
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 180.0,
          "minimum": -180.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Longitude",
      "description": "Search center longitude; set with `latitude`."
    },
    "max_distance_km": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 200.0,
          "exclusiveMinimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Distance Km",
      "description": "Only places within this many km of the search center. Defaults to the size of `location` when it is a city or postal code, else 25."
    },
    "open_now": {
      "type": "boolean",
      "title": "Open Now",
      "description": "Only places open at request time, in each place's own time zone. Places whose open state is unknown are left out.",
      "default": false
    },
    "max_results": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Results",
      "description": "Upper bound on results. Defaults to 10; values above the mode's maximum are reduced to it, with a warning."
    },
    "mode": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "fast",
            "advanced"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Mode",
      "description": "`fast`: lowest latency, with fewer results. `advanced` (default): slower, with more complete results."
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id",
      "description": "Session identifier that groups related calls made as part of a larger task. Echoed back in the response when nonempty; generated by the server if omitted, null, or empty."
    },
    "client_model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Model",
      "description": "The model generating this request and consuming the results."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "query"
  ]
}