0

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!

MLyck
  • 4,959
  • 13
  • 43
  • 74
  • 1
    pretty sure it's just `&category=69150467`. – Claies Jul 06 '16 at 00:38
  • @Claies, tried that. It still finds the same amount of items. and the category path of items doesn't match the category id :/ – MLyck Jul 06 '16 at 00:41
  • &category= works though. But is there no way to use the id's? – MLyck Jul 06 '16 at 00:43
  • 1
    it doesn't appear so; after looking up [category](https://www.etsy.com/developers/documentation/getting_started/api_basics#type_category), it specifically says it's a path. "A string ID that uniquely identifies a category path (e.g. Clothing/Men/Pants)" – Claies Jul 06 '16 at 00:50

1 Answers1

2

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

MLyck
  • 4,959
  • 13
  • 43
  • 74