Search businesses
curl --request GET \
--url https://scrapebadger.com/v1/yelp/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://scrapebadger.com/v1/yelp/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/yelp/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yelp/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yelp/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yelp/search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yelp/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"market": "<string>",
"query": "<string>",
"location": "<string>",
"location_resolved": {
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"query_matched": true,
"total_results": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"has_next_page": true,
"results": [
{
"position": 123,
"is_ad": true,
"id": "<string>",
"alias": "<string>",
"name": "<string>",
"url": "<string>",
"rating": 123,
"review_count": 123,
"price": "<string>",
"price_level": 123,
"categories": [
{
"title": "<string>",
"alias": "<string>"
}
],
"neighborhoods": [
"<string>"
],
"address": "<string>",
"city": "<string>",
"phone": "<string>",
"timezone": "<string>",
"opening_hours": [
{
"day": "<string>",
"open": "<string>",
"close": "<string>"
}
],
"snippet": "<string>",
"snippet_type": "<string>",
"highlights": [
"<string>"
],
"tags": [
"<string>"
],
"photos": [
"<string>"
],
"alternate_names": [
"<string>"
],
"is_service_area_business": true,
"is_yelp_guaranteed": true,
"has_verified_license": true,
"ad_placement": "<string>"
}
],
"ads": [
{
"position": 123,
"is_ad": true,
"id": "<string>",
"alias": "<string>",
"name": "<string>",
"url": "<string>",
"rating": 123,
"review_count": 123,
"price": "<string>",
"price_level": 123,
"categories": [
{
"title": "<string>",
"alias": "<string>"
}
],
"neighborhoods": [
"<string>"
],
"address": "<string>",
"city": "<string>",
"phone": "<string>",
"timezone": "<string>",
"opening_hours": [
{
"day": "<string>",
"open": "<string>",
"close": "<string>"
}
],
"snippet": "<string>",
"snippet_type": "<string>",
"highlights": [
"<string>"
],
"tags": [
"<string>"
],
"photos": [
"<string>"
],
"alternate_names": [
"<string>"
],
"is_service_area_business": true,
"is_yelp_guaranteed": true,
"has_verified_license": true,
"ad_placement": "<string>"
}
],
"filters": {},
"related_searches": [
{
"name": "<string>",
"url": "<string>"
}
],
"source_url": "<string>",
"fetched_at": "<string>",
"fetched_utc": 123,
"did_you_mean": "<string>",
"next_page": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API reference
Search businesses
Ranked Yelp businesses for a location, with ads kept separate.
GET
/
v1
/
yelp
/
search
Search businesses
curl --request GET \
--url https://scrapebadger.com/v1/yelp/search \
--header 'X-API-Key: <api-key>'import requests
url = "https://scrapebadger.com/v1/yelp/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://scrapebadger.com/v1/yelp/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/yelp/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/yelp/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/yelp/search")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/yelp/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"market": "<string>",
"query": "<string>",
"location": "<string>",
"location_resolved": {
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"query_matched": true,
"total_results": 123,
"page": 123,
"page_size": 123,
"total_pages": 123,
"has_next_page": true,
"results": [
{
"position": 123,
"is_ad": true,
"id": "<string>",
"alias": "<string>",
"name": "<string>",
"url": "<string>",
"rating": 123,
"review_count": 123,
"price": "<string>",
"price_level": 123,
"categories": [
{
"title": "<string>",
"alias": "<string>"
}
],
"neighborhoods": [
"<string>"
],
"address": "<string>",
"city": "<string>",
"phone": "<string>",
"timezone": "<string>",
"opening_hours": [
{
"day": "<string>",
"open": "<string>",
"close": "<string>"
}
],
"snippet": "<string>",
"snippet_type": "<string>",
"highlights": [
"<string>"
],
"tags": [
"<string>"
],
"photos": [
"<string>"
],
"alternate_names": [
"<string>"
],
"is_service_area_business": true,
"is_yelp_guaranteed": true,
"has_verified_license": true,
"ad_placement": "<string>"
}
],
"ads": [
{
"position": 123,
"is_ad": true,
"id": "<string>",
"alias": "<string>",
"name": "<string>",
"url": "<string>",
"rating": 123,
"review_count": 123,
"price": "<string>",
"price_level": 123,
"categories": [
{
"title": "<string>",
"alias": "<string>"
}
],
"neighborhoods": [
"<string>"
],
"address": "<string>",
"city": "<string>",
"phone": "<string>",
"timezone": "<string>",
"opening_hours": [
{
"day": "<string>",
"open": "<string>",
"close": "<string>"
}
],
"snippet": "<string>",
"snippet_type": "<string>",
"highlights": [
"<string>"
],
"tags": [
"<string>"
],
"photos": [
"<string>"
],
"alternate_names": [
"<string>"
],
"is_service_area_business": true,
"is_yelp_guaranteed": true,
"has_verified_license": true,
"ad_placement": "<string>"
}
],
"filters": {},
"related_searches": [
{
"name": "<string>",
"url": "<string>"
}
],
"source_url": "<string>",
"fetched_at": "<string>",
"fetched_utc": 123,
"did_you_mean": "<string>",
"next_page": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Returns one page of up to ten organic businesses in Yelp’s ranking, sponsored listings in
ads,
Yelp’s filter options for the search and pagination metadata.
Credits: 15 per page with results. Empty searches and failed requests
are unbilled.
location is required (at most 128 characters). page is 1 to 11. features and price are
comma lists; every filter must be applied by Yelp or the request returns 422 filter_not_applied.
query_matched: false means Yelp could not place the query: it shows either its broader ranking
(billed) or its own no-results page (results: [], free).
Errors
Invalid, unsupported or malformed parameters received by the API gateway return422.
Ingress parsing happens first: a bare ; separates parameters, so location=SF;page=2 can
perform a billed page-2 search. Use & between parameters and %3B for a semicolon inside a
value; see the query encoding notes.
A location Yelp cannot find returns
400 invalid_location. Unavailable source content returns 503 instead of a billable empty result.
A key without the yelp scope returns 403.
See the overview for markets, filters, fields and pagination.Query Parameters
Response
Successful Response

