Yelp Filters API
When SerpApi encounters filters, we add them to our JSON output as the filters
object. We are able to extract their text
and values
. You can use filters to pass values to area parameter l, category parameter cflt, and filters parameter attrs.
API Examples
Filters overview
{
...
"filters": {
"neighborhoods": {
"value": "p:NY:New_York:",
"list": [
{
"text": "Woodside",
"value": "Queens:Woodside"
},
{
"text": "Annadale",
"value": "Staten_Island:Annadale"
},
{
"text": "Bullshead",
"value": "Staten_Island:Bullshead"
},
...
]
},
"distance": [
{
"text": "Bird's-eye View",
"value": "g:-74.09660339355469,40.62750334315296,-73.89198303222656,40.783660996197945"
},
{
"text": "Driving (5 mi.)",
"value": "g:-74.04544830322266,40.666316664620794,-73.9431381225586,40.744395800976775"
},
{
"text": "Biking (2 mi.)",
"value": "g:-74.01987075805664,40.685975199914836,-73.96871566772461,40.72501469240076"
},
...
],
"price": [
{
"text": "$",
"value": "RestaurantsPriceRange2.1"
},
{
"text": "$$",
"value": "RestaurantsPriceRange2.2"
},
{
"text": "$$$",
"value": "RestaurantsPriceRange2.3"
},
...
],
"category": [
{
"text": "Custom Cakes",
"value": "customcakes"
},
{
"text": "Fruits & Veggies",
"value": "markets"
},
{
"text": "International Grocery",
"value": "intlgrocery"
},
...
],
"features": [
{
"text": "Offering a Deal",
"value": "ActiveDeal"
},
{
"text": "Waitlist",
"value": "OnlineWaitlistReservation"
},
{
"text": "Validated Parking",
"value": "BusinessParking.validated"
},
...
]
},
...
}