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

×
The new catalog API uses a "like" method for searching, like:

[url=https://catalog.gog.com/v1/catalog?query=like:witcher]https://catalog.gog.com/v1/catalog?query=like:witcher[/url]

Unfortunately these queries return way too many false/unrelated results. Is there any other search method available which works more like the old catalog search and returns only closer/exact matches?

I've tried "eq", "equal" and some other keywords instead of like, but no success.
Post edited January 01, 2023 by eiii
avatar
eiii: Is there any other search method available which works more like the old catalog search and returns only closer/exact matches?
Outside of building your own offline database based on API responses and using SQL queries (for example :P), you're stuck with what the website and the APIs it calls have to offer, I'm afraid.
Post edited January 01, 2023 by WinterSnowfall
avatar
eiii: Is there any other search method available which works more like the old catalog search and returns only closer/exact matches?
avatar
WinterSnowfall: Outside of building your own offline database based on API responses and using SQL queries (for example :P), you're stuck with what the website and the APIs it calls have to offer, I'm afraid.
Dumping the GoG range (7298) took me 20 requests, from there you can make your own fairly comprehensive library.

Put the data into a google spreadsheet, then make it searchable
avatar
WinterSnowfall: Outside of building your own offline database based on API responses and using SQL queries (for example :P), you're stuck with what the website and the APIs it calls have to offer, I'm afraid.
I hoped the API would offer more operators. The old API only has a "search=pattern" parameter while the new one has a "query=operator:pattern" parameter. It does not make sense to add that additional complexity to the interface when you only support one operator. ;)

avatar
Dev0_NZ: Dumping the GoG range (7298) took me 20 requests, from there you can make your own fairly comprehensive library.

Put the data into a google spreadsheet, then make it searchable
I know I can do that (the reason I switch to the new catalog API is that I get "too many requests" errors on the old API). I more was looking for a workaround in the browser. The old search allowed me to find exactly what I was looking for with only a few keystrokes. The new search is just annoying. :(

Also it's "interesting" to see that the data retrieved from the old and the new API are slightly different. Does GOG really have different databases behind these interfaces?
Post edited January 01, 2023 by eiii
Another question: As far as I can see the catalog API does not return a "promoId" anymore. Is there any new way to get the promo a game is part of? Or is there any other trick to find out how long an offer for a game is supposed to be available?
avatar
eiii: It does not make sense to add that additional complexity to the interface when you only support one operator. ;)
Perhaps they plan to expand it at a later date, but right now it's pretty bare bones, yes...

avatar
eiii: Also it's "interesting" to see that the data retrieved from the old and the new API are slightly different. Does GOG really have different databases behind these interfaces?
My money is more on legacy entry formats for the old APIs, while newer ones use an "enhanced" (should we call it complete edition? :P ) format.

avatar
eiii: Another question: As far as I can see the catalog API does not return a "promoId" anymore. Is there any new way to get the promo a game is part of? Or is there any other trick to find out how long an offer for a game is supposed to be available?
Not that I'm aware of. I don't see a need to expose this kind of data to either Galaxy or the website, which is probably why it's gone :/.
Post edited January 02, 2023 by WinterSnowfall
Ok, I tried to find it but I can't. Is there a way to grab total time played via API for an user per each game? Any hints, please? :)
avatar
pawel-t: Ok, I tried to find it but I can't. Is there a way to grab total time played via API for an user per each game? Any hints, please? :)
id nearly say you cant, just pull the page and scrape it?

[url=https://www.gog.com/u/{USER_NAME}/game/{GAME_ID]https://www.gog.com/u/{USER_NAME}/game/{GAME_ID[/url]}
avatar
pawel-t: Ok, I tried to find it but I can't. Is there a way to grab total time played via API for an user per each game? Any hints, please? :)
avatar
Dev0_NZ: id nearly say you cant, just pull the page and scrape it?

[url=https://www.gog.com/u/{USER_NAME}/game/{GAME_ID]https://www.gog.com/u/{USER_NAME}/game/{GAME_ID[/url]}
I guess that will do it. I though about it but on the other hand I had hopes that I will be able to do it via API :)


Making profile public would make it even simpler but I will think on cookie handling.

Thank you @Dev0_NZ for your input.
avatar
Dev0_NZ: id nearly say you cant, just pull the page and scrape it?

[url=https://www.gog.com/u/{USER_NAME}/game/{GAME_ID]https://www.gog.com/u/{USER_NAME}/game/{GAME_ID[/url]}
avatar
pawel-t: I guess that will do it. I though about it but on the other hand I had hopes that I will be able to do it via API :)

Making profile public would make it even simpler but I will think on cookie handling.

Thank you @Dev0_NZ for your input.
There is an API call for achievements:

https://gameplay.gog.com/clients/PRODUCT_ID/users/USER_ID/achievements

So I wouldn't be surprised if there was one for game time as well. If there is it isn't publicly documented, though.

There also seems to be an API on

https://gameplay.gog.com/clients/PRODUCT_ID/users/USER_ID/sessions

but that only gives me an error.

You can try installing Wireshark and check what Galaxy sends and receives when you call a page that displays the game time. Or you could also scrape the webpage as Dev0_NZ suggested, that's always a possibility.
Hello!
Is it possible to cancel my friend invites to other users?
avatar
IndefiniteRoll: The URL's JSON page shows 10 latest new arrivals not by release date. By what and how to do it less limited, like 100 or more?
avatar
WinterSnowfall: You can't, from what I can tell. It's what the main page uses to list the 10-sized subsections and looks hardcoded on the last 10 entries + a redirect to the catalog API for more.

And yes, the "released on GOG date" is not a sort option for the catalog API unfortunately. It will only use the publisher-declared/official game release date to sort. On the positive side all the new entries are indeed there in the list under releaseStatuses=new-arrival.

[url=https://catalog.gog.com/v1/catalog?limit=48&releaseStatuses=in:new-arrival&order=desc:releaseDate&productType=in:game,pack,dlc,extras&page=1]https://catalog.gog.com/v1/catalog?limit=48&releaseStatuses=in:new-arrival&order=desc:releaseDate&productType=in:game,pack,dlc,extras&page=1[/url]

You can tweak the limit on this endpoint.

P.S.: There's also this endpoint, which may be removed soon however, since it's no longer used by the website, that actually does preserve the released on GOG order:

https://www.gog.com/games/ajax/filtered?availability=new&mediaType=game&page=1&sort=date
Hi,

Is there any documentation (specifically regarding to 'releaseStatuses' parameter values) about the v1 catalog end-point? (https://catalog.gog.com/v1/catalog)

Thanks,
avatar
Buyukcaglar: Is there any documentation (specifically regarding to 'releaseStatuses' parameter values) about the v1 catalog end-point? (https://catalog.gog.com/v1/catalog)
Not that I'm aware of... I simply checked what the website was calling at the time. So it's more a question of analyzing the GOG site and some "reverse engineering" of sorts.