As in the question, I am looking to date bound the search API to return results from a particular range, and days doesn’t have that level of control over my workflow.
Would really appreciate help on this.
As in the question, I am looking to date bound the search API to return results from a particular range, and days doesn’t have that level of control over my workflow.
Would really appreciate help on this.
Hi,
Thank you for reaching out! That does sound like a very useful feature. However, currently, our API does not support date-bound filtering for the topic=“news” queries. You can filter by “days,” but there’s no direct way to specify a custom date range at the moment.
We appreciate your feedback and will consider this for future updates!
Best,
May
+1 to this question. I am building an AI financial agent and it would be very helpful to date-bound the filtering at the API level, especially for things like sentiment analysis.
Concrete example: I have a backtester that calls the API repeatedly over a date range (e.g. Jan 2023 and March 2023). I would like to get the news sentiment between that date range only for my AI agent to do sentiment anlaysis.
This feature would be huge.
Hey Virat, been following your work on Twitter.
One hack that I found is passing your Datetime in the search query and making the search_depth=“general”, the results were pretty promising.
search_query = f"{index_name} {date_str} India financial news"
domain_results = tavily_client.search(
search_query,
topic="general",
search_depth="advanced",
max_results=3,
include_answer=True,
include_raw_content=True,
include_domains=[domain]
)