{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-place-search-response-schema.json",
  "title": "PlaceSearchResponse",
  "description": "Place search response.",
  "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/PlaceSearchResponse",
  "properties": {
    "search_id": {
      "type": "string",
      "title": "Search Id",
      "description": "Search ID. Example: `search_cad0a6d2dec046bd95ae900527d880e7`"
    },
    "session_id": {
      "type": "string",
      "title": "Session Id",
      "description": "Session identifier, echoed back from the request when nonempty; otherwise generated by the server. Pass it to later calls made as part of the same task."
    },
    "results": {
      "items": {
        "$ref": "#/$defs/PlaceSearchResult"
      },
      "type": "array",
      "title": "Results",
      "description": "A list of places, ordered by decreasing relevance."
    },
    "warnings": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/Warning"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Warnings",
      "description": "Warnings for the search request, if any."
    },
    "usage": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/UsageItem"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Usage",
      "description": "Usage metrics for the search request."
    }
  },
  "type": "object",
  "required": [
    "search_id",
    "session_id",
    "results"
  ],
  "$defs": {
    "HourInterval": {
      "properties": {
        "opens": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
          "title": "Opens"
        },
        "closes": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
          "title": "Closes"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "opens",
        "closes"
      ],
      "title": "HourInterval",
      "description": "Open from `opens` to `closes`, local time. A `closes` at or before\n`opens` runs past midnight; 00:00-00:00 is open all day."
    },
    "PlaceSearchResult": {
      "properties": {
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "description": "The place's own website (its store page for a chain), else its own social media profile, else a public page about the place, such as a directory or guide page. Omitted when the place has none of these."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Place name."
        },
        "address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Address",
          "description": "Street address."
        },
        "phone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Phone",
          "description": "Phone number."
        },
        "latitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Latitude",
          "description": "Place latitude."
        },
        "longitude": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Longitude",
          "description": "Place longitude."
        },
        "distance_km": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Distance Km",
          "description": "Distance from the search center."
        },
        "rating": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "fair",
                "good",
                "great",
                "excellent"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Rating",
          "description": "Rating tier. Possible values are fair, good, great, excellent."
        },
        "price_level": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Price Level",
          "description": "1 (`$`) to 4 (`$$$$`)."
        },
        "opening_hours": {
          "anyOf": [
            {
              "$ref": "#/$defs/WeeklyHours"
            },
            {
              "type": "null"
            }
          ],
          "description": "Opening hours per weekday, in local time."
        },
        "timezone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timezone",
          "description": "IANA time zone of `opening_hours`, e.g. `Asia/Tokyo`."
        },
        "open_now": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Open Now",
          "description": "Open at request time, when known."
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "description": "A short description of the place."
        }
      },
      "type": "object",
      "required": [
        "name"
      ],
      "title": "PlaceSearchResult",
      "description": "A single place search result."
    },
    "UsageItem": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Name of the SKU."
        },
        "count": {
          "type": "integer",
          "title": "Count",
          "description": "Count of the SKU."
        }
      },
      "type": "object",
      "required": [
        "name",
        "count"
      ],
      "title": "UsageItem",
      "description": "Usage item for a single operation."
    },
    "Warning": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "spec_validation_warning",
            "input_validation_warning",
            "warning"
          ],
          "title": "Type",
          "description": "Type of warning. Note that adding new warning types is considered a backward-compatible change."
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "Human-readable message."
        },
        "detail": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Detail",
          "description": "Optional detail supporting the warning."
        }
      },
      "type": "object",
      "required": [
        "type",
        "message"
      ],
      "title": "Warning",
      "description": "Human-readable message for a task."
    },
    "WeeklyHours": {
      "properties": {
        "monday": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/HourInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Monday"
        },
        "tuesday": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/HourInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tuesday"
        },
        "wednesday": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/HourInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Wednesday"
        },
        "thursday": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/HourInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Thursday"
        },
        "friday": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/HourInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Friday"
        },
        "saturday": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/HourInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Saturday"
        },
        "sunday": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/HourInterval"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sunday"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "WeeklyHours",
      "description": "Opening hours per weekday. An empty list means closed that day; a\nmissing day means unknown."
    }
  }
}