Killerjo.3975:

Hello,

i am new to the GW2 API and i want to know how i can get a list of ingredients for a special item id.

For example there is not a recipe for every weapon, but i want to get a list of item ids that are required to craft the weapon. For example a list of items i need to craft a legendary weapon in the mystic forge.

Is there something like that ?

Lawton Campbell.8517:

For mystic forge recipes, no. There’s a community-maintained JSON document somewhere that has (probably) all of the mystic forge recipes.

For discovered crafting recipes, if you know the item id (e.g., 15466), you can use /v2/recipes/search to get a list of all recipes that output the item, which can then be resolved against /v2/recipes to get the inputs. The inputs can then be recursively put into /v2/recipes/search to get the entire crafting tree.

Killerjo.3975:

Ahh great thanks for this information, that is some really useful stuff there.

Thanks

Mystic.5934:

I think Lawton is referring to my recipes:
http://www.gw2profits.com/json
we had a big discussion about it over here if you’re interested
As far as I know it has all of the forge’s guaranteed-output recipes (it’s missing things like “4 rares = 1 rare with chance of exotic”). It also has misc other recipes, like charging achievement items (very handy for the new legendaries) or buying items from vendors or promoting Evergreen Slivers. It does not have the recipes available from GW2 API, but you can get those easily enough.
You can refine the search and only get the recipes you want. That main page should explain all the options (and I change things occassionally, so check it for the latest version), if you’re just looking for all forge recipes, the link you want is probably this:
http://gw2profits.com/json/v3?disciplines=Mystic Forge
If you know of any recipes that are missing, I’d love to add them. a compiled recipe, text, even just a wiki link is all I need. I’ve steamlined the process pretty well so just knowing the recipe exists is my biggest hurdle – I add the new ones from patch notes within a couple days of release.