How do I use the api to return the items in my private lists?
2 years ago
Posts: 4
I've gotten as far returning a list of all my lists, but I want to save the data from each list, i.e. the actual series on the list. The api doesn't really have any examples and I feel like I'm stumbling around in the dark...
2 years ago
Posts: 2860
Hi,
Use searchListPost: https://api.mangaupdates.com/#tag/lists/operation/searchListsPost
Edit: You can use retrieveLists to get the IDs of your lists: https://api.mangaupdates.com/#tag/lists/operation/retrieveLists
2 years ago
Posts: 4
Thank you for answering!
What about private lists? Do we have the functionality to access those yet? All my lists are private, so I noticed I was getting all 404 status codes 😢
IGNORE ABOVE
2 years ago
Posts: 4
I found an example of someone using your API and I realized I didn't add all the necessary info correctly.
I had placed the page data in the same object/dict as the Auth data, which was wrong.
response = requests.post(url, headers=headers, json=data)
The next thing is the page data. I don't quite understand how it works.
{
"page": 0,
"perpage": 0
}
I want ALL my data. Do I need to go in and look at the actual lists find how many items there are? My assumption was that using "0" would return all the data, but all I got was
{'status': 'exception', 'reason': 'Field Validation Error', 'context': [{'page': '"0" must be greater than 0'}, {'perpage': '"0" must be greater than 0'}]}
Ah, I see. I had to set "perpage" to some arbitrarily high number in order to get everything for the list I tested.
Wouldn't it be better for the "lists" get request to return the "'total_hits" value (aka the number of list items) in the information about the list? To me, that seems more important that returning the list's icon.
2 years ago
Posts: 2860
Hi,
If you look at the documentation for searchListsPost, you can see that it returns "total_hits" in the response. You can then use paging (i.e., pull the first 100 items, with perpage=100, and then the next 100 items, etc) until you hit total_hits.
You should be able to retrieve everything like this. If you set your list "perpage" to All, then it will return everything at once (up to 2k items I believe?)
2 years ago
Posts: 4
That's what I ended up doing.
I just feel like it would make more sense to include the list count in the info for the lists (from the get response). The way I had to do it was make a post request for the "total_hits" then another post request once the pages were divided appropriately (for each page, since I can't get all 4600+ series from my PTR list in one go). Setting the "perpage" to 2000 resulted in it setting itself to 75 (I had to set a number for the math; I may have done something wrong, but I couldn't figure it out). I just used 1000.
I hope what I'm saying makes sense ^_^;
But I did get it figured out in the end 🙂
Thanks.
2 years ago
Posts: 1
can someone tell me how to get the series id, I don't know where I can find it. I'm making a web application called maousect. and I'm a big fans of manhwa so I want to make an app to show status of all. I want to get all manhwa details. this site is my only hope can someone tell how to get the manhwa list from Baka updates api or any other way possible


