"Yelp" (Service Connection)

Connect to the Yelp API using the Wolfram Language to search for restaurant and other business information.

Connecting & Authenticating

ServiceConnect["Yelp"] creates a connection to the Yelp API. If a previously saved connection can be found, it will be used; otherwise, a new authentication request will be launched.

Requests

ServiceExecute["Yelp","request",params] sends a request to the Yelp API, using parameters params. The following gives possible requests.

Search Businesses

Request:

"BusinessList" a List of businesses filtered by location, phone number, or query term

"BusinessDataset" a Dataset of businesses filtered by location, phone number, or query term

Parameters:
  • "Location"(required)GeoLocation or other place name
    "Radius"search radius
    "Query"Nonequery terms
    "Phone"Nonephone number
    "SortBy""BestMatch"sorting order ("Distance", "Rating", "BestMatch")
    MaxItems20number of elements to return
    "StartIndex"0index number of first result to return
    "Categories"Nonecategory or list or categories to filter by
    "InterpretEntities"Falsewhether to use Interpreter to find canonical representations of cities, states, etc.
  • Business Details

    Request:

    "BusinessInformation" data about a specific business

    Parameters:
  • "BusinessID"(required)business ID
    "InterpretEntities"Falsewhether to use Interpreter to find canonical representations of cities, states, etc.
  • List categories

    Request:

    "Categories" a list of valid categories

    Parameters:
  • "Query"Nonequery terms
    "Parent"Noneused to filter by parent alias
  • Examples

    Basic Examples  (1)

    Creating a connection to Yelp:

    In[1]:=
    Click for copyable input
    Out[1]=

    Search for Peruvian food in San Francisco:

    In[2]:=
    Click for copyable input
    In[3]:=
    Click for copyable input
    Out[3]=

    Get detailed information about a business:

    In[5]:=
    Click for copyable input
    Out[5]=

    Search for categories:

    In[6]:=
    Click for copyable input
    Out[6]=

    Search places by category:

    In[7]:=
    Click for copyable input
    Out[7]=