Developers
To help developers integrate our data with their applications we created a simple API endpoint. At this moment you are able to retrieve a JSON object of a game’s data when it’s available in our database and an IGDB ID is registered.
To make your integration as easy as possible, there is currently no authentication needed. Responses are cached, and for best response times we suggest you perform your own caching as needed.
Our endpoint is always the following URL, followed by the IGDB ID of the game:
https://gamecontenttriggers.com/api/games/
So for Alan Wake II, whose IGDB ID is 185246, our data can be accessed by the following URL:
https://gamecontenttriggers.com/api/games/185246
Possible responses
Depending on whether or not the game is available in our database, and if the request is formatted correctly, you may get one of the following responses.
- Response code 200 (OK), with a JSON response of the game data
- Response code 404 (Not Found), with a JSON response containing a message
- Response code 400 (Bad Request), with a JSON response containing a message
Error response
An error response comes with a simple JSON response containing a message, like the following in case a game is not found in our database:
{
"message" : "Game not found"
}
Game data response
When a game is found, a JSON object is returned which contains basic information about the game in a format similar to IGDB’s API. The response for Alan Wake 2 could look like this:
{
"id" : 117,
"created_at" : 1701023851,
"igdb_id" : "185246",
"name" : "Alan Wake 2",
"slug" : "alan-wake-2",
"summary" : "...",
"updated_at" : 1702214965,
"url" : "https://gamecontenttriggers.com/games/alan-wake-2/",
"triggers" : []
}
The different attributes are as follows.
- id: Our internal id for the game
- created_at: UNIX timestamp when the game info was first added
- igdb_id: The IGDB ID of the game
- name: The name of the game in our database
- slug: The slug of the game in our database, useful when creating a link
- summary: Our summary of the game (can be empty)
- updated_at: UNIX timestamp when the game info was updated
- url: Link to the game in our database
- triggers: an array of triggers with additional info, see next segment
Game trigger categories
The triggers array in the response contains an array with categories with their information and an array of triggers within that category that apply to the game. For Alan Wake 2 this could look like this, but keep in mind the example is truncated.
{
"id" : 117,
"created_at" : 1701023851,
"igdb_id" : "185246",
"name" : "Alan Wake 2",
"slug" : "alan-wake-2",
"summary" : "...",
"updated_at" : 1702214965,
"url" : "https://gamecontenttriggers.com/games/alan-wake-2/",
"triggers" : [{
"id" : 41,
"name" : "Animals & Wildlife",
"slug" : "animals-wildlife",
"summary" : "",
"url" : "https://gamecontenttriggers.com/triggers/animals-wildlife/",
"triggers" : [{
"id" : 198,
"name" : "Dogs",
"slug" : "dogs",
"url" : "https://gamecontenttriggers.com/triggers/dogs/",
"tags" : "",
"spoilers" : "",
"options" : {
"unavoidable": "Can't be avoided"
}
},{
"id" : 199,
"name" : "Wolves",
"slug" : "wolves",
"summary" : "",
"url" : "https://gamecontenttriggers.com/triggers/wolves/",
"tags" : "",
"spoilers" : "",
"options" : {
"unavoidable" : "Can't be avoided"
}
}]
},{
"id" : 26,
"name" : "Crime",
"slug" : "crime",
"summary" : "",
"url" : "https://gamecontenttriggers.com/triggers/crime/",
"triggers" : [{
"id" : 110,
"name" : "Attacks on Law Enforcement",
"slug" : "attacks-law-enforcement",
"summary" : "",
"url" : "https://gamecontenttriggers.com/triggers/attacks-law-enforcement/",
"tags" : "",
"spoilers" : "",
"options" : {
"unavoidable" : "Can't be avoided"
}
}]
}]
}
As you can see, the categories only contain a few attributes, and always an array with one or more triggers that apply to the game.
- id: Our internal id for the category
- name: The name of the category in our database
- slug: The slug of the category in our database, useful when creating a link
- summary: Our description of the category (can be empty)
- url: Link to the category in our database
- triggers: the array of triggers that apply to the game
Each trigger has similar attributes, with some game specific attributes as well.
- id: Our internal id for the trigger
- name: The name of the trigger in our database
- slug: The slug of the trigger in our database, useful when creating a link
- summary: Our description of the trigger (can be empty)
- url: Link to the trigger in our database
- tags: Textual tags that give more context about the trigger in the game (can be empty)
- spoilers: Tags that may be considered spoilers, and are hidden behind a click in our website (can be empty)
- options: An array of attributes that apply this trigger in the game (can be empty)
Each attribute in the options array of the trigger has a value that is a more user-friendly representation of that option. Currently the possible options and their user-friendly labels are:
- avoidable: Is avoidable
- unavoidable: Can’t be avoided
- options: Has options to remove or avoid trigger
- options_lessen: Has options to lessen
At this moment this is what is available. We hope that by providing this endpoint and documentation, our information can reach more people.