Geoffrey Fairchild
This software is licensed under the BSD 3-Clause License. Please refer to the separate LICENSE.txt file for the exact text of the license. You are obligated to give attribution if you use this code.
yelpapi is a pure Python implementation of the Yelp Fusion API (aka Yelp v3 API). It is simple, fast, and robust to any changes Yelp may make to the API in the future.
Note: yelpapi v1.4 was the last version to support the Yelp v2 API, which is slowly being deprecated. All developers should migrate to the new Yelp Fusion API as soon as possible.
This code requires Python 2.7 or higher and requests_oauthlib.
yelpapi is available on PyPI at https://pypi.python.org/pypi/yelpapi.
Install using pip:
pip install yelpapi
Install from source:
python setup.py install
This API is demonstrated more thoroughly in examples.py, but the following chunk of code demonstrates basic use of yelpapi.
from yelpapi import YelpAPI
yelp_api = YelpAPI(client_id, client_secret)
search_results = yelp_api.search_query(args)
- Search API:
search_query(args)
- Phone Search API:
phone_search_query(phone=[PHONE_NUMBER], other_args)
- Business Match API:
business_match_query(args)
(NOTE: Use of this API call requires your app join the Yelp Developer Beta Program) - Transaction Search API:
transaction_search_query(transaction_type=[TRANSACTION_TYPE], other_args)
- Business API:
business_query(id=[BUSINESS_ID], other_args)
- Reviews API:
reviews_query(id=[BUSINESS_ID], other_args)
- Autocomplete API:
autocomplete_query(text=[SEARCH_TEXT], other_args)