Chiuna.2538:

For the official API is there a way to generate a list of all items of a certain type?

I’m looking to create a database of all the minipets in the game (and automate the process of keeping the database updated when new minis are released). I can get the item type from the official items API and discard the results that aren’t minis, but that means going through a lot of non-mini ids too. It isn’t too big a hurdle since I won’t need to update my list very often, but maybe I’m missing an easier solution?

For my purposes I don’t really care about anything more than keeping an updated list of mini names, ids, and icon paths so if anybody has an alternative suggestion of a good source for this info that would also be welcome!

Lawton Campbell.8517:

There is currently no way to filter the list of items by type with the official API. I believe there are third-party APIs which provide this functionality, but am not sure which.

keneanung.3071:

gw2spidy allows you to retrieve the list of all sellable minis. Not sure if there are minis you can’t sell.

http://www.gw2spidy.com/api/v0.9/json/all-items/11

Alpha.6913:

For the official API is there a way to generate a list of all items of a certain type?

I’m looking to create a database of all the minipets in the game (and automate the process of keeping the database updated when new minis are released). I can get the item type from the official items API and discard the results that aren’t minis, but that means going through a lot of non-mini ids too. It isn’t too big a hurdle since I won’t need to update my list very often, but maybe I’m missing an easier solution?

For my purposes I don’t really care about anything more than keeping an updated list of mini names, ids, and icon paths so if anybody has an alternative suggestion of a good source for this info that would also be welcome!

Gather your own info. You can get the JSON of every item ingame. Get the list of all items, or the items you need, and then insert the JSON, parsed ofc into a database…

Silot.2593:

So is Arenanet OK for us to request 69645 items one by one to find the type we want?

Lawton Campbell.8517:

So is Arenanet OK for us to request 69645 items one by one to find the type we want?

Should be fine, though you’ll spend less time if you request whole pages, e.g., enumerate starting from /v2/items?page=0&page_size=200 and look at the response headers (e.g., X-Page-Total) to see how many pages there are.

This will currently take you ~206 requests, which is a lot, but shouldn’t be more than a minute or two to pull down and ingest into e.g., a database.

Alpha.6913:

So is Arenanet OK for us to request 69645 items one by one to find the type we want?

Should be fine, though you’ll spend less time if you request whole pages, e.g., enumerate starting from /v2/items?page=0&page_size=200 and look at the response headers (e.g., X-Page-Total) to see how many pages there are.

This will currently take you ~206 requests, which is a lot, but shouldn’t be more than a minute or two to pull down and ingest into e.g., a database.

Sorry for your database haha but what I used 200 java threads to pull the data. Each thread would pull around 200-300 items. All threads running at the same time took them around 5 minutes to collect all the items.

By the way, is there any limit / ip for requests ?

Eearslya.6309:

So is Arenanet OK for us to request 69645 items one by one to find the type we want?

Should be fine, though you’ll spend less time if you request whole pages, e.g., enumerate starting from /v2/items?page=0&page_size=200 and look at the response headers (e.g., X-Page-Total) to see how many pages there are.

This will currently take you ~206 requests, which is a lot, but shouldn’t be more than a minute or two to pull down and ingest into e.g., a database.

Sorry for your database haha but what I used 200 java threads to pull the data. Each thread would pull around 200-300 items. All threads running at the same time took them around 5 minutes to collect all the items.

By the way, is there any limit / ip for requests ?

At the moment there is no actual ‘limit’, nothing is stopping you from requesting 60k+ pages at once. But the devs have stated that this is subject to change and they ask that you try not to abuse this freedom.

alkaniserval.5963:

For the official API is there a way to generate a list of all items of a certain type?

I’m looking to create a database of all the minipets in the game (and automate the process of keeping the database updated when new minis are released). I can get the item type from the official items API and discard the results that aren’t minis, but that means going through a lot of non-mini ids too. It isn’t too big a hurdle since I won’t need to update my list very often, but maybe I’m missing an easier solution?

For my purposes I don’t really care about anything more than keeping an updated list of mini names, ids, and icon paths so if anybody has an alternative suggestion of a good source for this info that would also be welcome!

I submitted a Feature Enhancement Request to provide something similar for the Recipe endpoint. Perhaps they’ll extend it to additional endpoints in the future.

One way to formally ask for that kind of functionality is to just open a thread asking for that feature, along with specific examples of what you would like for it to do, how, and why. It may not get at the top of the list, but it never hurts to ask; the worst that happens is they don’t ever implement it and you’re stuck with the brute-force method of handling the data.

If you would like an example, albeit a non-definitive one, on how someone might submit a feature request with enough meat for the developers to at least chew on, take a look at my thread:

https://forum-en.guildwars2.com/forum/community/api/FEATURE-REQUEST-API-Query-Search-Enh/first

For now, keep using the brute-force method; implementing new API features is probably very low priority on their list at the moment due to the imminent HotS release. However, if you document what you’re looking for, they can at least have something to put on their project plans for the next few quarters if and when they get cycles.