{"id":42273014,"url":"https://github.com/immutable/gods-unchained-api","last_synced_at":"2026-01-27T07:30:26.016Z","repository":{"id":45193583,"uuid":"147273870","full_name":"immutable/gods-unchained-api","owner":"immutable","description":"Public developer API documentation for Gods Unchained. ","archived":false,"fork":false,"pushed_at":"2025-03-10T23:33:43.000Z","size":42,"stargazers_count":58,"open_issues_count":7,"forks_count":11,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-11T00:27:18.786Z","etag":null,"topics":["api","blockchain","blockchain-gaming","ethereum","gods-unchained","tcg"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/immutable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-04T01:55:40.000Z","updated_at":"2025-03-10T23:33:46.000Z","dependencies_parsed_at":"2024-01-24T01:23:48.822Z","dependency_job_id":"7b05ae45-3b11-4ac9-8a2d-822baad55e0b","html_url":"https://github.com/immutable/gods-unchained-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/immutable/gods-unchained-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immutable%2Fgods-unchained-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immutable%2Fgods-unchained-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immutable%2Fgods-unchained-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immutable%2Fgods-unchained-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/immutable","download_url":"https://codeload.github.com/immutable/gods-unchained-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immutable%2Fgods-unchained-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28808012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:14:39.408Z","status":"ssl_error","status_checked_at":"2026-01-27T07:14:39.098Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","blockchain","blockchain-gaming","ethereum","gods-unchained","tcg"],"created_at":"2026-01-27T07:30:25.181Z","updated_at":"2026-01-27T07:30:25.991Z","avatar_url":"https://github.com/immutable.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gods Unchained API\n\nPublic developer API documentation for [Gods Unchained](https://godsunchained.com), a trading card game on the Ethereum blockchain. \n\nThis version of the API (```v0```) is in a limited public beta: if you discover a bug, or the api returns results contrary to the specification, report it [here](https://discord.gg/UUn3h45). Error specifications will be added soon. \n\n## Projects \n\nHere are some third-party tools built using these APIs, make sure to ask in our [Discord server](https://discord.gg/2FDZrh2) if you're looking for help or you're wondering what to build. \n\n- [GUDecks](https://gudecks.com)\n\n## General\n\n### Base URL\n\nThe base url for all requests is:\n\n```\nhttps://api.godsunchained.com\n```\n\nThis URL must be suffixed with the version being requested (current version: ```v0```).\n\n```\nhttps://api.godsunchained.com/v0/\n```\n\n### Duplicate Arguments\n\nWe support queries of the following form:\n\n```\nhttps://api.godsunchained.com/v0/card?god=nature\u0026god=death\n```\n\nDuplicate argument keys will be interpreted disjunctively: this query will return cards where the god is either nature OR death. \n\n### Pagination\n\nAll requests which can return multiple objects can be shaped by the ```page``` and ```perPage``` parameters. \n\n```\nhttps://api.godsunchained.com/v0/proto?page=3\u0026perPage=20\n```\n\nAll paginated endpoints return data in the following format:\n\n```\n{\n    total: number\n    page: number\n    perPage: number\n    records: Array\u003cany\u003e\n}\n```\n\nWhere ```total``` is the number of records discovered by this query. \n\n### Sorting \n\nSorts are applied to paginated endpoints using the ```sort``` and ```order``` query parameters:\n\n```\nhttps://api.godsunchained.com/v0/card?sort=mana\u0026order=asc\n```\n\nRange and number types can be ordered by ```order=asc``` and ```order=desc```, defaulting to ```asc```.\n\nMultiple sort parameters can be applied in one query, and will be applied in order:\n\n```\nhttps://api.godsunchained.com/v0/card?sort=mana\u0026order=asc\u0026sort=health\u0026order=desc\n```\n\nFor queries without exact pairings of sort and order parameters (where multiple parameters are applied), it is necessary to mark the order as ```null```:\n\n```\nhttps://api.godsunchained.com/v0/card?sort=mana\u0026order=asc\u0026sort=god\u0026order=null\u0026sort=health\u0026order=desc\n```\n\n\n### Rate Limits\n\nCurrently, there is a rate limit of 5 per second (5/s) on all endpoints. This may change in the future.\n\n### Types\n\nGeneral types:\n\n| Type          | Description  |\n| :-------------: |:-------------:|\n| ![string](https://img.shields.io/badge/-string-lightgrey.svg) | A url encoded string. |\n| ![number](https://img.shields.io/badge/-number-lightgrey.svg) | A decimal number. |\n| ![boolean](https://img.shields.io/badge/-boolean-lightgrey.svg) | ```true``` or ```false``` |\n\nCustom API types:\n\n| Type          | Description  | \n| :-------------: |:-------------:|\n| ![address](https://img.shields.io/badge/-address-green.svg) | A hexadecimal Ethereum address, case insensitive. |\n| ![range](https://img.shields.io/badge/-range-green.svg) | A specific number ```1000```, a range ```1000-2000```, a minimum ```1000-``` or a maximum ```-2000```. |\n\nThe valid options for the enumeration types in various apis are set out below:\n\n| Type          | Options |\n| :-------------: |:-------------:|\n| ![God](https://img.shields.io/badge/-God-blue.svg) | light, death, nature, war, magic, deception |\n| ![PackType](https://img.shields.io/badge/-PackType-blue.svg) | rare, epic, legendary, shiny | \n| ![Rarity](https://img.shields.io/badge/-Rarity-blue.svg) | common, rare, epic, legendary, mythic |\n| ![Type](https://img.shields.io/badge/-Type-blue.svg) | creature, spell, weapon | \n| ![Tribe](https://img.shields.io/badge/-Tribe-blue.svg) | nether, aether, atlantean, viking, olympian, anubian, amazon |\n| ![Quality](https://img.shields.io/badge/-Quality-blue.svg) | plain, shadow, gold, diamond |\n| ![Format](https://img.shields.io/badge/-Format-blue.svg) | full, card |\n\n\n### Concepts\n\nThere are several 'types' of card in Gods Unchained:\n\n- **Token**: A full ERC721 token card which has been 'activated'.\n- **Model**: The most common type of card: locked in, shown on frontend, but not yet converted to an ERC721 token to save gas. \n- **Centralized**: Cards which cannot be traded on the blockchain (part of the core set or an untradeable promotion card). \n\nSome of these endpoints return a combination of the above, while some do not: this is documented by the individual endpoints. In general, the default is to return only cards which can become ERC721 tokens (i.e. Token and Model cards). \n\n**Prototype** cards, or **protos**, contain the underlying stats for a class of card. \n\n\n### Summary\n\n| Method        |  Description  | Status |\n| :-------------| :-----| :-------: |\n| ```/card/{id}``` | Get card | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/card```    | List cards| ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/proto/{id}``` | Get a proto | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/proto```    | List protos | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/factory/{address}``` | Get factory | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/factory```  | Get a list of factories | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/factory/{address}/purchase/{id}``` | Get purchase | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/purchase``` | List factories | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/factory/{address}/purchase/{id}/pack/{index}``` | Get pack | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/pack```  | List packs | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/referral``` | Get a list of referrals | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/image/{id}``` | Get image | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/user/{address}``` | Get user | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/ranking``` | List users ranked by cards owned | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/rarity``` | Get rarity statistics | ![Live](https://img.shields.io/badge/-Live-green.svg) |\n| ```/user/{address}/inventory``` | Get a user's inventory | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/deck``` | Encode a deck into a deck string | ![Live](https://img.shields.io/badge/-Live-green.svg) | \n| ```/deck/{string}``` | Decode a deck from a deck string  | ![Live](https://img.shields.io/badge/-Live-green.svg) |\n\n## Core API\n\n### GET /card/{id}\n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| id      | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | ERC721 id of the card |\n\nReturns the token card with id ```id``` and appropriate metadata. Currently conforms to both the generic and Apollo metadata specifications. \n\n### GET /card ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns a list of token and model cards. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```user ``` | ![address](https://img.shields.io/badge/-address-green.svg) | get cards owned by a specific address |\n| ```rarity``` | ![Rarity](https://img.shields.io/badge/-Rarity-blue.svg) | get cards with a specific rarity |\n| ```quality``` | ![Quality](https://img.shields.io/badge/-Quality-blue.svg) | get cards with a specific quality |\n| ```god``` | ![God](https://img.shields.io/badge/-God-blue.svg) | get cards with a specific god |\n| ```type``` | ![Type](https://img.shields.io/badge/-Type-blue.svg) | get cards with a specific type |\n| ```tribe``` | ![Tribe](https://img.shields.io/badge/-Tribe-blue.svg) | get cards with a specific tribe |\n| ```purity``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards with a particular purity |\n| ```mana``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards with a specific mana |\n| ```health``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards with a specific health |\n| ```attack``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards with a specific attack |\n| ```proto``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | get cards with a specific prototype id |\n\n**Response Format**\n\n```\n{\n    \"total\": 1000,\n    \"page\": 1,\n    \"perPage\": 1,\n    \"records\": [\n        {\n            \"id\": {\n                \"Int64\": 0,\n                \"Valid\": false,\n            }\n            \"proto\": 319,\n            \"purity\": 59,\n            \"user\": \"0xCb3562Dd15807e2BCF35092B1e873971AF0a51da\"\n        }\n    ]\n}\n```\n\n### GET /proto/{id}\n\nReturns the prototype card with id ```id```. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```id``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | id of the prototype card |\n\n**Response Format**\n\n```\n{\n    \"id\":300,\n    \"name\":\"Guerilla Sabotage\",\n    \"effect\":\"Deal 4 damage to a random enemy creature. Draw a card.\",\n    \"god\":\"Nature\",\n    \"rarity\":\"Common\",\n    \"tribe\":{\"String\":\"\",\"Valid\":false},\n    \"mana\":4,\n    \"attack\":{\"Int64\":0,\"Valid\":false},\n    \"health\":{\"Int64\":0,\"Valid\":false},\n    \"type\":\"Spell\"\n}\n```\n\n### GET /proto ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns a list of prototype cards. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```god``` | ![God](https://img.shields.io/badge/-God-blue.svg) | get protos with a specific god |\n| ```rarity``` | ![Rarity](https://img.shields.io/badge/-Rarity-blue.svg) | get protos with a specific rarity |\n| ```type``` | ![Type](https://img.shields.io/badge/-Type-blue.svg) | get protos with a specific type |\n| ```tribe``` | ![Tribe](https://img.shields.io/badge/-Tribe-blue.svg) | get protos with a specific tribe |\n| ```set``` | ![Set](https://img.shields.io/badge/-Set-blue.svg) | get protos with a specific set |\n| ```collectable``` | ![Collectable](https://img.shields.io/badge/-Collectable-blue.svg) | get protos that are collectable or not |\n| ```mana``` | ![range](https://img.shields.io/badge/-range-green.svg) | get protos with a specific mana |\n| ```health``` | ![range](https://img.shields.io/badge/-range-green.svg) | get protos with a specific health |\n| ```attack``` | ![range](https://img.shields.io/badge/-range-green.svg) | get protos with a specific attack |\n\n**Response Format**\n\n```\n{\n    \"total\": 380,\n    \"page\": 1,\n    \"perPage: 1,\n    \"records\": [\n        {\n            \"id\":300,\n            \"name\":\"Guerilla Sabotage\",\n            \"effect\":\"Deal 4 damage to a random enemy creature. Draw a card.\",\n            \"god\":\"Nature\",\n            \"rarity\":\"Common\",\n            \"tribe\":{\"String\":\"\",\"Valid\":false},\n            \"mana\":4,\n            \"attack\":{\"Int64\":0,\"Valid\":false},\n            \"health\":{\"Int64\":0,\"Valid\":false},\n            \"type\":\"Spell\"\n        }\n    ]\n}\n```\n\n### GET /factory/{address}\n\nReturns the pack factory at address ```address```. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```address``` | ![address](https://img.shields.io/badge/-address-lightgrey.svg) | address of factory |\n\n**Response Format**\n\n```\n{\n    \"address\":\"0x0777f76d195795268388789343068e4fcd286919\",\n    \"type\":\"rare\"\n}\n```\n\n### GET /factory ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns a list of pack factories. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```type``` | ![PackType](https://img.shields.io/badge/-PackType-blue.svg) | type of pack |\n\n**Response Format**\n\n```\n{\n    \"total\": 4,\n    \"page\": 1,\n    \"perPage: 1,\n    \"records\": [\n        {\n            \"address\":\"0x0777f76d195795268388789343068e4fcd286919\",\n            \"type\":\"rare\"\n        }\n    ]\n}\n\n```\n\n### GET /factory/{address}/purchase/{id}\n\nReturns purchase ```id``` from the pack factory at ```address```. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```address``` | ![address](https://img.shields.io/badge/-address-lightgrey.svg) | address of factory |\n| ```id``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | id of purchase within factory |\n\n**Response Format**\n\n```\n{\n    \"id\":0,\n    \"user\":\"0x3882C6ba6475165aC5257Ddc1D8d7782E7805c28\",\n    \"count\":1,\n    \"remaining\":0,\n    \"factory\":\"0x000983ba1A675327F0940b56c2d49CD9c042DFBF\",\n    \"txhash\":\"0xda2b2956588bd642bed4b0aa8f63c979f4893662dd31c237aa58b173bf4eb223\",\n    \"type\":\"shiny\"\n}\n```\n\n### GET /purchase ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns a list of purchases. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```type``` | ![PackType](https://img.shields.io/badge/-PackType-blue.svg)| get purchases from a specific pack type |\n| ```user``` | ![address](https://img.shields.io/badge/-address-green.svg)| get purchases made by a specific user |\n| ```factory``` | ![address](https://img.shields.io/badge/-address-green.svg)| get purchases made in a specific factory |\n| ```remaining``` | ![range](https://img.shields.io/badge/-range-green.svg)| number of packs remaining to be activated from this purchase |\n| ```count``` | ![range](https://img.shields.io/badge/-range-green.svg)| number of packs purchased in this purchase |\n\n**Response Format**\n\n```\n{\n    \"total\": 1000,\n    \"page\": 1,\n    \"perPage: 1,\n    \"records\": [\n        {\n            \"id\":0,\n            \"user\":\"0x3882C6ba6475165aC5257Ddc1D8d7782E7805c28\",\n            \"count\":1,\n            \"remaining\":0,\n            \"factory\":\"0x000983ba1A675327F0940b56c2d49CD9c042DFBF\",\n            \"txhash\":\"0xda2b2956588bd642bed4b0aa8f63c979f4893662dd31c237aa58b173bf4eb223\",\n            \"type\":\"shiny\"\n        }\n    ]\n}\n\n```\n\n### GET /factory/{address}/purchase/{id}/pack/{index}\n\nReturns the pack with index ```index``` from purchase ```id``` from the pack factory with address ```address```. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```address``` | ![address](https://img.shields.io/badge/-address-green.svg)| address of the pack factory |\n| ```id``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg)| id of the purchase |\n| ```index``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg)| index of the pack within the purchase |\n\n**Response Format**\n\n```\n{\n    \"purchaseid\":11665,\n    \"purchaseindex\":0,\n    \"purchaseindices\":[0,1,2,3,4],\n    \"user\":\"0x62ed0960478Cd1aAA29e9e94928107D7b1E2Cef8\",\n    \"factory\":\"0x0777F76D195795268388789343068e4fCd286919\",\n    \"opened\":true,\n    \"cards\":[\n        {\"proto\":264,\"purity\":600},\n        {\"proto\":38,\"purity\":990},\n        {\"proto\":299,\"purity\":549},\n        {\"proto\":347,\"purity\":275},\n        {\"proto\":291,\"purity\":850}\n    ],\n    \"type\":\"rare\"\n}\n```\n\n### GET /pack ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns a list of packs.\n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```type``` | ![PackType](https://img.shields.io/badge/-PackType-blue.svg) | get packs of a specific type |\n| ```user``` | ![address](https://img.shields.io/badge/-address-green.svg) | get packs purchased by a specific user |\n| ```factory``` | ![address](https://img.shields.io/badge/-address-green.svg) | get packs created by a specific factory |\n| ```purchase``` | ![range](https://img.shields.io/badge/-range-green.svg) | get packs created in a specific purchase |\n| ```opened``` | ![boolean](https://img.shields.io/badge/-boolean-lightgrey.svg) | whether these packs have been opened |\n| ```fill``` | ![boolean](https://img.shields.io/badge/-boolean-lightgrey.svg) | whether to fill these packs with their cards |\n\n**Response Format**\n\n```\n{\n    \"total\": 1000,\n    \"page\": 1,\n    \"perPage: 1,\n    \"records\": [\n        {\n            \"purchaseid\":11665,\n            \"purchaseindex\":0,\n            \"purchaseindices\":[0,1,2,3,4],\n            \"user\":\"0x62ed0960478Cd1aAA29e9e94928107D7b1E2Cef8\",\n            \"factory\":\"0x0777F76D195795268388789343068e4fCd286919\",\n            \"opened\":true,\n            \"cards\":[\n                {\"proto\":264,\"purity\":600},\n                {\"proto\":38,\"purity\":990},\n                {\"proto\":299,\"purity\":549},\n                {\"proto\":347,\"purity\":275},\n                {\"proto\":291,\"purity\":850}\n            ],\n            \"type\":\"rare\"\n        }\n    ]\n}\n```\n\n\n### GET /referral ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns a list of referrals.\n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```type``` | ![PackType](https://img.shields.io/badge/-PackType-blue.svg) | get referrals with a specific rarity |\n| ```referrer``` | ![address](https://img.shields.io/badge/-address-green.svg) | get referrals made by a specific user |\n| ```purchaser``` | ![address](https://img.shields.io/badge/-address-green.svg) | get referrals made for a specific user |\n| ```factory``` | ![address](https://img.shields.io/badge/-address-green.svg) | get referrals made in a particular factory |\n\n**Response Format**\n\n```\n{\n    \"total\": 1000,\n    \"page\": 1,\n    \"perPage: 1,\n    \"records\": [\n        {\n            \"id\":0,\n            \"referrer\":\"0xb08F95dbC639621DbAf48A472AE8Fce0f6f56a6e\",\n            \"purchaser\":\"0xE4a8dfcA175cDcA4Ae370f5b7aaff24bD1C9C8eF\",\n            \"factory\":\"0x1e891C587b345ab02A31b57c1F926fB08913d10D\",\n            \"value\":1746000000000000000,\n            \"count\":0,\n            \"type\":\"shiny\"\n        }\n    ]\n}\n```\n\n### GET /image/{id}\n\nReturns an image based on the card prototype with id ```id```. To get an image in its card form, use the ```format``` and ```quality``` parameters. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```format``` | ![format](https://img.shields.io/badge/-Format-blue.svg) |  the format in which the image should be presented |\n| ```h``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) |  the height to which the image will be resized |\n| ```w``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) |  the width to which the image will be resized |\n| ```quality``` | ![Quality](https://img.shields.io/badge/-Quality-blue.svg) |  the quality of the card |\n\n\n### GET /user/{address}\n\nGet a user. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```address``` | ![string](https://img.shields.io/badge/-address-green.svg) | the Ethereum address of the user |\n\n**Response Format**\n\n```\n{\n    \"username\": \"ender\",\n    \"address\": \"0xC257274276a4E539741Ca11b590B9447B26A8051\",\n    \"nonce\": 0\n}\n```\n\n## Helper APIs\n\nTo help build more effective applications for our ecosystem, we're also providing a couple of helpful API endpoints. These endpoints may be deprecated in future releases, as they are composable from existing endpoints, but provide a convenient interface during the development of nascent GU-focused applications. \n\n### GET /ranking ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns an ordered list of users with the most cards which meet particular conditions. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```rarity``` | ![Rarity](https://img.shields.io/badge/-Rarity-blue.svg)| get rank of cards with a specific rarity |\n| ```quality``` | ![Quality](https://img.shields.io/badge/-Quality-blue.svg) | get rank of cards with a specific quality |\n| ```god``` | ![God](https://img.shields.io/badge/-God-blue.svg) | get rank of cards with a specific god |\n| ```type``` | ![Type](https://img.shields.io/badge/-Type-blue.svg) | get rank of cards with a specific type |\n| ```tribe``` | ![Tribe](https://img.shields.io/badge/-Tribe-blue.svg) | get rank of cards with a specific tribe |\n| ```purity``` | ![range](https://img.shields.io/badge/-range-green.svg) |  get rank of cards with a minimum purity bound |\n| ```mana``` | ![range](https://img.shields.io/badge/-range-green.svg) | get rank of cards with a specific mana |\n| ```health``` | ![range](https://img.shields.io/badge/-range-green.svg) | get rank of cards with a specific health |\n| ```attack``` | ![range](https://img.shields.io/badge/-range-green.svg) | get rank of cards with a specific attack |\n| ```proto``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | get rank of cards with a specific prototype id |\n\n**Response Format**\n\n```\n{\n    \"total\": 10000,\n    \"page\": 1,\n    \"perPage\": 1,\n    \"records\": [\n        {\n            \"user\": \"0xa012623C2d4EB0cfe921Bd283bb1823370Ae2737\",\n            \"count\": 1585\n        }\n    ]\n}\n```\n\n### GET /rarity ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns rarity information about protos. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```user``` | ![address](https://img.shields.io/badge/-address-green.svg) | get rarity info about cards owned by a specific address |\n| ```rarity``` | ![rarity](https://img.shields.io/badge/-Rarity-blue.svg) | get rarity info about cards with a specific rarity |\n| ```quality``` | ![quality](https://img.shields.io/badge/-Quality-blue.svg) | get rarity info about cards with a specific quality |\n| ```god``` | ![god](https://img.shields.io/badge/-God-blue.svg) | get rarity info about cards with a specific god |\n| ```type``` | ![type](https://img.shields.io/badge/-Type-blue.svg) | get rarity info about cards with a specific type |\n| ```tribe``` | ![tribe](https://img.shields.io/badge/-Tribe-blue.svg) | get rarity info about cards with a specific tribe |\n| ```purity``` | ![range](https://img.shields.io/badge/-range-green.svg) | get rarity info about cards within a purity range |\n| ```mana``` | ![range](https://img.shields.io/badge/-range-green.svg) | get rarity info about cards within a mana range |\n| ```health``` | ![range](https://img.shields.io/badge/-range-green.svg) | get rarity info about cards within a health range |\n| ```attack``` | ![range](https://img.shields.io/badge/-range-green.svg) | get rarity info about cards with an attack range |\n| ```proto``` | `![number](https://img.shields.io/badge/-number-lightgrey.svg) | get rarity info about cards with a specific prototype id |\n\n**Sort Options**\n\n```proto```, ```plain```, ```shadow```, ```gold```, ```diamond```\n\n**Response Format**\n\n```\n{\n    \"total\": 380,\n    \"page\": 1,\n    \"perPage\": 1,\n    \"records\": [\n        {\n            \"proto\": 1,\n            \"plain\": 1325,\n            \"shadow\": 72,\n            \"gold\": 20,\n            \"diamond\": 3\n        }\n    ]\n}\n```\n\n### GET /user/{address}/inventory ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nReturns the inventory of the user with address ```address```, including token, shadow and centralized cards. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```rarity``` | ![rarity](https://img.shields.io/badge/-Rarity-blue.svg) | get cards with a specific rarity |\n| ```quality``` | ![quality](https://img.shields.io/badge/-Quality-blue.svg) | get cards with a specific quality |\n| ```god``` | ![god](https://img.shields.io/badge/-God-blue.svg) | get cards with a specific god |\n| ```type``` | ![type](https://img.shields.io/badge/-Type-blue.svg) | get cards with a specific type |\n| ```tribe``` | ![tribe](https://img.shields.io/badge/-Tribe-blue.svg) | get cards with a specific tribe |\n| ```purity``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards within a purity range |\n| ```mana``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards within a mana range |\n| ```health``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards within a health range |\n| ```attack``` | ![range](https://img.shields.io/badge/-range-green.svg) | get cards with an attack range |\n| ```proto``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | get cards with a specific prototype id |\n\n**Response Format**\n\n```\n{\n    \"total\": 380,\n    \"page\": 1,\n    \"perPage\": 1,\n    \"records\": [\n        {\n            \"proto\": 1,\n            \"purities\": [\n                \"100\", \"200\", \"300\", \"2999\"\n            ]\n        }\n    ]\n}\n```\n\n## DeckString APIs\n\nDeckStrings are a convenient standard for allowing applications to import and export decks. The following APIs provide a convenient interface for basic deck string operations. \n\n### POST /deck\n\nEncodes a deck into a deck string. \n\n**Request Body** \n\n```\n{\n    \"version\": 1,\n    \"god\": \"deception\",\n    \"protos\": [\n        290, 17, 201, 201, 80, 80, 93, 93, 64, 64, 185, 185, 55, 55, 97, 331, 281, 281, 252, 252, 330,\n\t\t330, 280, 202, 202, 265, 265, 37, 94, 94\n    ]\n}\n```\n\n**Response Format**\n\n```\nAQYBBhElYZgCogLLAgIMN0BQXV65AckBygH8AYkCmQLKAg==\n```\n\n\n### GET /deck/{string}\n\nDecodes a deck from a deck string.  \n\n**Parameters**\n\n\n**Response Format** \n\n```\n{\n    \"version\": 1,\n    \"god\": \"deception\",\n    \"protos\": [\n        290, 17, 201, 201, 80, 80, 93, 93, 64, 64, 185, 185, 55, 55, 97, 331, 281, 281, 252, 252, 330,\n\t\t330, 280, 202, 202, 265, 265, 37, 94, 94\n    ]\n}\n```\n\n### GET /mode \n\nLists the game modes with some properties.  \n\n\n**Response Format**\n\n```\n[\n {\n  \"id\": 2,\n  \"name\": \"Constructed\",\n  \"description\": \"Classic Contructed\",\n  \"live\": true,\n  \"required_level\": 0,\n  \"properties\": {\n   \"type\": 4,\n   \"image_url\": \"https://images.godsunchained.com/misc/classic_constructed.webp\"\n  }\n }\n]\n```\n\n### GET /match ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nShow the match results\n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```start_time``` | ![range](https://img.shields.io/badge/-range-green.svg) | start time of the match (UNIX epoch format) |\n| ```end_time``` | ![range](https://img.shields.io/badge/-range-green.svg) | end time of the match (UNIX epoch format) |\n| ```player_won``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | user_id of a player |\n| ```player_lost``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | user_id of a player |\n| ```game_mode``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | game_mode identifier |\n\n\n**Important**: total_turns field will be renamed to total_rounds on a later update, we will continue to support it while we ensure our community is using the new field name.\n\n**Response Format**\n\n```\n{\n \"total\": 1447,\n \"page\": 1,\n \"perPage\": 20,\n \"records\": [\n  {\n   \"player_won\": 9127,\n   \"player_lost\": 6008,\n   \"game_mode\": 2,\n   \"game_id\": \"b64865e2-682b-4a23-af11-20aad0cfd47c\",\n   \"start_time\": 1560734177,\n   \"end_time\": 1560734355,\n   \"player_info\": [{\"god\":\"nature\",\"cards\":[301,121,68,237,976,1000,973,523,910,385,494,467,905,519,907,507,919,916,906,442,386,537,471,928,475,906,454,909,945,920],\"global\":false,\"health\":30,\"status\":\"connected\",\"user_id\":9127},{\"god\":\"Magic\",\"cards\":[401,401,404,404,908,908,455,455,535,535,467,467,926,926,981,981,402,402,504,504,396,396,406,406,983,983,407,407,1002,1002],\"global\":true,\"health\":0,\"status\":\"connected\",\"user_id\":6008}],\n   \"total_turns\": 6, \n   \"total_rounds\": 6\n  }\n ]\n}\n```\n\n### GET /rank ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nShow the rank of a player per game mode.\n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```user_id``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | Apollo ID of the user |\n| ```game_mode``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | Game mode of the rank |\n\n\n**Response Format**\n\n```\n{\n \"total\": 543,\n \"page\": 1,\n \"perPage\": 20,\n \"records\": [\n  {\n   \"user_id\": 9115,\n   \"game_mode\": 1,\n   \"rating\": 952,\n   \"rank_level\": 1,\n   \"win_points\": 82.849302,\n   \"loss_points\": 86.586029\n  },\n  {\n   \"user_id\": 2317,\n   \"game_mode\": 2,\n   \"rating\": 875.627936,\n   \"rank_level\": 1,\n   \"win_points\": 48.249483,\n   \"loss_points\": 89.55682\n  }\n ]\n}\n```\n\n\n### GET /properties ![paginated](https://img.shields.io/badge/-Paginated-orange.svg)\n\nShow the properties of the players.\n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```user_id``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | Apollo ID of the user |\n\n**Response Format**\n\n```\n{\n \"total\": 8298,\n \"page\": 1,\n \"perPage\": 20,\n \"records\": [\n  {\n   \"user_id\": 612,\n   \"xp_level\": 0,\n   \"total_xp\": 0,\n   \"xp_to_next\": 25,\n   \"won_matches\": 0,\n   \"lost_matches\": 0,\n   \"username\": \"bestplayer\"\n  },\n  {\n   \"user_id\": 706,\n   \"xp_level\": 36,\n   \"total_xp\": 25850,\n   \"xp_to_next\": 350,\n   \"won_matches\": 51,\n   \"lost_matches\": 40,\n   \"username\": \"broken_player\"\n  }\n ]\n}\n```\n\n\n### GET /predict\n\nCalculates the probability of a match based on the rating of the players (using Elo rating algorithm)\n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```user_id``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | Apollo ID of the user |\n| ```opponent_id``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | Apollo ID of the opponent |\n| ```game_mode``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | the game mode of the match |\n\n**Response Format**\n\n```\n0.6717130465747431\n```\n\n## Quality APIs\n\nThe Quality APIs provide data about the qualities and their visual compsition used by public systems.  \n\n### GET /quality\n\nShows all the active quality class definitions and related information. Primarily used by supporting systems such as name and id relationships or metadata overrides. \n\n**Response Format**\n\n```\n[\n    {\n        \"class_key\": \"quality\",\n        \"class_value\": \"2\",\n        \"class_properties\": {\n            \"name\": \"gold\"\n        },\n        \"class_type\": \"card\",\n        \"game_id\": 1\n    },\n    ...\n]\n```\n\n### GET /quality/{quality}\n\nShows the specified quality class definition and related information. Primarily used by supporting systems such as name and id relationships or metadata overrides. \n\n**Parameters**\n\n| Name        | Type          | Description  |\n| :-------------: |:-------------:| :-----:|\n| ```quality``` | ![number](https://img.shields.io/badge/-number-lightgrey.svg) | Quality ID |\n\n**Response Format**\n\n```\n{\n \"class_key\": \"quality\",\n \"class_value\": \"2\",\n \"class_properties\": {\n  \"name\": \"gold\"\n },\n \"class_type\": \"card\",\n \"game_id\": 1\n}\n```\n\n### GET /composition\n\nShows all the graphical composition data required to generate visuals for the specified proto and quality combinations for NFT art used in Gods Unchained. Currently only supports Card art. \n\n**Parameters**\n\n| Name        | Type          | Description  | Example |\n| :-------------: |:-------------:| :-----:| :-----:| \n| ```pairs``` | ![pair](https://img.shields.io/badge/-numbers-lightgrey.svg) | Proto and Quality defined with an ```@``` separator | ```1234@5``` | \n\n**Response Format**\n\n```\n[\n {\n  \"id\": 1234,\n  \"name\": \"Born Again\",\n  \"effect\": \"Pull a creature from your void to your hand. Give it +5/+5 and ward.\",\n  \"god\": \"light\",\n  \"rarity\": \"epic\",\n  \"tribe\": { \"String\": \"\", \"Valid\": false },\n  \"mana\": 6,\n  \"attack\": { \"Int64\": 0, \"Valid\": false },\n  \"health\": { \"Int64\": 0, \"Valid\": false },\n  \"type\": \"spell\",\n  \"set\": \"core\",\n  \"collectable\": true,\n  \"live\": \"true\",\n  \"art_id\": \"C448\",\n  \"lib_id\": \"L2-235\",\n  \"composition\": {\n   \"illustration\": [\n    \"1234\"\n   ],\n   \"frame\": [\n    \"spell\",\n    \"spell_plain\"\n   ],\n   \"rosette\": [\n    \"light\",\n    \"light_plain\"\n   ],\n   \"gems\": [\n    \"rarity_epic\"\n   ],\n   \"wreath\": [],\n   \"lock\": [\n    \"lock_plain\"\n   ],\n   \"tribe_bar\": [],\n   \"set\": [\n    \"core\"\n   ]\n  }\n }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmutable%2Fgods-unchained-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmutable%2Fgods-unchained-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmutable%2Fgods-unchained-api/lists"}