> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sanfoundation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search places

> Find businesses and local places.

Search for a business or category. Use `near` to center the search on coordinates, for example `1.2903,103.8519,14` for central Singapore.

When a result includes an `id`, pass it unchanged to [place details](https://docs.sanfoundation.com/api-reference/places-details.md) or [reviews](https://docs.sanfoundation.com/api-reference/places-reviews.md). Some results have no ID; only offer follow-up actions when one is present.


## OpenAPI

````yaml https://api.sanfoundation.com/openapi.json GET /v1/places/search
openapi: 3.0.0
info:
  title: SAN API
  description: >-
    Web data and context for agents, served by a network of miners running real
    browsers on residential connections. One resource per thing an agent asks
    for: search the web, read the news, find places, hotels and flights, and
    quote a symbol. Present an API key as `Authorization: Bearer san_...`. Every
    response is snake_case JSON and every error is `{ error: { code, message,
    param } }`.
  version: 0.0.1
  contact: {}
servers: []
security: []
tags:
  - name: web
    description: Web search
  - name: news
    description: News search
  - name: places
    description: Places search
  - name: hotels
    description: Stays search
  - name: flights
    description: Flight search
  - name: finance
    description: Quotes and charts
  - name: shopping
    description: Products and sellers
  - name: account
    description: Plan and remaining budget
paths:
  /v1/places/search:
    get:
      tags:
        - places
      summary: Find places
      description: >-
        Businesses and points of interest for a query, with category, address,
        rating and review count. Targeted with `near`, which is a map viewport
        rather than a place name.
      operationId: PlacesController_search
      parameters:
        - name: page
          required: false
          in: query
          description: 1 based, up to 4. A deep page costs a miner real work.
          schema:
            type: number
            example: 1
        - name: country
          required: false
          in: query
          description: ISO 3166-1 alpha-2. Defaults to `us`.
          schema:
            type: string
            example: us
        - name: near
          required: false
          in: query
          description: >-
            Where to look: `lat,lng` or `lat,lng,zoom`. Zoom runs 3 (region) to
            21 (street); it defaults to 14.
          schema:
            example: 30.2672,-97.7431,14
            type: string
        - name: query
          required: true
          in: query
          schema:
            example: coffee
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlacesSearchResponseDto'
        '400':
          description: A parameter is missing, invalid or not recognized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
        '401':
          description: Invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
        '429':
          description: Monthly quota exhausted. Hard stop, no overage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
        '503':
          description: No miner and no fallback could serve the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorDto'
      security:
        - api_key: []
        - x-api-key: []
components:
  schemas:
    PlacesSearchResponseDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of this request. Quote it when reporting a problem.
        took_ms:
          type: number
          example: 1420
          description: How long the request took, in milliseconds.
        request:
          type: object
          additionalProperties: true
          description: >-
            The parameters as accepted, after defaults and normalization. What
            the request actually ran with.
          example:
            query: coffee
            country: us
            page: 1
        next_page:
          type: number
          nullable: true
          example: 2
          description: >-
            The next page to ask for, or null when there is no further page.
            Never a page this endpoint would reject.
        results:
          type: array
          items:
            $ref: '#/components/schemas/PlaceResultDto'
      required:
        - id
        - took_ms
        - request
        - next_page
        - results
    PublicErrorDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorBodyDto'
      required:
        - error
    PlaceResultDto:
      type: object
      properties:
        id:
          type: string
          example: san1.QkFEQ0FGRTAxMjM0NTY3ODk
          description: >-
            Opaque handle for this place. Absent when the listing carried no
            detail page.
        position:
          type: number
          example: 1
        name:
          type: string
          example: Radio Coffee and Beer
        type:
          type: string
          example: Coffee shop
        address:
          type: string
          example: 3504 Manchaca Rd, Austin, TX
        rating:
          type: number
          example: 4.6
        reviews:
          type: number
          example: 1198
        price:
          type: string
          example: $$
          description: Price level as shown.
      required:
        - position
        - name
    PublicErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - unauthorized
            - missing_parameter
            - invalid_parameter
            - not_found
            - quota_exceeded
            - rate_limited
            - unavailable
            - expired
            - internal_error
          example: missing_parameter
        message:
          type: string
          example: Missing parameter `query`.
        param:
          type: string
          example: query
          description: The parameter at fault, when one parameter is at fault.
      required:
        - code
        - message
  securitySchemes:
    api_key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: 'Public API key: `Authorization: Bearer san_...`.'
    x-api-key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: The same public API key, as a header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.