Yelp API endpoint
Searches Yelp businesses for a term and location.
/yelp/searchQuery parameters:
term (required): search term, e.g. pizza.location (required): neighborhood, city, state, or zip code, e.g. San Francisco, CA.limit: maximum results to return, 1 through 50. Defaults to 20.offset: pagination offset. Defaults to 0.Returns business listings with ratings, review counts, categories, address, coordinates, and photos. An empty results array is a valid no-match response.
| Field | Filled in, of 20 checked | Values in the sample |
|---|---|---|
| id | 20 | |
| alias | 20 | “tonys-pizza-napoletana-san-francisco” and 19 other values |
| encoded_id | 20 | |
| name | 20 | “Tony's Pizza Napoletana” and 17 other values |
| url | 20 | yelp.com |
| photos | 20 | median 1 entry |
| rating | 20 | 4 to 4.5, median 4.5 |
| review_count | 20 | 116 to 9,040, median 506 |
| price | 18 | $$ (11), $ (7) |
| categories | 20 | median 2 entries |
| address | 20 | |
| address_details | 20 | |
| coordinates | 20 | |
| neighborhoods | 20 | median 1 entry |
| phone | 18 | 4,153,345,700 to 6,283,338,529, median 4,156,685,577 |
| phone_number | 18 | |
| closed | 20 | true in 0 of 20 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| term | string | Yes | Search term | pizza | |
| location | string | Yes | Neighborhood, city, state, or zip code | San Francisco, CA | |
| limit | integer | No | Max results to return, 1-50 | 20 | |
| offset | integer | No | Pagination offset | 0 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/yelp/search?term=pizza&location=San+Francisco%2C+CA&limit=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"term": "pizza",
"location": "Chicago, IL",
"limit": 3,
"offset": 0,
"total": 240,
"results": [
{
"id": "pequods-pizza-chicago-3",
"alias": "pequods-pizza-chicago-3",
"encoded_id": "DXwSYgiXqIVNdO9dazel6w",
"name": "Pequod's Pizza",
"url": "https://www.yelp.com/biz/pequods-pizza-chicago-3",
"photos": [
"https://s3-media0.fl.yelpcdn.com/bphoto/8QJUNblfCI0EDhOjuIWJ4A/ms.jpg"
],
"rating": 4,
"review_count": 8947,
"price": "$$",
"categories": [
"Pizza"
],
"address": "2207 N Clybourn Ave, Chicago, IL 60614",
"address_details": {
"address_line_1": "2207 N Clybourn Ave",
"city": "Chicago",
"state": "IL",
"postal_code": "60614",
"country": "US"
},
"coordinates": {
"latitude": 41.92187,
"longitude": -87.664486
},
"neighborhoods": [
"DePaul"
],
"phone": "7733271512",
"phone_number": "(773) 327-1512",
"closed": false
}
]
}
}Request schema
No body schema
Response schema
#/definitions/yelp.mobileSearchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | yelp.MobileSearchResponse | No | ||||
| data.limit | integer | No | 20 | |||
| data.location | string | No | San Francisco, CA | |||
| data.offset | integer | No | 0 | |||
| data.results | array | No | ||||
| data.results[].address | string | No | ||||
| data.results[].address_details | yelp.AddressDetails | No | AddressDetails record, 8 fields: address_line_1, address_line_2, address_line_3, city, country, formatted_address, postal_code, state. Described under Yelp Business API. | |||
| data.results[].alias | string | No | ||||
| data.results[].categories | array | No | ||||
| data.results[].claimed | boolean | No | ||||
| data.results[].closed | boolean | No | ||||
| data.results[].coordinates | yelp.Coordinates | No | ||||
| data.results[].coordinates.latitude | number | No | ||||
| data.results[].coordinates.longitude | number | No | ||||
| data.results[].encoded_id | string | No | ||||
| data.results[].id | string | No | tonys-pizza-napoletana-san-francisco | |||
| data.results[].image | string | No | ||||
| data.results[].name | string | No | ||||
| data.results[].neighborhoods | array | No | ||||
| data.results[].phone | string | No | ||||
| data.results[].phone_number | string | No | ||||
| data.results[].photos | array | No | ||||
| data.results[].price | string | No | ||||
| data.results[].rating | number | No | ||||
| data.results[].review_count | integer | No | ||||
| data.results[].url | string | No | ||||
| data.results[].website | string | No | ||||
| data.term | string | No | pizza | |||
| data.total | integer | No | 240 | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/yelp/search?term=pizza&location=San+Francisco%2C+CA&limit=10" \
-H "x-api-key: $CRAWLORA_API_KEY"