Overview

A Screenshot is what Get Screen adds to each phone’s result, and what an input endpoint returns as screen when you pass observe. Which fields are present depends on the request: view, ocr, detect, annotate, maxSide, region, compact and since. Every coordinate is in screen pixels, whatever the size of the image.

Properties

string
Names this frame: two frames that look the same have the same screenHash. The status bar (clock, battery) is not counted. Pass it as since later to ask whether the screen changed.
boolean
Present when since was given: false when the screen is the same as then (the result then has nothing but changed and screenHash), true otherwise.
string
A short link to the screenshot (https://api.phones.inc/v1/s/...). Fetch it with a plain GET, following the redirect, to get the image bytes. No Authorization header is needed. The link works for five minutes. Not present with view: "text".
string
png or jpeg.
number
Width of the phone’s screen in pixels: the space every coordinate in the answer is in.
number
Height of the phone’s screen in pixels. width and height equal the phone’s screen size, and the image’s size unless it was scaled or cropped.
number
Present when the image is scaled (maxSide) or cropped (region): image pixels per screen pixel. A point at (ix, iy) in the image is at (crop.x + ix / scale, crop.y + iy / scale) on the screen.
number
Present with scale: the width of the image in pixels.
number
Present with scale: the height of the image in pixels.
object
Present with region: the part of the screen the image shows, in screen pixels.
object[]
Present when ocr is true. One entry per line of text found, top to bottom. With compact, each entry is a row [id, "text", cx, cy, w, h] instead.
object[]
Present when detect is true. One entry per interface element found. With compact, each entry is a row [id, "label", cx, cy, w, h] instead.
string
Present when annotate is true. A link to the same screenshot with every box drawn and numbered, in the same format. It works like imageUrl, which still points to the clean screenshot.