Passing 37,000 images in 2015 I finally decided to build an API system for others who may want to play with some data in the system.
The API will return results in either JSON or XML format.
The format for the URL is as follows:
https://api.4cache.net/<action>/<number of results to return>/<xml|json>/
To get the most recent images added to the Cache use the 'mostrecent' action
Call https://api.4cache.net/mostrecent/50/xml/
Works just like the Search page except shows in Descending order. Can also be used as a Customisable RSS Feed Generator using the rss format
Syntax is as follows:
api.4cache.net/search/searchTerm/x/(json|xml|rss)/
Where x is the number of results you want to return.
EG: Call https://api.4cache.net/search/test/5/json/
This is essentially the same as the SEARCH call but named something more sensible for when people want to set up their own RSS feeds on custom content
Syntax is as follows:
api.4cache.net/rss/searchTerm/x/rss/
Where x is the number of results you want to return.
EG: Call https://api.4cache.net/rss/test/5/
JSON Output will look like this:
{"posts":[{"post":{"id":"14962","file":"1241072156365.jpg","comment":"testicles","rating":"4","width":"1024","height":"768"}}]}
Note that the JSON does not include links for the Thumbnails and Image location so you will need to manually add them in. These are the following locations where the Thumbnails and Source images are stored.
XML Output will look like this:
<images> <image> <image_id>14962</image_id> <image_thumb>https://static.4cache.net/thumbs/1241072156365.jpg</image_thumb> <image_link>https://p.4cache.net/1241072156365.jpg</image_link> <image_comment>testicles</image_comment> <image_width>1024</image_width> <image_height>768</image_height> <image_rating>4</image_rating> </image> </images>
RSS Output will look like this: