YayMicro API

(This is the technical documentation for our API, for more general information visit: http://yaymicro.com/view.action?page=image-api)
 

Gain access

  1. Register at YayMicro.
  2. Send email to api@yaymicro.com (In English or Norwegian), include your username on yaymicro.
  3. Wait for reply. You will get a API key for testing purposes that you can use to search but not to buy or download. When you feel ready to sell our images using our API, we will send you a contract.

Api details

  • Requests must be made as HTTP (OR HTTPS) GET or POST requests to http://yaymicro.com/api/ (https://secure.yaymicro.com/api/)
  • Every request must include your apikey
  • Purchase and download actions require also your login and password parameters
  • Response is in XML or JSON (search and detail method)

Secure Connections

All methods are also available as Secure HTTP requests. Any method that sends username and password should use https.


Search method

http://yaymicro.com/api/search/<apikey>/<searchPhrase>

Parameters

  • apikey - your apikey
  • searchPhrase - searchwords separated with " " or %20. Special keyword "OR" (uppercase) can be used to create more advanced searches. (Ex: "Man OR Woman")
  • Advanced parameters - To include advanced parameters start with '?' after the searchphrase and include the parameters in standard url key/value pairs (Ex: "/searchphrase?param=value&param2=value2)
    • search.limit - Number of results per request, default is 15. Max is 100.
    • search.offset - Get results from offset in results, default is 0.
    • search.vector - Search in only vectors, default is all. Valid options are:
      • true
      • false
    • search.searchLanguage - Search language, default is English:
      • English
      • Dansk
      • Deutsch
      • Norsk
      • Nederlands
      • Svenska
    • search.filterExplicit - Include adult material, default is false.
    • search.maxPeople - Maximum of people in images, no default.
    • search.minPeople - Minimum of people in images, default is 0.
    • search.orientation - Orientation of images, default is all. Valid orientations are:
      • horizontal
      • vertical
      • square
    • search.photographer - Photographer username.
    • search.minimumSize - Minimum filesize in bytes.
    • search.minOrgHeight - Minimum height in pixels.
    • search.minOrgWidth - Minimum width in pixels.
    • search.sort - Sorting of result, default is "relevancy"
      • relevancy - Sort by relevancy
      • downloads - Sort by number of purchases
      • size - Sort by filesize
      • date - Sort by accepted date
      • dateAsc - Sort by accepted date, older files first
    • search.colorRedOn* - Images must include red colours
      • true
      • false
    • search.colorRedOff* - Images must NOT include red colours
      • true
      • false
    • JSON - true or false, default is false.

Color search is available for 8 colours. Change "Red" with one of this values: Orange, Yellow, Green, Cyan, Blue, Purple, Pink, White, Grey, Black or Brown.

Result

  • total - Number in result
  • offset - Offset in search result, as requested by client
  • limit - The limit of the search, as requested by client
  • images - Each image in result is wrapped in a image-node and has the following childnodes.
    • id - Id of the image.
    • title - Title of the image
    • thumbnail_path - Url to thumbnail-image. Image is no more than 128px in either direction.
    • thumbnailHeight - Height of thumbnail.
    • thumbnailWidth - Width of thumbnail.
    • preview_path - Url to preview-image. Image is no more than 512px in either direction.
    • preview_neutral_path - Url to a preview-image with a neutral watermark. Image is no more than 500px in either direction.
´

Examples

Search for "woman"
http://yaymicro.com/api/search/apikey/woman

Search for "women", minimum 3 people, horizontal images
http://yaymicro.com/api/search/apikey/woman?search.minPeople=3&search.orientation=horizontal

 

Detail method

http://yaymicro.com/api/detail/<apikey>/<id>

Parameters

  • apikey - your apikey
  • id - Id of the image
  • JSON - true or false, default is false.

Result

  • id - Id of the image
  • fileid - Id of the file of the image (used in the cache-method)
  • title - Title of the image
  • description - Description of the image
  • preview_path - Url to preview-image. Image is no more than 512px in either direction.
  • previewWidth - Width of preview.
  • previewHeigh - Height of preview.
  • uploaded - Uploaded date
  • photographer - Photographer username
  • license - Licens of the image. One of:
    • illustration
    • editorial
  • mimetype - Filetype of original.
  • thumbnail_path - Url to thumbnail-image. Image is no more than 128px in either direction.
  • smallSize - Size of small size image (on the format <width>x<height>.
  • mediumSize - Size of medium size image (on the format <width>x<height>.
  • largeSize - Size of large size image (on the format <width>x<height>.
  • yaymicro_preview_url - Url to the image at yaymicro.com.
  • preview_neutral_path - Url to a preview-image with a neutral watermark. Image is no more than 500px in either direction.
  • keywords - includes multiple "keyword" nodes for the image.
 
 

Buy method

http://yaymicro.com/api/buy/<apikey>/<username>/<password>/<size>/<id>/<downloadLink>

Parameters

  • apikey - your apikey
  • username - your username
  • password - your password
  • size - Size as integer to purchase. One of:
    • 1 - Small
    • 2 - Medium
    • 3 - Large
  • id - Id of the image
  • downloadLink - If true, XML returns a download link for the image. Use this if you don't want to stream the image through your servers to the clients.

Result

  • downloadId - Id to use for the download method.
 
 

Download method

http://yaymicro.com/api/download/<apikey>/<username>/<password>/<id>

Parameters

  • apikey - your apikey
  • username - your username
  • password - your password
  • downloadId - Id from buy method.

Result

  • Image - The image requested will be downloaded.
 
 

Init method

http://yaymicro.com/api/init/<apikey>/<username>/<password>/<optional-from-date>

Parameters

  • apikey - your apikey
  • username - your username
  • password - your password
  • optional-from-date - Get metadata for images added after this date. If none is provided, a compressed file with all metadata added before 2013-08-15 (YYYY-MM-DD) will be downloaded. This file includes all images, so remember to call the delete method to remove photographers who are not included in your program.

Result

  • init.csv or init.csv.gz file File containing metadata information about images
 
 

Init2 method

http://yaymicro.com/api/init2/<apikey>/<username>/<password>/<optional-from-date>

Same as init method, but including a popularity score for each image. The popularity score is calculated based on a mix of factors and helps clients push better images in search results.

 

Deleted method

http://yaymicro.com/api/deleted/<apikey>/<username>/<password>/<optional-from-date>

Parameters

  • apikey - your apikey
  • username - your username
  • password - your password
  • optional-from-date - Get only id's for images deleted or opted out after the date. If none is provided, all images that have been opted out or deleted since the start are listed.

Result

  • deleted.csv file File containing ids of all deleted images
 
 
If you have any question, please don't hesitate to contact us at api@yaymicro.com.

Photographer:


Explicit:


Color Search: (?)
 
 
 
 
 
 

 
 
 
 
 
 
























Category: (?)
 
 
 
 

People:
 
 
 
 
 
 
Vector: (?)
 
 
 

Orientation:
 
 
 
 
Sort by:





Search Language:




Log in

Already have an account? Yay, then you just need to login.







Forgot password?