tickerbot_search_news
Search historical stock market news articles by ticker, date, and sentiment using SQL-like filters and full-text search.
Instructions
Search the news archive (back to 2015) with a SQL WHERE clause. Available on every plan. Columns on news_article include time_published, title, summary, source, source_domain, category, authors, topics, tickers (array), overall_sentiment_score, overall_sentiment_label, url. To filter to one ticker use 'NVDA' = ANY(tickers) or the auto-unnest alias tk = 'NVDA'. Example: q=tk='NVDA' AND time_published >= NOW() - INTERVAL '1 day'. Supports group_by + having for aggregation (e.g. count of articles per day).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | SQL WHERE on news_article. Optional when search or a scoping param is present. | |
| dir | No | Sort direction. | |
| limit | No | Page size. | |
| order | No | Sort column or SELECT alias. Default time_published (non-aggregate) or volume (aggregate). | |
| cursor | No | Opaque cursor. | |
| having | No | WHERE-style filter on aggregates. Requires group_by. | |
| search | No | Full-text search over title+summary (websearch grammar: "apple earnings", quoted phrases, OR, -negation). ANDs with q and the scoping params. | |
| select | No | Comma-separated columns to include. Defaults to a slim set. | |
| group_by | No | Comma-separated columns for aggregation. Alias a key with `AS` to name its JSON key; un-named expressions are named for you. |