Skip to main content

How to retrieve IDs to use in the Search API

Retrieve the project ID

Command
curl -L -X GET 'https://api.talkwalker.com/api/v1/search/info?access_token=<access_token>'

It will return all projects accessible to your API subscription.

Response
{
"status_code": "0",
"status_message": "OK",
"request": "GET /api/v1/search/info?access_token=***",
"result_accinfo": {
"projects": [
{
"id": "a2ce1ade-ee55667844-868c-fa284ba9a23",
"name": "Pascal's Project",
"account_id": "fe204ebc-111254457-a251-cea374ddf3d1",
"account_name": "Pascal Gouttebel",
"capabilities": {
"import_type": ["TOPIC"]
}
},
{
"id": "13bad750-7865-4089-a109-48b9855745516f",
"name": "Pascal's Project 2",
"account_id": "fe204ebc-111254457-a251-cea374ddf3d1",
"account_name": "Pascal Gouttebel",
"capabilities": {
"import_type": ["TOPIC"]
}
}
]
},
"request_id": "#roxnmzh85h5f#"
}

Retrieve topics or filters

Command
curl -L -X GET 'https://api.talkwalker.com/api/v2/talkwalker/p/<prokect_id>/resources?type=search,filter&access_token=<access_token>'

Putting the 2 values search and filter in the type parameter will return both within one call.

Response
{
"status_code": "0",
"status_message": "OK",
"request": "GET /api/v2/talkwalker/p/a2ce1ade-a513-413f-868c-fafc25ba9a23/resources?type=search,filter&access_token***",
"result_resources": {
"projects": [
{
"id": "a2ce1ade-a513-413f-868c-fafc25ba9a23",
"title": "Pascal's Project",
"topics": [
{
"id": "default",
"title": "",
"nodes": [
{
"id": "kpnutesu_123456",
"title": " 1topic",
"description": ""
},
{
"id": "kpnzh6u5_234567",
"title": "topic 2",
"description": ""
}
]
}
],
"filters": [
{
"id": "default_filter",
"title": "",
"nodes": [
{
"id": "kszspjer_545345mic",
"title": "test filter",
"description": ""
}
],
"description": ""
}
]
}
]
},
"request_id": "#roxohhftmp8l#"
}

Full details regarding the API are available here.