---
title: "Search for businesses on Yelp"
method: POST
path: "/yelp/search-businesses"
tags: ["Yelp"]
---

# Search for businesses on Yelp

`POST /yelp/search-businesses`

## Request

- Base URL: `https://api.exfunc.dev`
- URL: `https://api.exfunc.dev/yelp/search-businesses`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/carvedai/apis/exfunc-apis/docs/yelp/search-businesses/post.ts> (a function with typed inputs; its response is checked against the schema)

Search for businesses on Yelp given a query, location, and other criteria

## Request body

- object
  - `query` string, required: The search term to find businesses
  - `location` string, required: The location to search for businesses
  - `sort_by` 'recommended' | 'highest_rated' | 'review_count': The criteria to sort the results (e.g., "recommended", "highest_rated", etc.)
  - `start` integer: The starting index for pagination (default is 0)
  - `count` integer: The number of businesses to retrieve

## Response `200`

SearchBusinesses API successful response

- object
  - `businesses` object[]
    - `business_id` string: Unique identifier for the business
    - `alias` string: A unique identifier used in the URL for the business

## Other responses

- `400`: User error response
- `500`: Server error response

## Changes

- **2024-11-21** `9d3028e39d19`: 10 warning, 1 info
  - removed the optional property `businesses/items/address` from the response with the `200` status
  - removed the optional property `businesses/items/business_page_link` from the response with the `200` status
  - removed the optional property `businesses/items/categories` from the response with the `200` status
  - removed the optional property `businesses/items/highlights` from the response with the `200` status
  - …7 more

[Operation history](https://skmtc.dev/carvedai/apis/exfunc-apis/changes/yelp/search-businesses/post.md)

---

[API](https://skmtc.dev/carvedai/apis/exfunc-apis.md) - [All operations](https://skmtc.dev/carvedai/apis/exfunc-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/carvedai/apis/exfunc-apis/revisions/22587fdf9a5e?raw)
