API talk:2/items

From Guild Wars 2 Wiki
Jump to: navigation, search

Ids Parameter Length Limit[edit]

It might be good to note that this endpoint is limited to 200 id requests at once. —Yasvisu (talk) 09:52, 12 December 2014 (UTC)

That applies to the whole paging mechanism of v2. I noted the limit here. poke | talk 18:56, 13 December 2014 (UTC)
https://api.guildwars2.com/v2/items?ids=19684,19709 is the form used to query multiple ids at once Separ (talk) 19:11, 7 September 2015 (UTC)

Item discovery[edit]

As the endpoint takes an item id, how do you discover the id of an item using it's in game name? Neon (talk) 14:48, 2 March 2015 (UTC)

Type /wiki, then Space, then shift+click on the item, then hit Enter. That will bring you to the wiki's search page which will decode the item's chat link and show you the ID. —Dr Ishmael User Dr ishmael Diablo the chicken.png 16:00, 2 March 2015 (UTC)

Add ids parameter[edit]

Why isn't the ids parameter listed on the page? I would think that should show up, albeit it would be desirable to report the noted limit (see other section here) nearby so people know from the get go.

searching item by recipe ID[edit]

Heya, so I've been trying to do a search slightly differently than I have before and I'm running into issues.

If we look at https://api.guildwars2.com/v2/items?id=78680, we see

{"name":"Recipe: Small Flute","type":"Consumable","level":0,"rarity":"Masterwork","vendor_value":0,"game_types":["Wvw","Dungeon","Pve"],"flags":["AccountBound","NoMysticForge","NoSalvage","NoSell","AccountBindOnUse"],"restrictions":[],"id":78680,"chat_link":"[&AgFYMwEA]","icon":"https://render.guildwars2.com/file/027D1D382447933D074BE45F405EA1F379471DEB/63127.png","details":{"type":"Unlock","unlock_type":"CraftingRecipe","recipe_id":11807}}

The part which interests me is <"recipe_id":11807>. What I would like to do is be able to type in "11807" and get the value <id=78680> in return. The goal here would be to have a recipe ID, and figure out which recipe sheet is used to discover the recipe.

To be clear, simply doing https://api.guildwars2.com/v2/recipes?ids=11807, does NOT return the recipe sheet ID but instead the crafted item ID. -Darqam (talk) 16:48, 25 April 2016 (UTC)

Can't directly help solve this, but I can't point out two things.
  1. The Recipe ID's that get unlocked can appear in two separate locations, "recipe_id" which contains a single ID, and "extra_recipe_ids" which can contain multiple ID's, as seen on https://api.guildwars2.com/v2/items/74718
  2. Taking a look through https://forum-en.gw2archive.eu/forum/community/api may give you some idea as to what can be done, and what's in the works. Posting on there may get some faster responses from community members and the devs concerning the API usage.
Hope this helps. G R E E N E R 17:03, 25 April 2016 (UTC)
(Edit conflict) Um, I don't think doing the search that way around works. You could however scrape the entire items database, store it locally and then CTRL+F the recipe id you wanted ><. -Chieftain AlexUser Chieftain Alex sig.png 17:04, 25 April 2016 (UTC)
Damn, I was hoping I just couldn't figure it out and there was some fancy way to do it :(. Thanks Greener for showing that link, I might go there, but I was hoping for a currently working system, not one in the future :p. As for your suggestion Chieftain; I thought of that, but don't have the means to do that at the moment. If I still care for it at a later point I might bother finding a work-around like that, but not for now I guess. -Darqam (talk) 17:19, 25 April 2016 (UTC)
I did bring this to Lawton's attention, so there may be an API feature that supports this in the future, but I can't say when it would be implemented. Eearslya (talk) 17:33, 25 April 2016 (UTC)
@Darqam, I've uploaded a spreadsheet with the json results that contained a recipe_id here, you can do a crude search through it. (My pc didn't like the full items api being in one text document). -Chieftain AlexUser Chieftain Alex sig.png 17:37, 25 April 2016 (UTC)
Thanks for that Eearslya. Chieftain, thanks for the link I'll confirm a few things with it (still requires more copy-pasta than I'd like, but this already cuts the work down quite a bit); thanks! -Darqam (talk) 17:42, 25 April 2016 (UTC)

new addition, "stat_choices"[edit]

It seems a recent addition was made to the items, in that the API now shows which stats are selectable by it (WOOOOO!). See for example Malicious Xera Backpiece (Infused). The stats correspond with those shown in API:2/itemstats. -Darqam (talk) 16:04, 29 June 2016 (UTC)

2016-07-26 update[edit]

Infusion slot subobject
flags – now always an empty array. Offensive, Defensive, Utility, Agony doesn't exist.
item_id – known ids are now [49428, 78028, 78052].
Note: If no infusion slot is present, the value of the infusion_slots property is an empty array. If Enrichment or Infusion slots exist, then the list will contain that many subobjects.

--BryghtShadow (talk) 07:32, 1 August 2016 (UTC)

Consumable Food: New properties[edit]

Hi, I just saw that there are 2 new properties in https://api.guildwars2.com/v2/items/12452 --> apply_count (number) and name (string, translatable) are not yet documented. Also the example code needs to be updated with the new response. The preceding unsigned comment was added by Leylin (talkcontribs) at 15:30, October 16, 2016‎ (UTC).

Thanks for the heads up, edited it for now. -Darqam (talk) 17:01, 16 October 2016 (UTC)

New possible enum values[edit]

While syncing my local item database i encountered some new enum values in the /items endpoint:

flags:

  • Attuned
  • BulkConsume
  • DeleteWarning
  • Infused
  • Tonic

restrictions:

  • Female

--Richardreloaded (talk) 18:17, 6 October 2017 (UTC)

I'll take a look, where did you see that restriction by the way? -Darqam 18:41, 6 October 2017 (UTC)
On the item "Order of Shadows Intel Report" (https://api.guildwars2.com/v2/items/84141). Seems like a mistake to me. --Richardreloaded (talk) 11:18, 7 October 2017 (UTC)
That's.... strange. I'm going to poke lye about this. -Darqam 23:29, 7 October 2017 (UTC)

New consumable type: RandomUnlock[edit]

Guaranteed Armor Unlock Check the API for this one. J.Tesla (talk) 20:07, 14 December 2017 (UTC)

Added it, sorry hadn't noticed this post earlier. -Darqam 16:22, 17 December 2017 (UTC)

new type, "Key"[edit]

Just found a reference to item ID:82444 "Exotic Florid Bouquet" under a section titled "Key" 146.200.52.128 15:27, 15 July 2018 (UTC)

I believe "type": "Key" shouldn't be appearing for items since the key storage was added (and key items were generally removed). Also, all of the other items for this series of collections are correctly listed as "Trophy". This item should be showing as a trophy, so I believe this is probably a bug in the API itself (and quite possibly the API is grabbing the details for the developer version of this item instead of the live version.) Bandlero (talk) 20:40, 15 July 2018 (UTC)