Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.search_for_categories() #118

Open
ahsantfw opened this issue Sep 6, 2022 · 1 comment
Open

api.search_for_categories() #118

ahsantfw opened this issue Sep 6, 2022 · 1 comment

Comments

@ahsantfw
Copy link

ahsantfw commented Sep 6, 2022

I want to get "category numbers" for the Main Categories Like Home&Kitchen etc (Categories with most sales) but I don't know how to use this function as it takes "search word" and returns subcategories.

print(Initializing Keepa API\n')
api = keepa.Keepa(mykey)
categories = api.search_for_categories()
print(categories)

image

@akaszynski
Copy link
Owner

If I understand you right, I think you're looking for something like:

Query for the best sellers among the ``"movies"`` category.

>>> import keepa
>>> key = '<REAL_KEEPA_KEY>'
>>> api = keepa.Keepa(key)
>>> categories = api.search_for_categories("movies")
>>> category = list(categories.items())[0][0]
>>> asins = api.best_sellers_query(category)
>>> asins
['B0BF3P5XZS',
 'B08JQN5VDT',
 'B09SP8JPPK',
 '0999296345',
 'B07HPG684T',
 '1984825577',
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants