Image Search API

BETA: This API resource is not finalized, and there could be breaking changes before its final release.

This API requires a compatible image search service to be configured

Find images InternetImageController#image_search

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

GET /api/v1/image_search

Scope: url:GET|/api/v1/image_search

Find public domain images for use in courses and user content. If you select an image using this API, please use the Confirm image selection API to indicate photo usage to the server.

Request Parameters:

Parameter Type Description
query Required string

Search terms used for matching images (e.g. “cats”).

API response field:

  • id

    The unique identifier for the image.

  • description

    Description of the image.

  • alt

    Accessible alternative text for the image.

  • user

    The name of the user who owns the image

  • user_url

    The URL to view the user's profile on the image upload site

  • large_url

    The URL of the image sized large

  • regular_url

    The URL of the image

  • small_url

    The URL of the image sized small

  • raw_url

    The raw URL of the photo

Example Response:

[{
   "id": "eOLpJytrbsQ",
   "description": "description",
   "alt": "accessible description of image",
   "user": "Jeff Sheldon",
   "user_url": "http://unsplash.com/@ugmonk",
   "large_url": "https://images.unsplash.com/photo-1416339306562-f3d12fefd36f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&s=92f3e02f63678acc8416d044e189f515",
   "regular_url": "https://images.unsplash.com/photo-1416339306562-f3d12fefd36f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&s=92f3e02f63678acc8416d044e189f515",
   "small_url": "https://images.unsplash.com/photo-1416339306562-f3d12fefd36f?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=200&fit=max&s=8aae34cf35df31a592f0bef16e6342ef"
}]

Confirm image selection InternetImageController#image_selection

BETA: This API endpoint is not finalized, and there could be breaking changes before its final release.

POST /api/v1/image_selection/:id

Scope: url:POST|/api/v1/image_selection/:id

After you have used the search API, you should hit this API to indicate photo usage to the server.

Request Parameters:

Parameter Type Description
id Required string

The ID from the image_search result.

API response field:

  • message

    Confirmation success message or error