Talkwalker Image API
The Talkwalker Image API can be used to detect features or entities in images.
Images can be provided either as a URL or as a file-upload (a POST
request containing multipart/form-data
).
- As URL
- As file-upload
curl -XGET 'https://api.talkwalker.com/api/v2/detect/images/<type>?access_token=<access_token>&image_url=<image_url>'
curl -XPOST 'https://api.talkwalker.com/api/v2/detect/images/<type>?access_token=<access_token>' -F 'image_file=@image.jpg'
image_url
is a URL-encoded URL (e.g. http%3A%2F%2Fwww.my-url.com%2Fimage.jpg
).
type
defines the mode of the detection, the options are logo
, object
, scene
.
The image_url
parameter can only be used with specific URLs.
For example URLs that start with a specific prefix (http://www.my-url.com
in the example).
Please contact Talkwalker to have your account configured.
{
"status_code": "0",
"status_message": "OK",
"request": "GET /api/v2/detect/images/logo?access_token=<access-token>&image_url=http%3A%2F%2Fwww.my-url.com%2Fimage.jpg",
"result_processing": {
"match": [
{
"top": 848,
"left": 678,
"right": 983,
"bottom": 1155,
"confidence": 0.9657765030860901,
"id": "starbucks"
},
{
"top": 880,
"left": 1520,
"right": 1826,
"bottom": 1209,
"confidence": 0.9366655349731445,
"id": "starbucks"
},
{
"top": 672,
"left": 239,
"right": 521,
"bottom": 916,
"confidence": 0.9254658222198486,
"id": "starbucks"
}
],
"height": 1365,
"width": 2048
}
}
By adding the parameter detect
, one or multiple Talkwalker image IDs can be
specified to restrict the detection to only these.
match
contains the list of matched logos, each with their Talkwalker image ID and a confidence
value from 0 to 1.
If the selected type is logo
, the position of the match is given by the top
, left
, right
and bottom
corners of the bounding box.
Additional logos, scenes and objects can be added on request.
Rate Limit
This endpoint is limited to 300 calls per minute.