Jump to content

Blocked by Cloudflare for API requests


miss_inputs
 Share

Recommended Posts

Well… this is a bit embarrassing for me. I was playing around with the PCGamingWiki API, just looking to grab data for a whole bunch of games I have in a list (not for any weird reason, I'm just listing my games locally in an attempt to solve my Steamdoku), and I had an idea: What if I just grab every single field in every Cargo table, and then have a look at it to see what I can really do with it? This was probably a bad idea, in retrospect. You can't just get them all at once with one query, because then the server rejects the request for the URL being too long. Fair enough. So I decided to go table by table, and grab all the fields in each table at a time. That seems to work, although maybe I'm not supposed to do that.

…And then I ran into a 403 error. Eh? This was from a script that I had running on a headless computer (which is possibly why my IP address making those requests was different than this computer I write forum posts on), so I didn't realise it was a Cloudflare thing at first, until I tried it again but printed out the response. HTML and not JSON? Uh oh. "Sorry, you have been blocked"? Double uh oh. Looks like I'm in trouble. My sincerest apologies if what I was doing is indeed not a thing I should do, I have no intentions of DDOSing the site, and hopefully nothing bad happened on the server end. I don't know if that goes away, but I don't think trying it again would accomplish much if my code was triggering "this pattern of requests looks like an attacker" heuristics. I don't really have a web browser (or a desktop environment, for that matter) on that other computer so I can't really tell if the whole website comes up with that, only on this computer it doesn't.

Is there a rate limit for the API? I didn't see one in the documentation. Happy to rate limit my script or do whatever else I can to avoid Cloudflare thinking I am a malicious actor, I'm not in any rush to get the data any time soon and if I should be waiting then I can wait. Is trying to get every field in every table just inherently a bad idea, and I should go back to the drawing board?

The message also tells me to include a Ray ID: 8d392085beedab02

I presume by "email the site owner" they mean contact _this_ site (and the contact us page leads me to here, and not email) and not contact Cloudflare, so hence I'm over here which seems to be the most appropriate subforum.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Found PCGamingWiki useful? Please consider making a Donation or visiting our Patreon.
  • Who's Online   2 Members, 0 Anonymous, 230 Guests (See full list)

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    1.8k
    Total Topics
    9.2k
    Total Posts
×
×
  • Create New...