# Game duplication in API and website search

**URL:** <https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382>\
**Category:** API\
**Created:** [September 4, 2019, 12:08am UTC](https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382 "2019-09-04T00:08:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Dillinger](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/benjamin_dillinger/32/2568_2.png) [@Benjamin\_Dillinger](https://discuss.dev.twitch.com/u/Benjamin_Dillinger)\
**Post date:** [September 4, 2019, 12:08am UTC](https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382/1 "2019-09-04T00:08:54Z")

</div>

Hey there

Noticed around last Thursday or Friday (August 29/30) that the name for the game `Z1 Battle Royale` was changed back to `H1Z1`. This is all well and good except that there are a few inconsistencies when trying to fetch information from the API that are also mirrored on [Twitch.tv](http://Twitch.tv).

Details:  
Endpoint: `https://api.twitch.tv/helix/games?id=417892&id=511815`  
Response:

```auto
{
    "data": [
        {
            "id": "511815",
            "name": "H1Z1",
            "box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/H1Z1-{width}x{height}.jpg"
        },
        {
            "id": "417892",
            "name": "H1Z1",
            "box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/H1Z1-{width}x{height}.jpg"
        }
    ]
}

```

Endpoint: `https://api.twitch.tv/helix/games?name=H1Z1`  
Response:

```auto
{
    "data": [
        {
            "id": "511815",
            "name": "H1Z1",
            "box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/H1Z1-{width}x{height}.jpg"
        }
    ]
}

```

So the ID `511815` is clearly the winner, except that the v5 endpoint for `top_games` is returning results from both IDs.  
This can be confirmed by going to `https://www.twitch.tv/search?term=h1z1`. Clicking on either of the results will bring you to the `511815` version, but the `417892` version is still accessible through `https://www.twitch.tv/directory/game/z1%20battle%20royale`. I’m surprised the ES query is giving me the right one when I click on them 🙂

* * *

Another similar issue I ran into was involving another game: `MudRunner`  
Endpoint: `https://api.twitch.tv/helix/games?name=MudRunner`  
Reponse:

```auto
{
    "data": [
        {
            "id": "498821",
            "name": "MudRunner",
            "box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/MudRunner-{width}x{height}.jpg"
        }
    ]
}

```

Endpoint: `https://api.twitch.tv/helix/games?id=498821`  
Response:

```auto
{
    "data": [
        {
            "id": "498821",
            "name": "Spintires: MudRunner",
            "box_art_url": "https://static-cdn.jtvnw.net/ttv-boxart/./Spintires:%20MudRunner-{width}x{height}.jpg"
        }
    ]
}

```

Hmm, this seems a little strange as well. Let me double check by calling…  
Endpoint: `https://api.twitch.tv/helix/games?name=Spintires: MudRunner`  
Response:

```auto
{
    "data": []
}

```

`https://www.twitch.tv/directory/game/mudrunner` is the URL that exists on twitch, as `Spintires: Mudrunner` gives me a 404. I’m just confused why the API would return a game name that it clearly doesn’t have any data for, as evidenced by the api call for the name rather than ID.

Any help or transparency regarding these issues would be greatly appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![Benjamin\_Dillinger](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/benjamin_dillinger/32/2568_2.png) [@Benjamin\_Dillinger](https://discuss.dev.twitch.com/u/Benjamin_Dillinger)\
**Post date:** [September 5, 2019, 7:08pm UTC](https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382/2 "2019-09-05T19:08:17Z")

</div>

I can additionally confirm the same behavior as the group `"MudRunner"` -\> `498821` -\> `"Spintires: MudRunner"` -\> `{}` with the following:

`"Eden Rising"` -\> `505640` -\> `"Eden Rising: Supremacy"` -\> `{}`  
`"Police Simulator: Patrol Duty"` -\> `498161` -\> `"Police Simulator 18"` -\> `{}`  
`4211` -\> `"Solitare"` -\> `{}`

---

<div class="post-metadata">

**Author:** ![Benjamin\_Dillinger](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/benjamin_dillinger/32/2568_2.png) [@Benjamin\_Dillinger](https://discuss.dev.twitch.com/u/Benjamin_Dillinger)\
**Post date:** [September 10, 2019, 6:48pm UTC](https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382/3 "2019-09-10T18:48:36Z")

</div>

`/kraken/games/top`

```auto
{ "game" =>
      { "name" => "MayhemCars",
        "popularity" => 0,
        "_id" => 511641,
        "giantbomb_id" => 72885,
        "box" => { "large" => "https://static-cdn.jtvnw.net/ttv-boxart/MayhemCars-272x380.jpg",
                   "medium" => "https://static-cdn.jtvnw.net/ttv-boxart/MayhemCars-136x190.jpg",
                   "small" => "https://static-cdn.jtvnw.net/ttv-boxart/MayhemCars-52x72.jpg",
                   "template" => "https://static-cdn.jtvnw.net/ttv-boxart/MayhemCars-{width}x{height}.jpg" },
        "logo" => { "large" => "https://static-cdn.jtvnw.net/ttv-logoart/MayhemCars-240x144.jpg",
                    "medium" => "https://static-cdn.jtvnw.net/ttv-logoart/MayhemCars-120x72.jpg",
                    "small" => "https://static-cdn.jtvnw.net/ttv-logoart/MayhemCars-60x36.jpg",
                    "template" => "https://static-cdn.jtvnw.net/ttv-logoart/MayhemCars-{width}x{height}.jpg" },
        "localized_name" => "MayhemCars",
        "locale" => "en-us" },
    "viewers" => 2,
    "channels" => 1
  }

```

`https://api.twitch.tv/helix/games?id=511641`

```auto
{"data":[{"id":"511641","name":"MayhemCars","box_art_url":"https://static-cdn.jtvnw.net/ttv-boxart/MayhemCars-{width}x{height}.jpg"}]}

```

`https://api.twitch.tv/helix/games?id=512105` or `https://api.twitch.tv/helix/games?name=MayhemCars`

```auto
{"data":[{"id":"512105","name":"MayhemCars","box_art_url":"https://static-cdn.jtvnw.net/ttv-boxart/MayhemCars-{width}x{height}.jpg"}]}

```

---

<div class="post-metadata">

**Author:** ![Benjamin\_Dillinger](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/benjamin_dillinger/32/2568_2.png) [@Benjamin\_Dillinger](https://discuss.dev.twitch.com/u/Benjamin_Dillinger)\
**Post date:** [September 11, 2019, 5:19pm UTC](https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382/4 "2019-09-11T17:19:38Z")

</div>

```auto
  {
    "game" => {
      "name" => "Forest of Evil",
      "popularity" => 0,
      "_id" => 512760,
      "giantbomb_id" => 73959,
      "box" => { "large" => "https://static-cdn.jtvnw.net/ttv-boxart/Forest%20of%20Evil-272x380.jpg",
                 "medium" => "https://static-cdn.jtvnw.net/ttv-boxart/Forest%20of%20Evil-136x190.jpg",
                 "small" => "https://static-cdn.jtvnw.net/ttv-boxart/Forest%20of%20Evil-52x72.jpg",
                 "template" => "https://static-cdn.jtvnw.net/ttv-boxart/Forest%20of%20Evil-{width}x{height}.jpg" },
      "logo" => { "large" => "https://static-cdn.jtvnw.net/ttv-logoart/Forest%20of%20Evil-240x144.jpg",
                  "medium" => "https://static-cdn.jtvnw.net/ttv-logoart/Forest%20of%20Evil-120x72.jpg",
                  "small" => "https://static-cdn.jtvnw.net/ttv-logoart/Forest%20of%20Evil-60x36.jpg",
                  "template" => "https://static-cdn.jtvnw.net/ttv-logoart/Forest%20of%20Evil-{width}x{height}.jpg" },
      "localized_name" => "Forest of Evil",
      "locale" => "en-us" },
    "viewers" => 1,
    "channels" => 1
  }

```

`https://api.twitch.tv/helix/games?id=512760`

```auto
{"data":[{"id":"512760","name":"Forest of Evil","box_art_url":"https://static-cdn.jtvnw.net/ttv-boxart/Forest%20of%20Evil-{width}x{height}.jpg"}]}

```

`https://api.twitch.tv/helix/games?id=513163` or `https://api.twitch.tv/helix/games?name=Forest of Evil`

```auto
{"data":[{"id":"513163","name":"Forest of Evil","box_art_url":"https://static-cdn.jtvnw.net/ttv-boxart/Forest%20of%20Evil-{width}x{height}.jpg"}]}

```

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [September 12, 2019, 10:13am UTC](https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382/5 "2019-09-12T10:13:37Z")

</div>

I believe the point is well taken, there is no need to bump your post with new game name/ID mismatches

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [October 12, 2019, 10:13am UTC](https://discuss.dev.twitch.com/t/game-duplication-in-api-and-website-search/22382/6 "2019-10-12T10:13:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
