JustSERPDocs
Yelp

Yelp search

A Yelp search page ("Top 10 Best Pizza in Austin, TX"): ten businesses in rank order, the sponsored ones apart.

GET
/v1/yelp/search

A Yelp search page ("Top 10 Best Pizza in Austin, TX"): ten businesses in rank order, the sponsored ones apart. Yelp shows a visitor 24 pages of a search, so total_results is 240 for any common search.

In the document form. $1 request $2 q, price, filters, page or device, and none of query, start, attrs, is the document-form Yelp Search call (q, location required, sort_by, price 1-4, category, filters, page 1-24, device), answered as the document: search_metadata, search_parameters, search_information (query_displayed, location_displayed, total_results, location), ads, local_results (position, place_id Yelp's encrypted id, alias, title, link, rating, reviews, price, categories, address, review_snippet, description, highlights, thumbnail, neighborhoods), related_searches, breadcrumbs and pagination. device (mobile is the default) reads Yelp's desktop page either way: 10 results a page, and without the fields only the phone page has (distance, extracted_distance, an organic result's phone, category alias, ad tracking_link, images). sort_by rating / review_count is a 400 unless device is desktop. Not read: is_service_area_business, images.

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
query?string

What to search for (Yelp's find_desc). Required unless category.

Length1 <= length
location?|

Where (find_loc): "Austin, TX", "Brooklyn, NY", a ZIP code.

category?string

A Yelp category alias (cflt): dentists, plumbing, mexican.

start?integer

The result to start from; 10 for the second page.

Range0 <= value <= 1000
Default0
sort_by?|

rating and review_count are a 400 unless device is desktop.

attrs?string

Yelp's attrs filter, passed as it is.

country?string

Two letters, any case (us, GB).

Match^[A-Za-z]{2}$
q?string

Optional (with category or alone).

Lengthlength <= 128
price?string

1 to 4, comma-separated.

filters?string

Yelp attribute tokens, comma-separated.

page?integer
Range1 <= value <= 24
Default1
device?string

Both read Yelp's desktop page (10 results a page, no distance, extracted_distance, an organic result's phone, category alias, ad tracking_link, images). Echoed in search_parameters.

Default"mobile"
Value in"mobile""desktop"

Response Body

The search page; with the document-form parameters, the document (local_results: [] and error when Yelp lists nothing).

application/json
  1. response

The first three keys of every parsed 200 (the answer is the document itself, no success/data envelope): what the search was (search_metadata), what it asked (search_parameters), the parser's own search_information ({} when it has none). The engine's blocks follow, at the same level. An engine whose answer is a list puts it under results.

search_metadata*
search_parameters*

The request's own fields as sent, engine first, without cancel_token.

search_information*

The parser's own, e.g. yelp_search's; otherwise {}.

ads_results?array<>
organic_results?array<>

Ten a page; fewer on the last.

related_searches?array<>
pagination?
Example Request
curl -X GET 'https://api.justserp.com/v1/yelp/search?query=Pizza&location=Austin%2C+TX'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {    "title": "string",    "description": "string",    "query": "string",    "location": "string",    "category": "string",    "results_label": "string",    "total_results": 0,    "did_you_mean": "string",    "breadcrumbs": [      {        "title": "string",        "link": "string"      }    ]  },  "ads_results": [    {      "position": 0,      "place_ids": [        "string"      ],      "title": "string",      "link": "string",      "reviews_link": "string",      "categories": [        {          "title": "string",          "link": "string"        }      ],      "price": "string",      "rating": 0,      "reviews": 0,      "address": "string",      "neighborhoods": [        "string"      ],      "phone": "string",      "snippet": "string",      "snippet_highlighted_words": [        "string"      ],      "snippet_type": "string",      "highlights": [        "string"      ],      "tags": [        "string"      ],      "service_options": {        "property1": true,        "property2": true      },      "response_time": "string",      "verified_licenses": [        {          "trade": "string",          "license_number": "string",          "issued_by": "string",          "licensee": "string",          "expires": "string",          "verified": "2019-08-24"        }      ],      "thumbnail": "string",      "block": "string"    }  ],  "organic_results": [    {      "position": 0,      "place_ids": [        "string"      ],      "title": "string",      "link": "string",      "reviews_link": "string",      "categories": [        {          "title": "string",          "link": "string"        }      ],      "price": "string",      "rating": 0,      "reviews": 0,      "address": "string",      "neighborhoods": [        "string"      ],      "phone": "string",      "snippet": "string",      "snippet_highlighted_words": [        "string"      ],      "snippet_type": "string",      "highlights": [        "string"      ],      "tags": [        "string"      ],      "service_options": {        "property1": true,        "property2": true      },      "response_time": "string",      "verified_licenses": [        {          "trade": "string",          "license_number": "string",          "issued_by": "string",          "licensee": "string",          "expires": "string",          "verified": "2019-08-24"        }      ],      "thumbnail": "string"    }  ],  "related_searches": [    {      "title": "string",      "link": "string",      "group": "string"    }  ],  "pagination": {    "start": 0,    "results_per_page": 0,    "total_results": 0,    "current_page": 0,    "next_start": 0  }}