Skip to content

sok.apis.games.igdb_api

IGDB (Internet Game Database) API implementation.

API Documentation: https://api-docs.igdb.com/ Note: Requires Twitch Client ID and Access Token.

IGDBApi

class IGDBApi(client_id: str, access_token: str)

Bases: BaseAPI

IGDB API implementation for video game metadata.

Provides comprehensive game information including platforms, developers, publishers, release dates, and ratings.

Note: Requires Twitch authentication (Client ID + Access Token).

Initialize IGDB API.

Parameters

NameTypeDescription
client_idstrTwitch Client ID.
access_tokenstrTwitch Access Token.
Source

Attributes

Name
client_id

supported_content_typesproperty

List[ContentType]

Get supported content types.

supported_media_typesproperty

List[MediaType]

Get supported media types.

get_detailsasync

async def get_details(
item_id: str,
content_type: ContentType,
**kwargs,
) -> Dict[str, Any]:

Get detailed game information from IGDB.

Parameters

NameTypeDescription
item_idstrIGDB game ID.
content_typeContentTypeContent type.
**kwargsAdditional parameters.

Returns

  • Dict[str, Any]Detailed game information.
Source
async def get_related_items(
item_id: str,
content_type: ContentType,
**kwargs,
) -> List[Dict[str, Any]]:

Get similar games from IGDB.

Parameters

NameTypeDescription
item_idstrIGDB game ID.
content_typeContentTypeContent type.
**kwargsAdditional parameters.

Returns

  • List[Dict[str, Any]]List of similar games.
Source
async def search(
query: str,
content_type: ContentType,
**kwargs,
) -> Dict[str, Any]:

Search for games on IGDB.

Parameters

NameTypeDescription
querystrGame title search query.
content_typeContentTypeContent type.
**kwargsAdditional parameters (max_results).

Returns

  • Dict[str, Any]Search results with 'results' key.
Source
Built with Kiln