Description Usage Arguments Value References Examples
View source: R/business-search.R
Use the Yelp business search API to find businesses close to a give location.
1 2 3 4 5 6 | business_search(term, location, latitude = NULL, longitude = NULL,
radius_m = 40000, categories = NULL, locale = get_yelp_locale(),
limit = 20, offset = 0, sort_by = c("best_match", "rating",
"review_count", "distance"), price = 1:4, open_now = FALSE,
open_at = NULL, attributes = NULL,
access_token = Sys.getenv("YELP_ACCESS_TOKEN", NA))
|
term |
A string denoting the search term. |
location |
A string describing the location. If this is not provided,
then |
latitude |
A number representing the latitude to search close to. |
longitude |
A number representing the longitude to search close to. |
radius_m |
A number giving the radius, in metres, of the search circle around the specified location. |
categories |
A character vector of search categories to filter on,
or |
locale |
A string naming the locale. See |
limit |
An integer giving the maximum number of businesses to return. Maximum 50. |
offset |
An integer giving the number of businesses to skip before returning. Allows you to return more than 50 businesses (split between multiple searches). |
sort_by |
A string naming the metric to order results by. |
price |
A vector of integers in 1 (cheap) to 4 (expensive) denoting price brackets. |
open_now |
A logical value of whether or not to only return businesses that are currently open. |
open_at |
A time when to check if businesses are open. |
attributes |
A character vector of business attributes to filter on.
See |
access_token |
A string giving an access token to authenticate the API
call. See |
A data frame with 24 columns. Each row corresponds to one business.
https://www.yelp.com/developers/documentation/v3/business_search
1 2 3 | ## Marked as don't test because an access token is needed
delis_in_queens <- business_search("deli", "Queens, New York")
if(interactive()) View(delis_in_queens) else str(delis_in_queens)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.