Skip to main content

Search API Overview & Example

How it works

The Talkwalker Search API allows you to retrieve up to 500 sorted results for a given timeframe within the last 30 days. In addition, a histogram of the number of results can also be returned. You can sort the results by publication time, indexing time, engagement or other metrics. A single search query can support up to 50 operands. To create complex queries, operands may be combined using Boolean operators.

A few words about the results

Search results can be sorted by engagement, time or other metrics and be restricted to specific attribute value ranges (for example only return results published in a certain timerange). When no special filters are applied, a single search request will return results from all media types and all languages over the past 30 days sorted by engagement by default. You don’t need to execute one search request for each language and media type separately. To get a smaller set of results, you can either get only the highest ranked results or get a random sample set.

A brief example

The Talkwalker API search results endpoint (\https://api.talkwalker.com/api/v1/search/results) is used to search on the Talkwalker API. (For testing purpose the access_token demo can be used. Setting the variable pretty=true will return formatted results)

Command
curl -XGET 'https://api.talkwalker.com/api/v1/search/results?access_token=demo&q=cats&pretty=true'
Response
{
"status_code" : "0",
"status_message" : "OK",
"request" : "GET /api/v1/search/results?access_token=demo&q=cats&pretty=true",
"pagination" : {
"next" : "GET /api/v1/search/results?access_token=demo&q=cats&pretty=true&offset=10",
"total" : 298138
},
"result_content" : {
"data" : [ {
"data" : {
"url" : "http://example.blogspot.com/cats",
"indexed" : 1417999367498,
"search_indexed" : 1417999504832,
"published" : 1417999319393,
"title" : "Something cats",
"content" : "Welcome to my colorful little island (...)",
"title_snippet" : "Something with cats",
"root_url" : "http://example.blogspot.com/",
"domain_url" : "http://blogspot.com/",
"host_url" : "http://example.blogspot.com/",
"parent_url" : "http://example.blogspot.com/cats",
"lang" : "en",
"porn_level" : 0,
"fluency_level" : 90,
"spam_level" : 20,
"sentiment" : 5,
"source_type" : [ "BLOG", "BLOG_OTHER" ],
"post_type" : [ "TEXT" ],
"tokens_title" : [ "Something", "Something", "Cats", "Cats" ],
"tokens_content" : [ "Bead Hoarder Blog", "Bead Hoarder Blog"],
"tokens_mention" : [ "@yahoo" ],
"tags_internal" : [ "isQuestion" ],
"article_extended_attributes" : {
"num_comments" : 3
},
"source_extended_attributes" : {
"alexa_pageviews" : 0
},
"extra_article_attributes" : {
"world_data" : { }
},
"extra_author_attributes" : {
"world_data" : { },
"id" : "ex:example.blogspot.com-698904645",
"name" : "view my complete profile",
"gender" : "MALE"
},
"extra_source_attributes" : {
"world_data" : {
"continent" : "North America",
"country" : "United States",
"region" : "District of Columbia",
"city" : "Washington, D.C.",
"longitude" : -77.0094185808,
"latitude" : 38.8995493765,
"country_code" : "us"
},
"id" : "ex:example.blogspot.com",
"name" : "http://example.blogspot.com/"
},
"engagement" : 3,
"reach" : 0
}
}, {
"data" : {
"url" : "http://example.wordpress.com/2014/12/06/high-rez-snobbery-715-winter-trend-ice/",
... // truncated
note

All responses are UTF-8

More on the Talkwalker Search Results API