GetGame

From TheGamesDB Wiki
Jump to: navigation, search

The GetGameApi title search returns game data in an XML document or if an id is given it just returns the data for that specific game.

An id overrides a name search.

Changelog:

4-19-15: Added similar platforms to each result

4-19-15: Added exactname request parameter

5-27-12: Added support for returning ClearLOGO

7-19-11: Added Youtube Trailer Support.
         Removed CRC Support.

7-17-11: Added CRC Support.

6-13-11: Added Co-op tag.
         Games that are checked with having Co-op capability can now be returned via the API.


Parameters:

name (string): Performs a search for a game by title - Alpha characters only, case insensitive, partial phrases accepted, no partial words.

exactname (string): Performs a search for a game by exact title - Case insensitive, exact title matches only.

id (int): ID representing a specific game.

platform (string) (optional): Platform to filter results by, Alpha-Numeric characters only, See this wiki article for a list of valid platforms API_ValidPlatformsList


Example Request:

You must provide either the id, name, or exactname parameter. Any of these may be combined with the optional platform parameter.

A request for game info relating to the game with id number "2" - http://thegamesdb.net/api/GetGame.php?id=2

Example Result:

<?xml version="1.0" encoding="UTF-8" ?>

<Data>
<baseImgUrl>http://thegamesdb.net/banners/</baseImgUrl>
<Game>
<id>2</id>
<GameTitle>Crysis</GameTitle>
<Platform>PC</Platform>
<ReleaseDate>11/13/2007</ReleaseDate>
<Overview>From the makers of Far Cry, Crysis offers FPS fans the best-looking, most highly-evolving gameplay, requiring the player to use adaptive tactics and total customization of weapons and armor to survive in dynamic, hostile environments including Zero-G. 

Earth, 2019. A team of US scientists makes a frightening discovery on an island in the South China Sea. All contact with the team is lost when the North Korean Government quickly seals off the area. The United States responds by dispatching an elite team of Delta Force Operators to recon the situation. As tension rises between the two nations, a massive alien ship reveals itself in the middle of the island. The ship generates an immense force sphere that freezes a vast portion of the island and drastically alters the global weather system. Now the US and North Korea must join forces to battle the alien menace. With hope rapidly fading, you must fight epic battles through tropical jungle, frozen landscapes, and finally into the heart of the alien ship itself for the ultimate Zero G showdown.</Overview>
<ESRB>M - Mature</ESRB>
<Genres><genre>Shooter</genre></Genres><Players>4+</Players><Co-op>No</Co-op>
<Youtube>http://www.youtube.com/watch?v=i3vO01xQ-DM</Youtube>
<Publisher>Electronic Arts</Publisher>
<Developer>Crytek</Developer>
<Rating>8.75</Rating><Images>
<Similar>
<SimilarCount>2</SimilarCount>
<Game>
<id>15246</id>
<PlatformId>15</PlatformId>
</Game>
<Game>
<id>15225</id>
<PlatformId>12</PlatformId>
</Game>
</Similar>
<fanart>
<original width="1920" height="1080">fanart/original/2-1.jpg</original>
<thumb>fanart/thumb/2-1.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-2.jpg</original>
<thumb>fanart/thumb/2-2.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-3.jpg</original>
<thumb>fanart/thumb/2-3.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-4.jpg</original>
<thumb>fanart/thumb/2-4.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-5.jpg</original>
<thumb>fanart/thumb/2-5.jpg</thumb>
</fanart>
<fanart>
<original width="1920" height="1080">fanart/original/2-6.jpg</original>
<thumb>fanart/thumb/2-6.jpg</thumb>
</fanart>
<boxart side="back" width="1525" height="2162" thumb="boxart/thumb/original/back/2-1.jpg">boxart/original/back/2-1.jpg</boxart>
<boxart side="front" width="1525" height="2160" thumb="boxart/thumb/original/front/2-1.jpg">boxart/original/front/2-1.jpg</boxart>
<banner width="760" height="140">graphical/2-g2.jpg</banner><banner width="760" height="140">graphical/2-g3.jpg</banner><screenshot>
<original width="1920" height="1080">screenshots/2-1.jpg</original>
<thumb>screenshots/thumb/2-1.jpg</thumb>
</screenshot>
<clearlogo width="400" height="95">clearlogo/2.png</clearlogo></Images>
</Game>
</Data>
Personal tools
Namespaces

Variants
Actions
Navigation
Contents
Toolbox