-1

Given a user ID on YELP.com, how can I fetch the reviews written by that person? PS, I'm using yelpapi package in Python. My code is simple and as an example to search for a specific term I have it is something like the following. But I need to search based on a "user_id" instead of "term" or "location" in my example. Apparently search_query doesn't have any argument for user ID.

from yelpapi import YelpAPI
from pprint import pprint


CONSUMER_KEY = ''
CONSUMER_SECRET = ''
TOKEN = ''
TOKEN_SECRET = ''


yelp_api = YelpAPI(CONSUMER_KEY, CONSUMER_SECRET, TOKEN, TOKEN_SECRET)

response = yelp_api.search_query(term = 'Restaurant', location = 'Prodidence, RI',
                                 sort = 2, limit = 1)
pprint(response)
Pouya Kh
  • 43
  • 1
  • 6
  • Hi! Welcome to StackOverflow! What do you have so far and what problems did you run into? (and for future notice, please read this help page on how to ask a good question: http://stackoverflow.com/help/how-to-ask) – NightShadeQueen Jun 29 '15 at 19:37
  • Thanks! I just modified my question. I hope it's clear now. – Pouya Kh Jun 29 '15 at 19:48

1 Answers1

0

You aren't able to. The Yelp API is intentionally limited to a few types of queries, and grabbing user data is not available.

Leon
  • 194
  • 1
  • 1
  • 10