Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

I used to play with itch.io API for fun.

Given the creator (thorbjorn) and game (tiled), get the game’s numeric id:

https://thorbjorn.itch.io/tiled/data.json - returns JSON with id 28768

Get game’s uploads using game id:

https://itch.io/api/1/API_KEY/game/28768/uploads - returns JSON array of uploads, containing id’s, display/channel names, etc of uploads.

Download upload using upload id (e.g. of windows-64bit):

curl https://itch.io/api/1/API_KEY/upload/504289/download - returns download link in JSON

That should work for free games, with API_KEY of any user. I have not tried to work with paid ones.

EDITED: fixed mistake with upload info request

(1 edit)

Hi! Thanks for your response.

However it seems to not work… The data.json request is working properly I have access to the game_id however the /game/ request do not give the informations that you gave:

https://itch.io/api/1/API_KEY/game/28768

{
  "game": {
    "p_osx": true,
    "id": 28768,
    "published_at": "2015-06-21 12:11:55",
    "url": "https:\\/\\/thorbjorn.itch.io\\/tiled",
    "can_be_bought": true,
    "p_android": false,
    "p_linux": true,
    "created_at": "2015-06-21 09:52:56",
    "p_windows": true,
    "has_demo": false,
    "min_price": 0,
    "title": "Tiled Map Editor",
    "user": {
      "display_name": "Thorbjørn",
      "id": 59281,
      "url": "https:\\/\\/thorbjorn.itch.io",
      "cover_url": "https:\\/\\/img.itch.zone\\/aW1hZ2UyL3VzZXIvNTkyODEvMjE4NzA0LnBuZw==\\/100x100%23\\/kk5Ir6.png",
      "username": "thorbjorn"
    },
    "cover_url": "https:\\/\\/img.itch.zone\\/aW1nLzI2NTU0MzAucG5n\\/315x250%23c\\/OviaCR.png",
    "in_press_system": false,
    "classification": "tool",
    "short_text": "Free, easy to use and flexible level editor.",
    "type": "default"
  }
}

(I’ve tried with other games, it do not give any information about the uploads..)

and I’ve also tried your download request, and here it works I have the link. But as I said before how did you get the download id ? (the “504289” as I don’t have it in the /game/ request?)

Thanks for your help! It really helps me a lot!

Edit: And I’ve also tried to use an OAuth application api key but it do not work, so I don’t think this is the best solution (since the users would have to give their api key to the app, it’s a bit more annoying than just accepting the OAuth app..)

Shit, sorry, made a mistake. Indeed the game/GAME_ID request returns just general info on the game. Uploads info is https://itch.io/api/1/API_KEY/game/28768/uploads

(1 edit)

Nice thank you so much!

But yeah I hope Leafo will respond because this method works but only if the user gives it’s api key (it do not work with OAuth api key…) (And another problem is that with this method I can’t download the butler patch, I always need to download again the whole game)

(2 edits)

Yeah I think you may have better luck with butlerd https://github.com/itchio/butler/tree/master/butlerd - basically butler is a command line interface to butlerd which is a daemon with JSON RPC interface. I did not try it myself, but the docs seem to be pretty comprehensive https://docs.itch.ovh/butlerd/master/ .

GameHub launcher apparently uses butlerd for itch.io integration https://github.com/tkashkin/GameHub/tree/master/src/data/sources/itch

(+1)

Oh my god I haven’t seen this…

Thanks the documentation is much more complete than the butler doc..

Thank you so much I’ll dig into this!