I've been looking into how to use the API to find out what pools an image is in. As far as I can tell, however, there doesn't seem to be a proper direct way to do it...
- The Post List doesn't include what pools an image is in. Post Show is just a single element from the list, so it doesn't include them either.
- The Pool List allows you to search for pools with a specific name, which isn't helpful if you don't know it.
- An image's pools are listed on the HTML Post Show.
... which leaves two options...
- Scrape the HTML page of every post you want to check. Because the Post List API doesn't even specify whether an image is in a pool (despite specifying whether an image has children, comments, and notes), there's no way to filter out unpooled posts ahead of time. Incredibly inefficient, which is why we have an API to use instead.
- Query the ID of every single pool, 20 at a time (no limit parameter). Query the posts in every pool, 24 at a time (no limit parameter). Requires an excessive number of individual requests, many of which will return nothing but chaff.
It seems like there ought to be a more efficient way to get the pools you actually want. Is there something in the API I'm missing? Is it really this much trouble?
It kinda makes me wish there was just a convenient dump of pool info... but e621 doesn't release database dumps, right?
Updated by AoBird