JSON format filter not working

Avatar image for s0l1d
s0l1d

5

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 6

I'm utilizing the video_shows and videos APIs. The following example is currently returning XML instead of JSON.

https://www.giantbomb.com/api/video_shows/?api_key=[YOUR API KEY]&format=&field_list=id,title

This appears to have start 11/1 or 11/2.

Avatar image for swordstruck
swordstruck

108

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Well, you aren't specifying the format. Your 'format=' should be 'format=json'.

Avatar image for s0l1d
s0l1d

5

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 6

I was copying and pasting from a script, and I missed the "json" in "format=json".

I adjusted the script to output the full response:

Wordpress RSS Reader, Anonymous Bot or Scraper Blocked

Sorry we do not allow WordPress plugins to scrape our site. They tend to be used maliciously to steal our content. We do not allow scraping of any kind. You can load our RSS feeds using any other reader but you may not download our content. Click here more information on our feeds

Or you're running a bot that does not provide a unique user agent. Please provide a UNIQUE user agent that describes you. Do not use a default user agent like "PHP", "Java", "Ruby", "wget", "curl" etc. You MUST provide a UNIQUE user agent. ...and for God's sake don't impersonate another bot like Google Bot that will for sure get you permanently banned.

Or.... maybe you're running an LG Podcast player written by a 10 year old. Either way, Please stop doing that.

Avatar image for dancingpolkabear
dancingpolkabear

237

Forum Posts

44

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

What are you setting for your user agent header?

Avatar image for s0l1d
s0l1d

5

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 6

I'm not. I wouldn't think you would need to set a user agent to consume an API with a key.

Avatar image for s0l1d
s0l1d

5

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 6

Setting the user agent does appear to resolve the issue though.

Avatar image for paulwgraham
paulwgraham

156

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@s0l1d:Yeah, that user agent thing is weird. Having spent a bunch of time playing with the API I can tell you that it has a lot of little quirks. To avoid another gotcha I recommend that before you start querying in earnest that you make sure you have some caching and rate limiting set up. It's surprisingly easy to hit whatever limit they have set up and get throttled.

You can check your API Usage status here:

https://www.giantbomb.com/api/