Search on a tag by API
Retrieve existing tags and IDs to query
As in the Talkwalker platform, it is possible to filter documents in SEARCH API by tags with the keyword tag
:
Important
By API, we query with tag ID, not the label.
note
Tags are applied on project data, not on global data.
You can use the following endpoint to retrieve the tags created on your project:
curl -X GET 'https://api.talkwalker.com/api/v2/talkwalker/p/<project_id>/tags?access_token=<access_token>'
In our sample, we want to query documents on the tag "Pascal":
Retrieve documents based on tags
The search on a specific customer tag will work only on project data.
You can add in the query parameter the following keyword: tag:<tag_id>
curl -X GET 'https://api.talkwalker.com/api/v1/search/p/<project_id>/results?access_token=<access_token>&q=tag:<tag_id>'
If we keep our sample for the tag "Pascal", we can use the following query: