Endpoints and credits
A search with no matching businesses, failed requests, invalid input, filters Yelp does not apply,
locations Yelp cannot find and repeats answered from the response cache (
X-Cache: HIT) are not
billed. Read X-Credits-Used for the charge on a response,
and the pricing page for the current price of credits. Keys
restricted to particular APIs need the yelp scope.
Quickstart
Markets
market=us (www.yelp.com, default) and market=ca (www.yelp.ca). The free
markets endpoint lists code, name, domain, language and
currency. Other Yelp country sites are not supported yet.
Filters and sorting
location(required): a city, neighbourhood, address or postcode, as typed into Yelp.query: what to look for, such aspizzaorplumbers. Optional whencategoryis set.category: a Yelp category alias such aspizza,coffeeorplumbing. Aliases appear incategories[].aliasand in thefiltersblock of a previous response.sort_by:recommended(default),ratingorreview_count. These are Yelp’s own orders.price: comma-separated levels1to4($to$$$$), for example1,2.features: comma-separateddelivery,takeout,reservations,outdoor_seating,good_for_kids,dogs_allowed,free_wifi,wheelchair_accessible.
422 filter_not_applied instead of wider
results. Unknown, repeated or malformed parameters received by the API gateway return 422
before Yelp is contacted.
Query validation runs after ingress parsing. Use & between parameters and percent-encode
values (as in the examples above). The ingress treats a bare ; as a parameter separator:
location=SF;page=2 reaches the gateway as location=SF&page=2 and can perform a billed search,
rather than return 422. To include a semicolon inside a value, encode it as %3B.
Pagination
Ten businesses per page,page 1 to 11 (up to 110 businesses for one search). Yelp challenges
direct requests for deeper pages. Follow next_page while has_next_page is true; the last page can
hold fewer than ten businesses. To cover more of a city, split the search by neighbourhood,
postcode or category and deduplicate by id.
Response
The envelope carriesmarket, query, location, location_resolved (the city, state, country and
centre coordinates Yelp searched), did_you_mean, query_matched, total_results (Yelp’s reported
total), page, page_size, total_pages, has_next_page, next_page, results, ads, filters,
related_searches, source_url, fetched_at (ISO 8601 UTC) and fetched_utc (Unix seconds).
Each business has position (its 1-based place in Yelp’s organic order across pages: Yelp’s own
number where Yelp numbers the results, Yelp’s listed order for unnumbered services searches such as
plumbers, and the slot order for ads), is_ad,
id, alias, name, url, rating, review_count, price, price_level, categories
(title, alias), neighborhoods, address, city, phone (shown on sponsored cards only),
timezone, opening_hours (day, open, close in local time), snippet, snippet_type,
highlights, tags, photos, alternate_names, is_service_area_business, is_yelp_guaranteed,
has_verified_license and, for ads, ad_placement. Fields Yelp does not show are null or empty.
Yelp’s search page does not carry per-business coordinates.
When Yelp cannot place a query (for example a nonsense word), query_matched is false and Yelp
either shows its broader ranking for the location, returned as Yelp shows it and billed like any
page, or its own no-results page. A search Yelp itself marks as having no results returns
results: [] and costs 0 credits.

