API Query Manual for contributors and developersCliparto's API Query accepts automatic queries to the database of Cliparto from other web servers or local software programs to provide the actual numbers of the current balance, the number of downloads, the number of images, current status of the image and other data. Important Disclaimer: Automatic requests are allowed only through the API Query. Cliparto reserves the right to block access to the website in case of parsing certain pages.
How it works? We have very simple algorithm for data output:
1. Your script sends a GET-request to our server at https://cliparto.com/apiq/
2. Our system checks the request.
3. If the request contains no error the requested information is displayed on the page of the request. Otherwise the error will be displayed. Query parameters Each request must contain the following parameters:
id - unique User ID (you can find it in the user settings section)
q - query type (list of accepted query types is shown in the following section)
ext - extra parameter (optional, depending on the query type)
md5 - MD5 hash of the request (accordingly to RFC 1321 - The MD5 Message-Digest Algorithm) To calculate the MD5 hash, you need to make a string that contains all the query parameters as described below and pass it in as the value to your scripting languages MD5 function. Example: md5 ( id + q + ext + API Code ) You can generate your API Code in the user settings section. Example of PHP code to generate MD5 hash: $string_to_hash=$id.$q.$ext.$api_code;
$md5=md5($string_to_hash); Example of query: https://cliparto.com/apiq/?id=176050&q=BalanceCurrent&md5=372aadd1bad841a7c898b57dbbecab44 id => 176050 q => BalanceCurrent ext => API Code => 8zn2eBj90M0F md5 => md5( 176050BalanceCurrent8zn2eBj90M0F ) => 372aadd1bad841a7c898b57dbbecab44 Query types
q | ext | Data |
BalanceCurrent | n/a | The actual user's balance (USD) |
EarningsTotal | n/a | The earnings for all the time (USD) |
EarningsThisMonth | n/a | The earnings during current month (USD) |
EarningsPrevMonth | n/a | The earnings during previous month (USD) |
DownloadsTotal | n/a | The number of downloads for all the time |
DownloadsThisMonth | n/a | The number of downloads during current month |
DownloadsPrevMonth | n/a | The number of downloads during previous month |
DownloadsList | 1-100 default - 10 | The list of last downloads; ext - the number of output rows (records); format of each row - date; image ID; license type; image size; earning (USD); buyer's country (ISO); search query |
ImagesTotal | n/a | The number of images approved |
ImagesNew | n/a | The number of new images (uploads) approved during the current month |
ImagesNewPrevMonth | n/a | The number of new images (uploads) approved during the previous month |
ImageIDByFileName | File name | Returns the ID of the image by the original file name; ext - original file name (without extension) |
ImageData | Image ID | Info about the image by its ID; ext - Image ID; Format of output - image status; image title; image views; image downloads; image earnings (USD); Serie ID; original file name |
ProcessFilesFromFTP | n/a | Submit all the files uploaded by FTP to the processing queue |
SubmitToPending | n/a | Submit all the uploaded images to Pending for review |
ReleasesList | n/a | Complete list of all the releases uploaded; Format of output - ID; type (1 - model, 2 - property); name |
AttachReleaseToImage | Release ID:Image ID | Attach release (Release ID) to the image (Image ID) |
Restrictions
- No more than one request within 20 seconds
- The same query with the same parameters should not be repeated within one hour |