Skip to main content

How to retrieve Talkwalker object code in one of your pictures

List of object codes

The full list is available here.

Usage

Endpoint

[GET | POST] https://api.talkwalker.com/api/v2/detect/images/object
  • GET method used with parameter image_url.
  • POST method used with parameter image_file.

Parameters

The parameter detect is not taken into consideration and all results are returned in the API response.

NameDescriptionMandatory
access_tokenAccess_token provided by Talkwalker to use APIs. It is the same as the search API.Yes
image_urlURL where to download the image.No
image_fileFilename of the image to be past as multipart/form-dataNo
Important

At least one of these 2 parameters is required: image_url or image_file.

Sample by URL

In this sample, we detect the objects present in this picture:

a-411.jpg

URL: https://pouringmyartout.files.wordpress.com/2013/03/a-411.jpg

Request
curl -X GET 'https://api.talkwalker.com/api/v2/detect/images/object?access_token=<access_token>&image_url=https://pouringmyartout.files.wordpress.com/2013/03/a-411.jpg'
Result
{
"status_code": "0",
"status_message": "OK",
"request": "GET /api/v2/detect/images/object?access_token=***&image_url=https://pouringmyartout.files.wordpress.com/2013/03/a-411.jpg",
"result_processing": {
"match": [
{
"top": 0,
"left": 0,
"right": 0,
"bottom": 0,
"confidence": 0.9999861717224121,
"id": "object-cow"
}
],
"height": 287,
"width": 432
},
"request_id": "#qz64cvdq77vi#"
}

Sample by file upload

In this sample, we detect the objects present in this picture:

screen-0.jpg

Request
curl -X POST 'https://api.talkwalker.com/api/v2/detect/images/object?access_token=<access_token>' -F 'image_file=@"/C:/Users/p.gouttebel/OneDrive/Pictures/screen-0.jpg"'
Result
{
"status_code": "0",
"status_message": "OK",
"request": "POST /api/v2/detect/images/object?access_token=***",
"result_processing": {
"match": [
{
"top": 0,
"left": 0,
"right": 0,
"bottom": 0,
"confidence": 0.9999995231628418,
"id": "object-airplane"
},
{
"top": 0,
"left": 0,
"right": 0,
"bottom": 0,
"confidence": 0.999813973903656,
"id": "object-car"
}
],
"height": 400,
"width": 940
},
"request_id": "#qz5tsifaea3p#"
}