World of Warcraft retail finding vendors

I am trying to find a way to pull up NPCs, specifically those who sell items, and get a list of their inventories.

I could swear this was a pretty easy api call ~7 years ago but the API is vastly different than what I remember since the last time I played with World of Warcrafts API.

I see that items have a listed buy and sell price but I think all items have these values even if no vendor actually sells the item. ie. Thunderfury has a buy price and unless something has changed since I last played that item should not be able to be bought with gold.

So I am looking for the vendors and their inventories so I can know for certain an npc sell certain items, then I plan to make a list of all those items.