# Yelp

> Discover businesses, reviews, and events on Yelp.

App · Travel & Places · 4 actions. Web page: https://docs.lodol.com/docs/integrations/yelp

## Actions

### Get business details

Look up detailed information about a specific Yelp business.

**Inputs**

- Business ID (`business_id`, text, required): The ID of the Yelp business to look up.

**Outputs**: Detailed information about a single business.

- `categories` (list): Category labels, such as 'Italian' or 'Coffee & Tea'.
- `id` (text): Yelp business ID.
- `name` (text): Business name.
- `phone` (text): Business phone number.
- `price` (text): Price level, shown as $ to $$$$.
- `rating` (number): Average star rating from 1 to 5.
- `review_count` (number): Total number of reviews.
- `url` (text): Link to the business page on Yelp.

**Example output**

```json
{
  "categories": [
    "French",
    "Fine Dining"
  ],
  "id": "the-french-laundry-yountville",
  "name": "The French Laundry",
  "phone": "+17079442380",
  "price": "$$$$",
  "rating": 4.5,
  "review_count": 3200,
  "url": "https://www.yelp.com/biz/the-french-laundry-yountville"
}
```

### Get business reviews

List reviews for a Yelp business. Requires a Yelp Places Enhanced or Premium plan: API keys on the free Basic plan will get a 404 error from Yelp for this action.

**Inputs**

- Business ID (`business_id`, text, required): The ID of the Yelp business to get reviews for.
- Limit (`limit`, number): Maximum number of reviews to return. Yelp's API caps this endpoint at 3 review excerpts regardless of the value requested.

**Outputs**

- `count` (number): Number of reviews returned.
- `reviews` (list): Review excerpts for the business.

**Example output**

```json
{
  "count": 1,
  "reviews": [
    {
      "id": "xAG4O7l-t1ubbwVAlPnDKg",
      "rating": 5,
      "text": "Amazing meal from start to finish.",
      "time_created": "2024-05-01 12:00:00",
      "url": "https://www.yelp.com/biz/the-french-laundry-yountville",
      "user": "Alex M."
    }
  ]
}
```

### Search businesses

Search for businesses on Yelp by keyword and location.

**Inputs**

- Term (`term`, text, required): What to search for, such as a cuisine, business name, or keyword.
- Location (`location`, text, required): City, neighborhood, or address to search in.
- Limit (`limit`, number): Maximum number of results to return. Defaults to 5.
- Categories (`categories`, text): Filter results by a Yelp category, for example restaurants.
- Price level (`price`, text): Only show businesses at this price level. One of: `1` ($ (least expensive)), `2` ($$), `3` ($$$), `4` ($$$$ (most expensive)).
- Sort results by (`sort_by`, text): How to order the businesses. Defaults to best match. One of: `best_match` (Best match), `rating` (Highest rated), `review_count` (Most reviewed), `distance` (Closest first). Default: `best_match`.
- Open now (`open_now`, true/false): Set to true to only include businesses that are open right now.

**Outputs**

- `businesses` (list): Matching businesses, best match first.
- `count` (number): Number of businesses returned.

**Example output**

```json
{
  "businesses": [
    {
      "id": "the-french-laundry-yountville",
      "location": "6640 Washington St",
      "name": "The French Laundry",
      "phone": "+17079442380",
      "rating": 4.5,
      "review_count": 3200,
      "url": "https://www.yelp.com/biz/the-french-laundry-yountville"
    }
  ],
  "count": 1
}
```

### Search events

Find events on Yelp by location. Requires your Yelp app to be enrolled in Yelp's developer beta: join from the app's 'Manage App' page, otherwise this returns a 403 NOT_IN_DEVELOPER_BETA error.

**Inputs**

- Location (`location`, text, required): City, neighborhood, or address to find events in.
- Limit (`limit`, number): Maximum number of events to return. Defaults to 5.
- Sort events by (`sort_on`, text): How to order the events. Defaults to most popular. One of: `popularity` (Most popular), `time_start` (Starting soonest). Default: `popularity`.

**Outputs**

- `count` (number): Number of events returned.
- `events` (list): Events matching the search.

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "category": "food-and-drink",
      "description": "Weekly farmers market by the waterfront.",
      "id": "oakland-jack-london-square-farmers-market",
      "is_free": true,
      "name": "Jack London Square Farmers Market",
      "time_start": "2024-06-02 10:00:00",
      "url": "https://www.yelp.com/events/oakland-jack-london-square-farmers-market"
    }
  ]
}
```
