Yelp currently has over 115 million reviews. Even better? You can access them programmatically. Today, we’re profiling Yelp’s Fusion API in our #12DaysOfAPIs series. We talked to the API tech lead, Tomer Elmalem, to get the inside scoop.
What the Yelp Fusion API can do
Using Yelp’s Fusion API, you can search local businesses and pull reviews, phone numbers and accepted transaction types (ex. food delivery and pick-up). The Yelp Fusion API actually is made up of multiple APIs, but we combined them all into a single package that lets you make calls straight from your browser. You can also export the code snippet directly into your script.
Although we do always love a good nom, Yelp’s API isn’t just for restaurant reviews.
In fact, we were surprised to learn that restaurants aren’t even the most popular category on Yelp. You can export data from any local business with a Yelp page, from dentist offices to dog washers.
How to Use the Yelp Fusion API
We’ll show you how to use the Yelp API using the steps below:
Step 1: Get the Yelp API Credentials
In order to use the Yelp API, you’ll need to register for a Yelp account and get the
appSecret. Here’s how to get them:
- Sign up or Log in to Yelp
- Go to Create App
- Now you can get the
appSecreton this page.
Step 2: Make a call with RapidAPI
Now that you have the
appSecret, head over to RapidAPI’s Yelp package page. Use the
getAccessToken endpoint to (you guessed it!) generate an access token for the app.
After generating an access token, you can start to pull information from the API. Here’s a yelp fusion api example call of the
getBusinesses endpoint searching for ramen in San Francisco.
Check out the package for yourself here to make a test call.
You could build a lot with this data. One of our favorite integrations is this map of San Francisco by Katie Hempenius.
Source: Katie Hempenius
Some of the coolest integrations though, are from combining the Yelp API with other APIs. Since RapidAPI lets you call multiple APIs through one abstraction layer, the process doesn’t involve spending all your time digging through docs. Here are some project ideas that you could build with multiple APIs:
- Extract phone numbers from the Yelp API and make calls with the Twilio API (here’s our #12DaysOfAPIs profile on Twilio and API tutorial for reference)
- Build a lunch recommendation Slack bot that can pull highest rated Yelp places around your office. You can build the script to respond to user input (ex. “Chinese, $”) or generate top-rated places randomly. (Pro tip: use the Wit.Ai or API.AI packages to make the bot more conversational).
Let us know what you build in the comments below! We’d love to see your projects.
Why we ❤️ Yelp: Commitment to developers and open source
One thing we love about Yelp is their commitment to providing developers with as many tools and as much data as possible. Yes, the Yelp Fusion API uses the exact same search and autocomplete functions that the Yelp website uses. But the company also provides a robust open source platform with over 76 projects, including their Python PaaSTA (platform as a service) platform.
In addition to the Fusion API and open source platform, Yelp also offers a more comprehensive knowledge platform with deeper data, including sentiment analysis. The reviews giant also puts on an annual data set student challenge with a cash prize. Overall, Yelp seems pretty committed to inviting developers involved–they even have a $15,000 bug bounty program.
Behind the scenes: Yelp’s move from monolith to microservices
After speaking with Tomer, we learned more about Yelp’s commitment to APIs internally. They have a great content series explaining the technical challenges of moving from one giant monolith to multiple microservices. Here’s a quick overview from one article:
In 2011, Yelp had more than a million lines of code in a single monolithic repo, “yelp-main”. We decided to break the monolith apart into a service oriented architecture (SOA), and by 2014 had more than 150 production services, with over 100 services owning data. Breaking apart “yelp-main” allowed Yelp to scale both development and the application, especially when coupled with our platform-as-a-service, PaaSTA.
We also had the pleasure of hearing Infrastructure Tech Lead John Billings speak at API World in 2016. He explained that, while the monolith still exists (with 3M lines of code), Yelp has been able to move 891K lines, or 22% of its code base, into microservices. Here’s a slide he showed demonstrating how quickly the Yelp team embraced microservices over the years.
The code base is primarily in Python, so if this kind of work interests you and you write in Python, check out their openings.
Happy coding and stay tuned for more API profiles!
Looking for other mapping APIs? Click here to see more related APIs.
Yelp API FAQ
What is the Yelp Fusion API?
The Yelp Fusion API gives developers access to Yelp’s wealth of high quality, local content across 50 million businesses
across our 32 international markets. Check out our
announcement on the Yelp
How can I get started using the Yelp Fusion API?
You’ll need to register with a Yelp user account. If you don't already have one, please visit
https://www.yelp.com/signup to sign up for one now. If you are a Yelp Business Owner
Account user, please note this is different from a regular Yelp user account and you must be logged out of your
Yelp Business Owner Account in order to sign up for the API.
Once you have a Yelp user account and have signed in, you can go to the
Manage App page to create an app with Yelp. Then, you'll get your API Key, which
you can use to call our API. The detail instructions are at
Get started with Yelp Fusion API. Please make sure you fully agree with
What is Yelp's GraphQL API?
Let's first explain GraphQL – it is a query language for APIs that places emphasis on being able to query for exactly
the data you want. GraphQL gives you the ultimate flexibility in being able to specify in your API requests specifically what
data you need, and get back exactly that. The Yelp GraphQL API will allow you to customize the request and responses when
retrieving Yelp data.
How do I sign up for access to Yelp's GraphQL API?
GraphQL is part of the Yelp Developer Beta program which grants developers early access to new and experimental features. To
sign up for the Developer Beta program, goto the
Manage App page and click the Join button.
How do I ask questions and provide feedback?
Just open issues at
How many API requests do I receive? What happens if I exceed my daily limit?
By default, you’ll receive 5,000 calls per day. Any call you make after that in the same day will get back a response with
status code 429 (Too Many Requests). Daily limits are reset every midnight UTC time.
How can I check how many remaining API calls I have left?
How much does it cost to use the Yelp API? Is there a fee if I need more than 5,000 calls per day?
The API is open and free for default access with additional rate limit volumes provided case-by-case. See instructions for
requesting a higher access limit at
Can I cache data from the API?
Yes, although with great power comes great responsibility. You may cache Yelp API content for up a maximum of 24 hours.
Business ids can be stored indefinitely.
Can I use the Yelp API for academic research?
For years, we’ve provided access to a subset of rich Yelp content through our academic dataset. Jump in and participate in
Dataset Challenge if you’re up to the task! Please also feel free to reach out to
[email protected] if you have an interesting research project in mind. We’d love
to hear from you.
What locales does the API support?
The Yelp API supports 42 locales using the locale parameter.
Here is the list of supported locales.
What will happen to API 2.0?
Yelp API 2.0 will be discontinued on June 30, 2018. Please check out
our announcement on the Yelp
Why does the API not return some businesses that I can find on Yelp?
We only return business info for business that have Yelp user-generated content added to them. Specifically, they must have
at least one review.
How can I get access to full review text?
The Yelp API does not return full review text. Three review excerpts of 160 characters are provided by default.
Can I change which reviews are returned for an API query?
In order to maintain a consistent Yelp experience across all platforms, the Yelp API uses a variety of factors to determine
and return a business’s top review excerpts. The sort order is determined by recency, user voting, and other review quality
factors to help consumers make informed decisions. The Yelp API cannot be configured to return alternative or hand-picked
Can I get coordinates of a business through the API?
Yes, the large majority of businesses returned by our API will have coordinates (latitude and longitude).
How do I filter by country?
The Yelp API returns results from all geographies where Yelp is available. To filter results to a specific city, make sure
you use the location parameter when using
What can I do with transaction search API? What kinds of businesses are currently supported?
We currently return all US-based businesses on Yelp which support food delivery through Yelp Eat24 and partners like
ChowNow, EatStreet, and Delivery.com.
What’s the best way to match a specific business?
We offer a few options for business matching based what data you have to match. If you know the business name and address
information, you can use the
business match API. If you have a phone number, you can use the
phone search API. You can also use
autocomplete API to provide suggestions for businesses, keywords and
Where can I get high resolution versions of the Yelp stars and logos?
Display Requirements is your friend.
How do I get more than 50 results per request and how to get more than 1000 businesses?
The API can only return up to 1,000 results at this time. The API doesn't allow more than 50 per request. You need to
use the offset parameter to get the next page of results. (For using offset, give it any number. If you have limit=50, that
means you're getting results 1-50, so give it offset=51 and you'll get 51-100.)
What image resolution options do you offer for business photos and user profile photos?
By default, we return the original full-sized resolution; we use 'o' for business photos from the Business Details
endpoint and 'o' for user profile photos (image_url) in the Reviews endpoint. Here are the different resolutions we
- 'o' (original): Up to 1,000×1,000
- 'l' (large): Up to 600×400
- 'm' (medium): Up to 100×100
- 'ms' (medium square): 100×100
- 's' (small): Up to 40×40
- 'ss' (small square): 40×40
That said, do keep in mind that sizing is not always consistent because users upload images at different resolutions.
What's the difference between the Yelp business ID and business alias?
Every Yelp business has both a unique ID, such as
4kMBvIEWPxWkWKFN__8SxQ, as well as a unique alias, such as
yelp-san-francisco. Both are returned for every business in any endpoint that returns business information. Generally,
business ID and business alias are interchangeable methods of identifying a Yelp Business.
The business alias is more human-readable, but often longer, than the business ID. The business alias may also contain
unicode characters, so it is recommended to use the business ID whenever possible.
There are many more business attributes on Yelp's website and mobile app than are listed in the API documentation here.
How do I access them?
Yelp's success is built on our first class data for local businesses, so we are careful with which data fields we expose
via our API. If you are building an app that would make awesome use of additional Yelp data, please apply for the
Fusion VIP program and share with us what additonal data you need to succeed.
If you think there is some piece of Yelp data not currently exposed via our API that we should consider adding to Fusion API
responses for everyone, please open an issue on our
Yelp Fusion GitHub page and make your case!