How do you search a game title and get back the id for the web page (3030-9169)? Or is there a way to download a complete game list with the associate identifiers?
URL game identifier search
You should be able to get what you want through the games resource:
http://www.giantbomb.com/api/games/?format=jsonp&api_key=YOUR_API_KEY
The id will be returned along with the site_detail_url if all you really want is a link to the page on GB. In order to get a full list, you'll need to iteratively bump up the offset parameter until you've retrieved all of the results. For instance, to get the second set of 100 results:
http://www.giantbomb.com/api/games/?format=jsonp&api_key=YOUR_API_KEY&offset=100
That returns a 4 digit ID number. I'm looking for a list of all the game's URL ID numbers that look like 3030-9169.
@rangersedge: The "3030" part of that never changes - it's just some identifier for the "games" entry type. The other half of that is the id that you can retrieve through the API.
I thought I have seen some where the "3030" part was different. So... to get a list of all the games I would also need to use the limit filter set to say... 100, then use the offset for each query to get the next 100? So the first query would be 1-100, the second query would use offset 100 and return records 101-200?
There are pages that are not 3030, but that's because they're not games. You don't have to worry about those.
Incrementing the offset should get you all game pages, unless a page is deleted while you're doing this causing another game to shift to a previous page and not appear in your results. That would suck.
Please Log In to post.
Log in to comment