Input model

A configuration object specifying type, content, target medium and other parameters of the input to the analysis.

There are currently two input types, which restrict the format of the input content:

type

Description

webPageUrl

The URL of a web page to be analysed. The API will fetch the page at this URL and take a screenshot.

image

A base64-encoded PNG or JPEG image.

The medium informs our algorithms how the analyzed image is presented to its viewers. When using the webPageUrl input type, this also affects how the screenshot is performed.

medium

Description

desktopWeb

Indicates that the input is a web page viewed in a desktop browser.

mobileWeb

Indicates that the input is a web page viewed in a mobile browser.

generic

The target medium doesn't fit any of the other available values.

📘

webPageUrl and media

Since taking web page screenshots is always done by simulating a web user, the only possible media for this input type are desktopWeb and mobileWeb.

The title is used for display in the EyeQuant web interface.

The removeCookieBanner Boolean parameter is used to control whether the screenshot service visiting a webPageUrl should attempt to remove the cookie banner on the visited page.

Examples

Taking a screenshot of example.com and simulating a web browser on a mobile device:

{
  "type": "webPageUrl",
  "content": "http://example.com",
  "medium": "mobileWeb",
  "title": "Example"
}

A PNG of a desktop web mockup:

{
  "type": "image",
  "content": "iVBORw0KGgo...rkJggg==",
  "medium": "desktopWeb",
  "title": "Example"
}