Yelp / yelp-fusion

Yelp Fusion API
https://yelp.com/developers
MIT License
401 stars 394 forks source link

Can't search by term #676

Closed leodomitrovic closed 1 year ago

leodomitrovic commented 1 year ago

Overview

Description

I have been trying to search for businesses by term but I am getting validation error. I don't understand why is that because I have my API key in the header. I tried searching by location and it works. I tried searching by term and location at the same time and that also works. Is it possible to search just by term or it has to be combined with other parameters?

Endpoint

Fusion Search API

Parameters or Sample Request

https://api.yelp.com/v3/businesses/search?term=Starbucks

Response

AUTHORIZATION_ERROR

rockdog commented 1 year ago

Hi @leodomitrovic,

business search always requires location information, either locationor latitude and longitude. Just providing term is not supported.

You can read more about required/optional parameters here https://www.yelp.com/developers/documentation/v3/business_search.

leodomitrovic commented 1 year ago

Hi,

thank you for clarification. I am writing an Android app that sends requests to Yelp Fusion API and exception description said that authorization field is required. I tried to send request with Postman and then error code said that location is required.