A module to search and scrape Xbox Gamertag. This is not sponsored, supported, or affiliated with Xbox.
- Install Modules
npm i xboxgamertag
-
With Asynchronous
- ESModule
import xboxGamertag from 'xboxgamertag'; async function main(query) { const response = await xboxGamertag(query); console.log(response); } main("Drelez");
- CommonJS
const xboxGamertag = require('xboxgamertag'); async function main(query) { const response = await xboxGamertag(query); console.log(response); } main("Drelez");
-
Without Asynchronous
- ESModule
import xboxGamertag from 'xboxgamertag'; function main(query) { xboxGamertag(query).then((response) => { console.log(response); }); } main("Drelez");
- CommonJS
const xboxGamertag = require('xboxgamertag'); function main(query) { xboxGamertag(query).then((response) => { console.log(response); }); } main("Drelez");
- Example Response
{ "message": "Successfully found Gamertag!", "profile": { "gamertag": "Drelez", "avatar": "https://images.weserv.nl/?url=https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3Mr4hSPR51EO7YOcBVc07Tk5bdOFLOrIT2PBk7nzYYihZ287x72g7AkxO2sByN5BI1NuLBXqDrwdtEOeZKFtZfwvr5b_6aoOARmXS78pvHwyU-&format=png&maxage=1d&output=webp&w=90&h=90", "detail": { "gamerscore": "70", "gamesplayed": "1" }, "history": [ { "gamename": "Minecraft for Android", "lastplayed": "Last played 1 year ago", "platform": "Android", "gamescore": "70 / 2870", "achievement": "6 unlocked", "progress": "2.0%" } ] } }