Search code examples
javascriptapietsy

Etsy API listings by category


I can't figure out what the URL for getting listings by category is supposed to be.

This URL works for my main listings: https://api.etsy.com/v2/listings/active.js?api_key=1234&keywords=whiskey&includes=Images,Shop

I feel like I've tried a million combinations of including category_id=69150467

But I can't get the listings by keyword and category.

The documentation isn't very helpful: https://www.etsy.com/developers/documentation/reference/listing

And there's no examples on where to put the category_id. Or how it's supposed to be formatted.

If anyone knows this. Or can decipher Etsy's documentation on this simple issue. I'd really appreciate the help!


Solution

  • Turns out there's no way to get categories by id only.

    Ended up having to refactor my code to work with category names instead. and the above example would look like this instead:

    https://api.etsy.com/v2/listings/active.js?api_key=1234&category=supplies&keywords=whiskey&includes=Images,Shop