Issue accessing all datasets scraped on Python API.

I'm using the Python API to scrape data. I have already scraped 5+ datasets, which I'm trying to download. I want to first get a list of all these datasets, and then I'll use their IDs to download them using an async query. Now, the issue is that I seem to be unable to get a sensible list of these 5+ datasets when I use the dataset_collection_client.list() function to query. I keep getting something of this form as an output- <apify_shared.models.ListPage object at 0xXXXXcf40> Here's a minimum working example:
from apify_client import ApifyClient

client = ApifyClient("MY TOKEN")
dataset_collection_client= client.datasets()
collection_json= dataset_collection_client.list(unnamed=True,limit=5000)
print(collection_json)
from apify_client import ApifyClient

client = ApifyClient("MY TOKEN")
dataset_collection_client= client.datasets()
collection_json= dataset_collection_client.list(unnamed=True,limit=5000)
print(collection_json)
Am I missing something?
1 Reply
!!!Joefree!!! 👑
Use items property eg: print(collection_json.items) https://docs.apify.com/api/client/python/reference/class/ListPage
ListPage | API | API client for Python | Apify Documentation
A single page of items returned from a list() method.

Did you find this page helpful?