Web Search API, REST: ImageSearch.SearchByImage
HTTP request
POST https://searchapi.api.cloud.yandex.net/v2/image/search_by_image
Body parameters
{
"site": "string",
"folderId": "string",
// Includes only one of the fields `url`, `data`, `id`
"url": "string",
"data": "string",
"id": "string",
// end of the list of possible fields
"page": "string",
"familyMode": "string"
}
|
Field |
Description |
|
site |
string Restricts the search to the specific website. |
|
folderId |
string ID of the folder. |
|
url |
string Required field. The image url to use for the search. Includes only one of the fields |
|
data |
string (bytes) Required field. The image data to use for the search. Includes only one of the fields |
|
id |
string Required field. CBIR ID of the image to use for the search. Includes only one of the fields |
|
page |
string (int64) The number of a requested page with search results. |
|
familyMode |
enum (FamilyMode) Rule for filtering search results and determines whether any documents should be excluded.
|
Response
HTTP Code: 200 - OK
{
"images": [
{
"url": "string",
"format": "string",
"width": "string",
"height": "string",
"passage": "string",
"host": "string",
"pageTitle": "string",
"pageUrl": "string"
}
],
"page": "string",
"maxPage": "string",
"id": "string"
}
|
Field |
Description |
|
images[] |
The images found. |
|
page |
string (int64) The number of the page with search results. |
|
maxPage |
string (int64) |
|
id |
string CBIR ID of the image used for the search. |
ImageInfo
|
Field |
Description |
|
url |
string Image URL. |
|
format |
enum (ImageFormat) Image format.
|
|
width |
string (int64) Image width. |
|
height |
string (int64) Image height. |
|
passage |
string Text passage. |
|
host |
string Document host. |
|
pageTitle |
string Document title. |
|
pageUrl |
string Document URL. |