Bucketbooru runs on Danbooru; please see their documentation for API info:
https://danbooru.donmai.us/wiki_pages/help:api