Skip to main content

How to retrieve subset of results

Command
curl -L -X GET 'https://api.talkwalker.com/api/v1/search/p/<project_id>/results?topic=<topic_id>&access_token=<access_token>'
Important
  • When no special filters are applied, a single search request will return results from all media types and all languages sorted by engagement by default.
  • By default, it returns only the 10 first results.
  • It is possible to select multiple topics by adding other topic parameters. Details are available here.

The field matched_profile give you the list of topic and filters the document match. If you don't provide any filter, then it will show only topics which match.

Response
{
"status_code": "0",
"status_message": "OK",
"request": "GET /api/v1/search/p/***/results?topic=***&access_token=***",
"pagination": {
"next": "GET /api/v1/search/p/***/results?topic=***&access_token=***&offset=10",
"total": 502929
},
"result_content": {
"data": [
{
"data": {
"url": "http://www.youtube.com/watch?v=TiwtwGIu94M",
"matched_profile": ["kpnutesu_5imm9mo4lbsj"],
"indexed": 1645081481635,
"search_indexed": 1645081594193,
"published": 1645080793000,
"title": "RESTORATION TESLA ELECTRIC CAR FROM JUNKYARD",
"content": "RESTORATION TESLA ELECTRIC CAR FROM JUNKYARD | CAR MECHANIC SIMULATOR #carmechanicsimulator #technogamerz Subscribe to our Second YouTube Channel: https://www.youtube.com/c/UjjwalGamer Share, Support, Subscribe!!! Subscribe: http://bit.ly/technogamerz Discord : https://bit.ly/ujjwaldiscord Youtube: https://www.youtube.com/c/TechnoGamerzOfficial Twitter: https://www.twitter.com/ujjwalgamer Facebook: https://www.facebook.com/technogamerz Facebook Myself: https://www.facebook.com/ujjwalgamer Instagram: https://instagram.com/ujjwalgamer Google Plus: https://plus.google.com/+TechnoGamerzOfficial Website: https://technogamerz.in/ Merchandise: https://shop.technogamerz.in/ Business Email : technogamerzofficial@gmail.com About : Techno Gamerz is a YouTube Channel, where you will find gaming videos in Hindi, I hope this video was Useful and you liked it, if you did press the thumbs up button.",
"title_snippet": "RESTORATION <b>TESLA</b> <b>ELECTRIC</b> <b>CAR</b> FROM JUNKYARD",
"content_snippet": "RESTORATION <b>TESLA</b> <b>ELECTRIC</b> <b>CAR</b> FROM JUNKYARD | CAR MECHANIC SIMULATOR #carmechanicsimulator #technogamerz Subscribe to our Second YouTube Channel: https://www.youtube.com/c/UjjwalGamer...",
"root_url": "http://www.youtube.com/watch?v=TiwtwGIu94M",
"domain_url": "http://youtube.com/",
"host_url": "http://www.youtube.com/",
"parent_url": "http://www.youtube.com/watch?v=TiwtwGIu94M",
"lang": "en",
"porn_level": 0,
"fluency_level": 18,
"DEPRECATED_spam_level": 0,
"sentiment": 5,
"source_type": ["SOCIALMEDIA", "SOCIALMEDIA_YOUTUBE"],
"post_type": ["VIDEO"],
"noise_level": 100,
"noise_category": "free_content",
"tokens_title": [
"RESTORATION TESLA ELECTRIC",
"RESTORATION TESLA ELECTRIC",
"RESTORATION TESLA",
"RESTORATION TESLA",
"FROM JUNKYARD",
"FROM JUNKYARD",
"TESLA ELECTRIC",
"TESLA ELECTRIC",
"TESLA",
"TESLA"
],
"tokens_content": [
"RESTORATION TESLA ELECTRIC",
"SIMULATOR #carmechanicsimulator #technogamerz",
"Second YouTube Channel",
"#carmechanicsimulator #technogamerz Subscribe",
"CAR MECHANIC SIMULATOR",
"MECHANIC SIMULATOR #carmechanicsimulator",
"YouTube Channel",
"YouTube Channel",
"TechnoGamerzOfficial Website",
"#technogamerz Subscribe"
],
"tokens_hashtag": ["#carmechanicsimulator", "#technogamerz"],
"images": [
{
"url": "https://i.ytimg.com/vi/TiwtwGIu94M/hqdefault.jpg"
}
],
"tags_internal": ["containsVideo", "hasImage"],
"tags_customer": ["AI Tags/Bot"],
"article_extended_attributes": {
"youtube_views": 7864407,
"youtube_likes": 461155,
"num_comments": 21998
},
"source_extended_attributes": {
"alexa_pageviews": 78739996672,
"alexa_unique_visitors": 8827354112,
"semrush_pageviews": 80056916713,
"semrush_unique_visitors": 6392268092
},
"extra_article_attributes": {
"world_data": {
"continent": "North America",
"country": "United States",
"region": "Washington, D.C.",
"city": "Washington, D.C.",
"longitude": -77.0086669921875,
"latitude": 38.89984130859375,
"country_code": "us",
"resolution": "COUNTRY"
}
},
"extra_author_attributes": {
"id": "yt:UCX8pnu3DYUnx8qy8V_c6oHg",
"name": "Techno Gamerz",
"gender": "MALE",
"image_url": "https://yt3.ggpht.com/ytc/AKedOLRn4fa-nUeQhrUcZWg3IH_N-8tAIfCKU7V4mrHRMQ=s88-c-k-c0x00ffffff-no-rj-mo",
"url": "http://www.youtube.com/channel/UCX8pnu3DYUnx8qy8V_c6oHg"
},
"extra_source_attributes": {
"world_data": {
"continent": "North America",
"country": "United States",
"region": "Washington, D.C.",
"city": "Washington, D.C.",
"longitude": -77.0086669921875,
"latitude": 38.89984130859375,
"country_code": "us",
"resolution": "COUNTRY"
},
"id": "yt:UCX8pnu3DYUnx8qy8V_c6oHg",
"name": "www.youtube.com"
},
"official_response_time": 3157000,
"user_response_time": 589000,
"engagement": 483153,
"reach": 7864407,
"entity_url": [
{
"url": "https://plus.google.com/"
},
{
"url": "https://instagram.com/ujjwalgamer"
},
{
"url": "https://www.facebook.com/ujjwalgamer"
},
{
"url": "https://www.facebook.com/technogamerz"
},
{
"url": "https://shop.technogamerz.in/"
},
{
"url": "http://bit.ly/technogamerz"
},
{
"url": "https://bit.ly/ujjwaldiscord"
},
{
"url": "https://www.youtube.com/c/UjjwalGamer"
},
{
"url": "https://www.youtube.com/c/TechnoGamerzOfficial"
},
{
"url": "https://www.twitter.com/ujjwalgamer"
},
{
"url": "https://technogamerz.in/"
}
],
"word_count": 80
}
},
{
"data": {
"url": "https://www.foxbusiness.com/politics/elon-musk-calls-for-u-s-increase-in-oil-gas-production-to-combat-russia-despite-negative-effect-on-tesla",
"matched_profile": ["kpnutesu_5imm9mo4lbsj"],
"indexed": 1646444879193,
"search_indexed": 1646444982384,
"published": 1646443270000,
"title": "Elon Musk calls for increase in US oil, gas production to combat Russia despite negative effect on Tesla",
"content": "Real 'oil shock' is coming: Economics professor\n\nUniversity of Louisville economics professor Alexei Izyumov predicts the oil market will bring inflation and interest rates even higher.\n\n\"Hate to say it, but we need to i...",
"title_snippet": "...Russia despite negative effect on <b>Tesla</b>",
"content_snippet": "\n\nMusk’s initial Twitter post was retweeted almost 20,000 times within 30 minutes of being posted.\n\n&quot;Founder of <b>electric</b> <b>car</b> company says drill baby drill!&quot; AEI Senior Fellow Marc Thiessen responded.\n\n&quot;Wisdom from man whose company would not be...",
"root_url": "https://www.foxbusiness.com/",
"domain_url": "http://foxbusiness.com/",
"host_url": "http://www.foxbusiness.com/",
"parent_url": "https://www.foxbusiness.com/politics/elon-musk-calls-for-u-s-increase-in-oil-gas-production-to-combat-russia-despite-negative-effect-on-tesla",
"lang": "en",
"porn_level": 0,
"fluency_level": 100,
"DEPRECATED_spam_level": 0,
"sentiment": -5,
"source_type": ["ONLINENEWS", "ONLINENEWS_TVRADIO"],
"post_type": ["TEXT"],
"tokens_title": [
"Elon Musk calls",
"Elon Musk",
"Elon Musk",
"gas production",
"despite negative",
"combat Russia",
"for increase",
"Musk calls",
"Musk",
"Musk"
],
"tokens_content": [
"President Vladimir Putin",
"Republican Congresswoman Lauren",
"New York Times",
"Senior Political Analyst",
"Senior Fellow Marc",
"Russian President Vladimir",
"Analyst Brit Hume",
"Political Analyst Brit",
"Fox News Senior",
"Congresswoman Lauren Boebert"
],
"images": [
{
"url": "https://a57.foxnews.com/static.foxbusiness.com/foxbusiness.com/content/uploads/2021/11/931/523/musk.jpg"
},
{
"url": "https://cf-images.us-east-1.prod.boltdns.net/v1/static/854081161001/514cac7d-c5d9-41a9-84c2-37dcd0fbeca1/fa735c00-e63e-4b07-9782-36b634cbdfc5/1280x720/match/image.jpg"
},
{
"url": "https://a57.foxnews.com/static.foxbusiness.com/foxbusiness.com/content/uploads/2022/03/931/523/Russia-Ukraine-invasion-2.jpg"
}
],
"cluster_id": "https://www.aninews.in/news/world/us/musk-calls-for-immediate-boost-in-oil-and-gas-production-to-replace-russian-output20220305065551",
"tags_internal": ["containsImage", "hasImage"],
"article_extended_attributes": {
"facebook_shares": 22062,
"facebook_likes": 164743,
"twitter_shares": 7663,
"num_comments": 16434
},
"source_extended_attributes": {
"alexa_pageviews": 10700000,
"alexa_unique_visitors": 7133333
},
"extra_author_attributes": {
"id": "ex:www.foxbusiness.com-98666935",
"name": "andrew mark miller",
"gender": "MALE"
},
"extra_source_attributes": {
"world_data": {
"continent": "North America",
"country": "United States",
"region": "Washington, D.C.",
"city": "Washington, D.C.",
"longitude": -77.0086669921875,
"latitude": 38.89984130859375,
"country_code": "us",
"resolution": "COUNTRY"
},
"id": "ex:www.foxbusiness.com",
"name": "www.foxbusiness.com"
},
"engagement": 210902,
"reach": 7133333,
"entity_url": [
{
"url": "https://www.foxbusiness.com/politics/ukraine-russia-congress-republicans-democrats-oil-russia-biden"
},
{
"url": "http://video.foxbusiness.com/v/6299647183001"
},
{
"url": "https://www.foxnews.com/politics/blinken-strategic-interest-russia-energy-sanctions",
"resolved_url": "https://www.foxnews.com/politics/blinken-strategic-interest-russia-energy-sanctions"
},
{
"url": "https://www.foxnews.com/us/psaki-pressed-on-whether-us-financing-putins-war-by-buying-russian-oil"
},
{
"url": "https://a57.foxnews.com/static.foxbusiness.com/foxbusiness.com/content/uploads/2021/11/931/523/musk.jpg?ve=1&amp;tl=1"
},
{
"url": "https://www.foxbusiness.com/economy/gas-prices-ukraine-russia"
},
{
"url": "https://www.foxbusiness.com/politics/republicans-energy-experts-keystone-xl-cancelled-biden-lessen-need-russian-oil"
}
],
"word_count": 309,
"trending_score": 0
}
}
/// TRUNCATED
]
},
"request_id": "#roxr13ojkzra#"
}

