It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
"api" returned 100 posts
Clear search criteria
high rated
http://api.gog.com/products?ids=2065676798

Above we have the REST API link for one of the more recent games released on GOG. What's there in the rest of the 2065676797 possible ids? Which areas are inhabited and which are deserts devoid of all life? One can only speculate (actually, there's a rough idea floating around already, but no hard facts).

Well, or one can write a mapping script and see what's out there. Which is what I did.

Currently got up to 36 million (that's id 36000000 to be more precise) out of the approximately 2065 million wide id range, but I'm determined to check each and every one.

Got a lot of help and input from SCPM, who I'd like to thank for explaining the finer points of the APIs I'm invoking.

There's also this thread which has proved immensely useful and covers stuff well beyond what I needed for my grand REST API expedition.

I plan to share my findings in some form once I return from the unknown, to whomever finds it interesting - it may take a couple of weeks though, as I don't want to generate too much load and bring the GOGBear out of his den.

Onward we ride!
Post edited May 12, 2020 by WinterSnowfall
So, I'm out of the desert and I've struck a vein: http://api.gog.com/products?ids=1094368489 is the lowest populated 10 digit id at the moment. I'm now getting one to several hits per million ids. Exciting times.

Had to stop the scan for a while and rework my script a bit - some Unicode issues (which were not a problem before Unicode values for various supported languages stared showing up) that have now been sorted.

I've also got plans to expand the script a bit and make it store all its findings in a SQLite database. But I'll do that on an optimized second pass, after I know what ranges I can skip and where the good stuff is at.
My first interesting find: http://api.gog.com/products?ids=1113697773

As far as I know there was no previous indication that we might see "Homeworld: Deserts of Kharak" on GOG.
avatar
WinterSnowfall: My first interesting find: http://api.gog.com/products?ids=1113697773

As far as I know there was no previous indication that we might see "Homeworld: Deserts of Kharak" on GOG.
Great Work! I am also very interested in learning how to search through the apis. I am going to read up on that topic. If it looks like someting I might be able to learn then i would like to help out as well.
avatar
llamas: Great Work! I am also very interested in learning how to search through the apis. I am going to read up on that topic. If it looks like someting I might be able to learn then i would like to help out as well.
Thanks. Calling the APIs is not hard at all - RESTful services are designed to be straight forward. You can also find a pretty much complete (yet unofficial) API reference here. How to optimize these calls and what to do with the data you get in return, in a programming language of choice, is the tricky part.

Right now I've gotten my Python script to a point where I'm scanning roughly about 10000 ids every 3 seconds - and that's by using 8 query threads with locking I/O. I could potentially push it even further, but to be honest I'm quite happy with the way it's currently getting things done.

When I'm done improving it, I'll consider sharing it with everyone. In essence it's nothing too complicated - these things are not rocket science anyway.

Be warned though it's always more fun to code such things yourself, especially if you're into coding, rather than looking over stuff other people have written :).
avatar
WinterSnowfall: Ok, cool, I'll stop at 2.1 billion then :).

The library ids are the unique ones, right? The product APIs most likely work with library ids then (they're simply returned as "id" in the JSON payload). In fact, I think the unbundling was performed specifically to address this new uniquely-identified product data model needed by Galaxy.

It's odd as hell, but there has to be some logic behind it. I mean they're not just using a trained monkey to pull out random ids from a top hat every time a new game needs to be added, right? Right???
I doubt you'll find anything beyond that, but it's up to you whether you check further :)

Eh... they are all unique as far as I'm aware. I think some of the API methods work with catalogue and library IDs so you may be getting both. The catalogue ones are for the games you can purchase, the library ones are different for games that come bundled but also for some other random games that have different ids in the catalogue and library.

I hope so... but this is gog, so it really wouldn't surprise me if that was actually the case.
I'll be very interested to see any patterns you do find, I've had a couple of attempts (just looking at small groups) and not been able to see any logic behind it but it might be easier to spot things if you look at the whole data set at once.
Testing, testing, 1, 2, 3... testing, testing: http://api.gog.com/products?ids=1368215233 :)
avatar
WinterSnowfall: Testing, testing, 1, 2, 3... testing, testing: http://api.gog.com/products?ids=1368215233 :)
Sadly we can not get this game. :-(
avatar
zeogold: Could somebody explain to me, in tech-idiot terms, what the heck is going on over here?
The REST-API of GOG is a quick way to load game data from the database. This is usually interpret by a webbrowser to display a game (with images and text etc) without having to refresh the complete page. This saves time and a lot of data transfer. :)

Now when GOG is preparing the release of a game they need to add it to the database of course. What SCPM and Wintersnowfall are doing is checking numbers to see if there is a database entry attached to it. This way to can try to find a scoop for soon to be released games.
avatar
adaliabooks: I doubt you'll find anything beyond that, but it's up to you whether you check further :)
Hmmm, well maybe it's worth checking even beyond 2.1 billion after all :)... http://api.gog.com/products?ids=2130376219
avatar
adaliabooks: I doubt you'll find anything beyond that, but it's up to you whether you check further :)
avatar
WinterSnowfall: Hmmm, well maybe it's worth checking even beyond 2.1 billion after all :)... http://api.gog.com/products?ids=2130376219
Well as the ids do seem to be randomly assigned by monkeys then you might as well keep going :)
I've got no clue as to what this might be for: http://api.gog.com/products?ids=1589615681

Any ideas? Maybe just a test entry for THQ Nordic? :)
Post edited February 04, 2017 by WinterSnowfall
Got up to about 1.75 billion ids and I'm still going, at what seems to be a jet-propelled snail pace of ~5000 ids per second. Any interesting stuff I'll find (and there have been some picks here and there), I'll post in this thread.

The data dump I'm gathering looks pretty extensive now, but I gotta tell you it's a messy and sometimes funny place. I'll share all of it when it's done, as I've said before, but here's a small sample of what is to come, like huehuehue... the game :): http://api.gog.com/products?ids=1207660033

Yeah, please delete it. Wouldn't want anyone to see that, right? :P

I mean GOG employs serious people, not blokes that would train monkeys to assign game ids.
Post edited February 05, 2017 by WinterSnowfall
avatar
skeletonbow: What I'd try is to generate a table of all known IDs in decimal, and zero-padded hex and binary to see if any bit patterns appear likely or suspect in order to try to narrow down the search space.
Why the hate for octal numbers, though? :(

avatar
WinterSnowfall: The data dump I'm gathering looks pretty extensive now, but I got a tell you it's a messy and sometimes funny place. I'll share all of it when it's done, as I've said before, but here's a small sample of what is to come, like huehuehue... the game :): http://api.gog.com/products?ids=1207660033

Yeah, please delete it. Wouldn't want anyone to see that, right? :P
That is (literally) hilarious!
Ok, looks like GOG is not too excited about what I'm doing and they seem to have filtered out my IP in the REST API returns, since now, for all queries that I'm submitting, on mapped ids and unmapped ids, I'm getting the same response payload: "html".

I'm curious if this has ever happened to anyone before...

I've already confirmed everything works as expected with a proxy.

Seems like I will have to rethink what I'm doing and if I can continue doing it - I don't want to cause issues for anyone, in the end I was only using the public APIs they are exposing to query for entries they are not hiding.

*Sigh*
Post edited February 07, 2017 by WinterSnowfall