Offer Stock Photo Sales With PixMac API

The Pixmac team boldly proclaims that they aim to be the "fastest, most usable and reliable microstock the image marketplace" on their about us page. The straightforward Pixmac API should increase the exposure for their stock image portfolio in service of that goal.  Security is clearly important to PixMac since API requests can be sent over HTTP or HTTPs.  Responses can be returned in either JSON or XML format based on preference.  The API has four simple steps to follow for selling their stock images on your website or application.

The first step involves searching the image database based on keyword, license or 7 other parameters.  These results are provided with a bit of metadata but must importantly, a URL for a thumbnail and image preview.  Once you’ve selected an image of interest from this result set, you can proceed to step two:  requesting the details of that image.  The details will include image format, height, width, author, and more.  At this stage, you’ve seen the image and you have the details of the license.  The user of your site might be ready to move onto the next step three, purchasing the image!

Purchasing is a two phase process.  First you execute the purchase API call which returns a download pass.  This download pass is then supplied to the fourth and final step, the download API call.  The result of the download call is the image data itself.   Both purchasing and download of the images through the API require a username and password, which means that users of a site implemented with the PixMac API will have to have accounts with PixMac prior to purchasing.  The upside to this design is that API users to do not need to handle the customer’s financial credentials.

Be sure to read the next API article: How I Scrapped MySQL for MongoDB in Three Hours


Comments (0)