Skip to main content

Query Parameters

The /news endpoint supports multiple filtering options to help you get exactly the news you need.

Basic Filters

limit (integer, optional)
Number of articles to return per request
  • Range: 1-100
  • Default: 10
  • Example: ?limit=50
minImportance (integer, optional)
Minimum importance score for articles
  • Range: 1-10
  • Default: 1 (all articles)
  • Example: ?minImportance=7 (high-impact news only)

Search and Symbols

q (string, optional)
Search query to filter articles by content
  • Format: Free text search
  • Example: ?q=tesla earnings
  • Behavior: Searches title and content
symbol (string, optional)
Filter articles related to specific stock symbol

Date Range

Filter articles within a specific time window using ISO 8601 timestamps: startDate (string, optional)
Start of the date range (inclusive)
  • Format: ISO 8601 (UTC)
  • Example: ?startDate=2024-01-01T00:00:00.000Z
endDate (string, optional)
End of the date range (inclusive)
  • Format: ISO 8601 (UTC)
  • Example: ?endDate=2024-01-31T23:59:59.999Z
If both startDate and endDate are provided, startDate must be less than or equal to endDate.
  • Format: Stock symbol (e.g., โ€œAAPLโ€, โ€œTSLAโ€)
  • Example: ?symbol=AAPL
  • Behavior: Returns articles where the symbol appears in the symbols array

Pagination

cursor (string, optional)
Pagination cursor for retrieving next page
  • Source: Use nextCursor from previous response
  • Example: ?cursor=67850d7b0123456789abcde0
sinceId (string, optional)
Retrieve articles created after the specified article ID
  • Format: Article ID (_id field)
  • Example: ?sinceId=67850d7b0123456789abcdef
  • Use case: Real-time polling for new articles

Filtering Examples

High-Impact News Only

Get only breaking news and major market events:

Symbol-Specific News

Track news for specific stocks:

Search Query Filtering

Date Range Filtering

Retrieve January articles only:
Find articles about specific topics:

Combining Multiple Filters

Get high-impact Apple news with search query:

Advanced Filtering Patterns

Portfolio Tracking

Monitor news for multiple symbols:

Real-Time Polling

Poll for new articles since last check:

Importance-Based Filtering

Create different news feeds based on importance:

Filter Validation

Always validate filter parameters to avoid API errors:

Best Practices

Efficient Filtering

  1. Use appropriate limits: Donโ€™t request more data than you need
  2. Filter server-side: Use API filters instead of client-side filtering
  3. Combine filters: Use multiple parameters to narrow results
  4. Cache results: Store filtered results to reduce API calls

Rate Limit Optimization

Error Handling

Filter Combinations Reference