Web Search API, gRPC: ImageSearchService.SearchByImage
gRPC request
rpc SearchByImage (ImageSearchByImageRequest) returns (ImageSearchByImageResponse)
ImageSearchByImageRequest
{
"site": "string",
"folder_id": "string",
// Includes only one of the fields `url`, `data`, `id`
"url": "string",
"data": "bytes",
"id": "string",
// end of the list of possible fields
"page": "int64",
"family_mode": "FamilyMode"
}
|
Field |
Description |
|
site |
string Restricts the search to the specific website. |
|
folder_id |
string ID of the folder. |
|
url |
string Required field. The image url to use for the search. Includes only one of the fields |
|
data |
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 |
int64 The number of a requested page with search results. |
|
family_mode |
enum FamilyMode Rule for filtering search results and determines whether any documents should be excluded.
|
ImageSearchByImageResponse
{
"images": [
{
"url": "string",
"format": "ImageFormat",
"width": "int64",
"height": "int64",
"passage": "string",
"host": "string",
"page_title": "string",
"page_url": "string"
}
],
"page": "int64",
"max_page": "int64",
"id": "string"
}
|
Field |
Description |
|
images[] |
The images found. |
|
page |
int64 The number of the page with search results. |
|
max_page |
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 |
int64 Image width. |
|
height |
int64 Image height. |
|
passage |
string Text passage. |
|
host |
string Document host. |
|
page_title |
string Document title. |
|
page_url |
string Document URL. |