How to add more results in the response​

The parameter hpp (hits per page) give the maximum number of results that will be part of the response. It cannot exceed 500.

Command
curl -L -X GET 'https://api.talkwalker.com/api/v1/search/p/<project_id>/results?hpp=500&topic=<topic_id>&access_token=<access_token>'

How to navigate to the next page of results.​

The parameter offset give number of results to skip (for paging).

The maximum offset value is influenced by the hits per page. hpp + offset can’t be greater than 10.000.

Command
curl -L -X GET 'https://api.talkwalker.com/api/v1/search/p/<project_id>/results?offset=500&hpp=500&topic=<topic_id>&access_token=<access_token>'

How to sort by publication date​

The parameter sort_by indicates on which fields the API will sort the results. For the publication date, use the value published.

The sorting order is given by the parameter sort_order. By default, the sort is descending.

Command
curl -L -X GET 'https://api.talkwalker.com/api/v1/search/p/<project_id>/results?sort_by=published&sort_order=desc&topic=<topic_id>&access_token=<access_token>'

How to add an additional query rule in addition a topic or custom filter​

You want to be more accurate and export only a subset of data from your topic, by example only negative mentions. You can use the parameter q to add search query. Query syntax details are available here.

Here the sample to export only negative mentions from a topic:

Command
curl -L -X GET 'https://api.talkwalker.com/api/v1/search/p/<project_id>/results?q=sentiment:NEGATIVE&topic=<topic_id>&access_token=<access_token>'