Get (json) list of all products with collections they belong to

How can I get a list of all products with collections they belong to. The problem is I have ~2000 products and whatever method I try I hit some limitation every time.

Last thing I tried (using Rest API) was first I got list of all collections:

/admin/api/2020-01/collection_listings.json

Then for every collection I tried to get products that belong to that category:

/admin/api/2020-01/products.json?collection_id=xxx

But this takes ages, is there anything quicker? I also tried GraphQL but limits are too low to be usable for my case.

Any suggestions?

Hey @Mato1

You mentioned you tried with graphQL but the limits were too low, but are you aware of graphQL bulk operations? This should allow you to query all products with their collections (or vice-versa) and return one large data set.