
# VGPreise.de API Documentation
**Last Update: 2022-09-20**
## Contact
Facebook: https://www.facebook.com/vgpreise
Instagram: https://www.instagram.com/vgpreise.de
## API Requests
API base URL: https://api.vgpreise.de
### Authorization
All requests to the API endpoints need to be authorized via your personal API auth code.
To authorize against the API endpoints you need to provide your auth code via the GET-parameter *auth* on every request.
To get your personal API auth code, please contact us.
### API endpoints
#### Get all regions
Returns all regions.
```http
GET /get/regions
```
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `int` | ID of region |
| `name` | `str` | Region name |
| `short_name` | `str` | Short name of region (3 letters) |
> demo https://api.vgpreise.de/get/regions
---
#### Get all companies
Returns all companies.
```http
GET /get/companies
```
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `int` | ID of company |
| `name` | `str` | Company name |
> demo https://api.vgpreise.de/get/companies
---
#### Get all gaming systems by company ID
Returns all gaming systems according to the provided company ID.
```http
GET /get/systems/${companyId}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `companyId` | `int` | **Required**. Id of company to get gaming systems for |
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `int` | ID of gaming system |
| `name` | `str` | System name |
| `short_name` | `str` | Short name of system (2-4 letters, uppercase) |
| `company` | `int` | ID of company |
| `num_games` | `int` | Current number of games for this system |
> demo https://api.vgpreise.de/get/systems/1
---
#### Get all games for system by system ID OR system short name
Returns all games according to the provided system ID or system short name
```http
GET /get/games/${systemId}
or
GET /get/games/${systemShortName}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `systemId` | `int` | **Required**. Id of system to get games for |
| `systemShortName` | `string` | **Required**. Short name of system to get games for |
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `int` | ID of game |
| `system` | `int` | ID of gaming system |
| `title` | `str` | Game title |
| `alt_title` | `str` | Alternative game title / title of game in different language(s) |
| `version` | `str` | notes on the specifig game's version |
| `region` | `int` | ID of region |
| `catalog_id` | `str` | Unique catalog ID / game code of game provided by the company |
| `num_variations` | `int` | Number of variations of the game in the database |
| `latest_price_loose` | `float` | Latest crawled loose price for this game |
| `latest_price_cib` | `float` | Latest crawled cib price for this game |
> demo https://api.vgpreise.de/get/games/1 or https://api.vgpreise.de/get/games/NES
---
#### Get current prices (average loose, average cib) for a single game
Returns the current prices for a specific game.
The average_price_loose reflects the current price for a loose game cartridge / loose disc without manual and box.
The average_price_cib reflects the current price for a game that is being sold 'complete in box' with cartridge/disc, manual and box.
```http
GET /get/price/current/${gameId}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `gameId` | `int` | **Required**. Id of the game to get the current prices for |
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `average_price_loose` | `float` | Current average price for loose game cartridge / disc |
| `average_price_cib` | `float` | Current average price for the game complete in box |
> demo https://api.vgpreise.de/get/price/current/123
---
#### Get last 30 crawled prices for a single game (independent of timespan)
Returns the last 30 prices that were crawled for a specific game, mo matter in what time span they were crawled.
```http
GET /get/price/last30prices/${gameId}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `gameId` | `int` | **Required**. Id of the game to get the current prices for |
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `date` | `str` | Date the prices were crawled |
| `price_loose` | `float` | Average loose price of the game on the according date |
| `price_cib` | `float` | Average cib price of the game on the according date |
> demo https://api.vgpreise.de/get/price/last30prices/123
---
#### Get last 90 days' prices for a single game (independent of records existing in this timespan)
Returns all prices that were crawled during the last 90 days for a specific game. If no prices were crawled in this time, the result may be empty.
```http
GET /get/price/90days/${gameId}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `gameId` | `int` | **Required**. Id of the game to get the current prices for |
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `date` | `str` | Date the prices were crawled |
| `price_loose` | `float` | Average loose price of the game on the according date |
| `price_cib` | `float` | Average cib price of the game on the according date |
> demo https://api.vgpreise.de/get/price/90days/123
---
#### Get 30 historic prices for a single game since site exists
Returns 30 prices, datewise equally distributed, that were ever crawled for a specific game.
```http
GET /get/price/historic/${gameId}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `gameId` | `int` | **Required**. Id of the game to get the current prices for |
| Return values | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `date` | `str` | Date the prices were crawled |
| `price_loose` | `float` | Average loose price of the game on the according date |
| `price_cib` | `float` | Average cib price of the game on the according date |
> demo https://api.vgpreise.de/get/price/historic/123
---
© 2019 - 2022 [Ingo Heydkamp](mailto:info@vgpreise.de)
---