Search code examples
javajsonapifreebase

How to use freebase api to get all the tourist spots of a city? I can only get 10 from the returned JSON


I'm trying to use freebase to get all the tourist spots's name of a city, and I used request like below:

    https://www.googleapis.com/freebase/v1/topic/m/030qb3tprops=&lang=en&filter=%2Ftravel%2Ftravel_destination%2Ftourist_attractions

this should return 27 values, but in the returned JSON I can only get at most 10 values, how can I get all the tourist spots's name?


Solution

  • It looks like the default limit is 10 (which is probably reasonable since you're unlikely to want to show the user a list of dozens in the first overview).

    Try this to get more:

    https://www.googleapis.com/freebase/v1/topic/m/030qb3t?props=&lang=en&filter=%2Ftravel%2Ftravel_destination%2Ftourist_attractions&limit=30