To use the widget, add a
<script> tag to the page and then add the
<istock-affiliate> tag in the HTML where the image list is desired.
<html> ... <script src="https://developers.gettyimages.com/libs/affiliate/1.0/istock.js"></script> ... <hr /> <istock-affiliate api-key="API_KEY" affiliate-id="AFFILIATE_ID" search-phrase="trees" item-count="6" orientation="horizontal" image-style="photography" /> <hr /> ... </html>
The above would produce this output:
- api-key: The API Key provided after signing up to be an affiliate. Required
- affiliate-id: The affiliate id provided after signing up to be an affiliate. Required
- search-phrase: Specifies the search terms to find the content to be displayed. Optional
- item-count: Specifies the number of items to display. Valid range is 1 - 20 inclusive. Default value is 10. Optional
- orientation: Specifies the layout of the images. Valid values are
vertical. Default is
- image-style: Specifies the graphical style of the images desired. Valid values are
vector. If left blank, results will be mixed. Optional
- title: Specifies text to override the default title displayed by the widget. Optional
Multiple Affiliate Widgets on the Same Page
The affiliate widget supports multiple instances on the same page, with a few caveats:
- To avoid duplicate images being displayed across multiple instances, use the same value for
item-countin each instance.
- Because the result-set is limited to 20 images, the number of widgets multiplied by the
item-countvalue should be less than or equal to 20.
For example, if there are 2 instances of the widget on a page and the
item-count for each is set to 10, there will be no duplicate images displayed and both instances will display the desired number of images. However, if there are 3 instances of the widget on the page and
item-count is set to 8, the first and second instances of the widget would display 8 images each, but the third instance would only display 4.
- Better support for multiple instances of the affiliate widget on the same page.
- Widget title is now customizable
- Remove support for IE and Edge as it broke the widget on many affiliate sites.
- Add support for Internet Explorer 11
- Add support for Microsoft Edge
- Add MIT License
- Update to new Impact Radius tracking link
- Add widget version to search querystring
- Add indicator that search call was initiated by widget
- Initial release
- Support for Chrome, Firefox and Safari
Affiliate Partner Search API Endpoints
If the Affiliate Widget does not meet your needs, we have two search API endpoints designed specifically for Affiliate Partners:
- GET /v3/affiliates/search/images
- GET /v3/affiliates/search/videos
You can read the full documentation in the AffiliateSearch section of our Open API Documentation (Swagger).