PCGamingWiki:API
API
This page might not be updated to reflect all available API endpoints or functionality.
- Page contents
API Changelog
| Date | Changes |
|---|---|
| September 21, 2026 | An issue that caused the Cargo queries to be case sensitive have been resolved. Case insensitive queries are now the default again unless using the BINARY keyword. |
| August 30, 2026 | More major and minor Cargo changes today.
|
| August 25, 2026 | Major Cargo changes today:
|
| August 23, 2026 | Following the server migration some API endpoints requires authenticating with the API endpoint using a bot password and the login method. This notably concerns the cargoquery endpoint used to easily retrieve data in a parsed format. |
| August 22, 2026 | A new Cargo table, GameData, have been created that gets automatically populated by paths and details to the location of configuration files and save game data of the games. This information can also be retrieved through the MediaWiki API if so desired. |
| August 17, 2026 | Server migration to the Canasta Docker image, providing improved stability, performance and new features such as Elastisearch, performed by MediaWiki consultancy WikiWorks. |
Requirements
If you need to contact us, please do so over Discord.
Current rate limit: 60 requests/minute.
0. As of the August 2026 server migration some API endpoints requires authenticating with the API endpoint using a bot password and the login method. This notably concerns the cargoquery endpoint used to easily retrieve data in a parsed format.
1. To alleviate the negative impact on our infrastructure, the MediaWiki API has been rate limited to only allow a limited requests per minute (see above). Failure to keep within this limit will return HTTP 429 Too Many Requests and block the IP addressss for 60 seconds. We are currently monitoring the situation and hope that we will be able to raise the limit a bit if our infrastructure is able to handle it.
2. Use a proper custom user-agent string, preferably one with contact information, when interfacing with our APIs. Failure to do so might result in unsuccessful connections or bans. MediaWiki recommends using a user-agent string in the following format:
User-Agent: clientname/version (contact information e.g. username, email) framework/version....
e.g. MyCoolTool/1.1 (https://example.org/MyCoolTool/; [email protected]) UsedBaseLibrary/1.4
3. Use proper etiquette when interfacing with the API and remember that this is a small community-run project, with infrastructure not designed to handle modern AI scrapping and bots. The more data you are able to index or cache on your own side, at least for awhile, the better.
API errors
If you need to contact us, please do so over Discord.
Developers may run into the following errors when attempting to interface with the API:
- HTTP 403 Forbidden: The connection was blocked for some reason. This might be because you are using a generic user-agent string that have been blocked or we have seen excessive traffic from your IP in the past. Be sure to use a proper user-agent string according to the specified requirements above.
- HTTP 429 Too Many Requests: The connection was temporarily blocked (for a duration of 60 seconds) due to making too many requests. Please decrease the amount of requests you are making, and keep within the rate limit specified above. You will not be able to make any new requests until the block has expired, which will happen after 60 seconds have passed.
- permissiondenied: e.g. "You don't have permission to run arbitrary Cargo queries.". The authentication method you are currently using does not have the necessary permissions. If you are relying on anonymous authentication, please register an account and interface with the API using a Bot Password (docs) and the
loginmethod. If you have already done so, please ensure that you have granted the relevant bot password the necessary privilege (e.g.Create, query and delete data through the Cargo extensionif you want to use thecargoqueryAPI endpoint).
Redirect API
- Our custom redirect API allows us to redirect incoming users using any registered GOG Product ID or Steam App ID to the relevant PCGamingWiki page.
- Source code
Examples:
- Steam App ID:
https://www.pcgamingwiki.com/api/appid.php?appid=674020
- It is also possible to retrieve the wiki page name using the
action=idlookupAPI endpoint, see the API sandbox for an example.
MediaWiki API
- As the PCGamingWiki is based on MediaWiki, the built-in MediaWiki API endpoint can be used to access a lot of data. Some MediaWiki extensions we use such as Cargo also exposes their own API actions through the MediaWiki API.
- If you want to retrieve the Cargo table and their columns (e.g. cover image, developer, publisher, release date, etc) of a page, the Cargo Tables page is the go-to place to understanding the structure, while
cargoqueryis the API call you will mostly use. See this example (sandbox). - The API Sandbox can be helpful in figuring the API out, and the Cargo Query page for figuring out Cargo.
- When querying
_pageNameor_pageID(or any Cargo column that starts with an _ underscore), the fields parts of the query needs to alias it to another name, using e.g.&fields=Game._pageName=Page - See the Extension:Cargo/Querying data for even more information about Cargo.
Examples:
- Retrieve some specific Cargo values from the Game table using its Steam AppID:
https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Game&fields=Game._pageName=Page,Game.Developers,Game.Released,Game.Cover_URL&where=Game.Steam_AppID%20HOLDS%20%221245620%22&format=jsonfm
- If the exact page name is known, it is also possible to retrieve using
_pageNamelike so:&where=Game._pageName%3D"Elden Ring"
- If the exact page name is known, it is also possible to retrieve using
- Find the page ID of a PCGW page using the Cargo Game.Steam_AppID column:
https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Game&fields=Game._pageID%3DPageID%2CGame.Steam_AppID&where=Game.Steam_AppID%20HOLDS%20%221245620%22&format=jsonfm
- Retrieve some specific Cargo values from the Game table using the page ID retrieved earlier:
https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Game&fields=Game._pageName=Page,Game.Developers,Game.Released,Game.Cover_URL&where=Game._pageID%3D%22146683%22&format=jsonfm
- Retrieve the wikitext of the page using the page ID retrieved earlier:
https://www.pcgamingwiki.com/w/api.php?action=parse&format=json&pageid=146683&prop=wikitext
- Retrieve specific Cargo values stored in different tables using its Steam AppID:
https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Game,Video&fields=Game._pageName=Page,Game.Developers,Game.Released,Game.Cover_URL,Video.4K_Ultra_HD,Video.HDR,Video.Ultrawidescreen&join_on=Game._pageID=Video._pageID&where=Game.Steam_AppID%20HOLDS%20%221245620%22&format=jsonfm
- This example retrieves three values from the Video table as well as four values from the Game table for a single page.
- Retrieve game data paths using its Steam App ID:
https://www.pcgamingwiki.com/w/api.php?action=cargoquery&tables=Game,GameData&fields=GameData.Type=Type,GameData.Platform=Platform,GameData.Paths=Paths&join_on=Game._pageID=GameData._pageID&where=Game.Steam_AppID%20HOLDS%20%221245620%22&format=jsonfm
- Search for the name of a page for a specific game, and resolve any redirects that might exists:
https://www.pcgamingwiki.com/w/api.php?action=opensearch&search=DRAGON%20QUEST%20VII%20Reimagined&redirects=resolve&format=jsonfm
- The
opensearchaction performs a case insensitive search on the wiki and returns all matching results.
- The
- Retrieve the wikitext of the page using the page name retrieved in the prior example:
https://www.pcgamingwiki.com/w/api.php?action=parse&redirects=1&prop=wikitext&page=Dragon%20Quest%20VII%20Reimagined&format=jsonfm
- Note that the
pageparameter here is case sensitive which why we needed to perform the prioropensearchrequest first.
- Note that the