1.2.1 • Published 2 months ago

allkeyshop-api v1.2.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
2 months ago

AllKeyShop API

Unofficial AllKeyShop API made in typescript

Installation

npm install allkeyshop-api

Usage

Import and initialize

import { AllkeyshopService } from 'allkeyshop-api'

const allkeyshopService = new AllkeyshopService()

Initialize with custom options

const options = {
    currency: 'eur',
    platform: '',
    store: 'steam'
}

const allkeyshopService = new AllkeyshopService(options)
  • Currency: Get prices in the selected currency. Default: eur
  • Platform: Get prices for the selected platform. Default: '' (PC). Possible values: 'PS5', 'Xbox One', 'Nintendo Switch' etc.
  • Store: Filter by selected store. Default: '' (any). Possible values: 'steam', 'origin', 'ea-app', 'uplay', 'gog', 'epic' etc.

Get game keys by name

allkeyshopService.search('Borderlands 3').then((data) => {
    console.log(data)
})

// Output:
// {
//     success: true,
//     offers: [
//     {
//         id: 133508130,
//         affiliateUrl: 'https://www.g2a.com/borderlands-3-standard-edition-steam-key-europe-i10000186970058?aid=13344657&gtag=dccb1b16c9&utm_content=COM_GLOBAL_PB_PLUS_GAM_LISTING_NOR_allkeyshopPLUS',
//         isActive: true,
//         merchant: '61616',
//         price: [Object],
//         edition: '1',
//         region: '9',
//         stock: 'InStock',
//         platform: 'steam'
//     },
//     ...
//     ],
//     merchants: {
//     '1': {
//         id: '1',
//             name: 'Steam',
//             aggregateRating: [Object],
//             types: 'Official Store',
//             searchable: 1,
//             paymentMethods: [Object],
//             logoSlug: 'steam',
//             reviewUrl: 'https://www.allkeyshop.com/blog/review/steam/'
//     },
//     ...
//     },
//     editions: {
//         '1': { id: '1', name: 'Standard' },
//         ...
//     },
//     regions: {
//         '1': { id: '1', name: 'GLOBAL', filterName: 'PUBLISHER GLOBAL' },
//         ...
//     }
// }

Get game names without data

allkeyshopService.find('FIFA 22').then((data) => {
    console.log(data)
})

// Output:
// {
//     status: 'success', 
//     games: [
//          { id: '83060', name: 'FIFA 22' },
//          { id: '83063', name: 'FIFA 22 PS4' },
//          ...
//     ]
// }

Features

Search for games and get the cheapest price for each platform

  • Search any game and get all key prices, including official stores and key resellers
  • Filter by platform
  • Filter by store
  • Search by specific currency

Technologies used

  • TypeScript
  • Jest

Issues

Feel free to submit issues and enhancement requests here: Report Issue

Donate

If you want to support the project, you can buy me a coffee. Thanks!

"Buy Me A Coffee"

Contributing

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

1.2.0

2 months ago

1.1.7

2 months ago

1.2.1

2 months ago

1.1.6

3 months ago

1.1.5

4 months ago

1.1.4

4 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.9

10 months ago

1.0.11

7 months ago

1.0.10

8 months ago

1.0.12

7 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago