Advanced Query Building

When working with the Finlight.me API, you have the power to retrieve exactly the data you need through advanced query building techniques. This guide walks you through complex filtering, sorting, and pagination methods to help you optimize your data retrieval process.

Quickly access the API and test your queries using our Dashboard - API Tester.


Query Filtering

The query parameter enables flexible keyword-based logic and field-level precision. You can now target specific fields like ticker, exchange, isin, source, openfigi and more.

Basic Keyword Usage

Single keyword:

query=Nvidia stock

Exact phrase: Wrap phrases in double quotes to search for exact matches.

query="Elon Musk"

Inclusion / Exclusion with Operators

Force inclusion (+) and exclusion (-):

Use + to require/inclusion, and - to exclude terms or field-specific values.

query=stock +market -google

This will return articles that contain "stock" and "market", but exclude any that mention "google".


Field-Level Filtering

Note: This is a powerful new feature that allows you to filter results based on specific fields directly within the query parameter.

You can now query specific fields directly using the field:value syntax also on the query parameter. This allows for more precise and complex queries, enabling you to filter results based on specific attributes like ticker symbols, exchanges, ISINs, sources, and more.

Supported Fields

  • ticker
  • isin
  • openfigi
  • exchange
    • All available exchanges values: HONGKONG_STOCK_EXCHANGE, TORONTO_STOCK_EXCHANGE, EURONEXT_STOCK_EXCHANGE, TOKYO_STOCK_EXCHANGE, FRANKFURT_STOCK_EXCHANGE, SHANGHAI_STOCK_EXCHANGE, NYSE, NATIONAL_STOCK_EXCHANGE, SHENZHEN_STOCK_EXCHANGE, LONDON_STOCK_EXCHANGE, NYSE_AMERICAN, KOREA_STOCK_EXCHANGE, NASDAQ
  • source

Field Filter Examples

Try it out in the API Tester to see how it works and create your own complex queries easily.

Filter by exact source:

query=source:www.some-source.de

Exclude a source:

query=-source:www.some-source.de

Require specific ticker and exclude some source:

query=ticker:AAPL -source:www.some-source.de

Find results where content mentions "earnings" and the exchange is NASDAQ:

query=content:earnings exchange:nasdaq

Combine field filtering with general search:

query="quarterly report" source:www.some-source.com -crypto

Boolean Operators

Note: Words are by default AND joined, you dont need to use AND explicitly unless you want to combine with OR or NOT.

AND / OR / NOT logic is fully supported:

query=stock AND google
query=amazon OR google
query=market AND NOT bitcoin

Use parentheses for grouping: Combine logical expressions for advanced filtering.

query=("Elon Musk") AND (twitter OR tesla)

💡 Tips for Power Users

  • Field filters support + and - for required and excluded values.
  • You can combine multiple fields and keywords for highly targeted queries.
  • Boolean operators like AND, OR, and NOT are case-insensitive.
  • Parentheses () help control precedence in complex queries.
  • Use double quotes " around multi-word phrases to avoid partial matches.

Conclusion - Combine Everything

Example: Want news about Tesla (ticker:TSLA), from trusted sources, not about crypto?

query=+ticker:TSLA -crypto AND (+source:www.bloomberg.com OR +source:www.reuters.com)

Example: Want news about Tesla (ticker:TSLA) or Apple (ticker:AAPL) from Bloomberg?

query=source:www.bloomberg.com AND ticker:TSLA OR source:www.bloomberg.com AND ticker:APPL

Try it out in the API Tester to see how it works and create your own complex queries easily.


Need Help?

If you ever feel stuck, have a question, or see room for improvement, don’t hesitate to reach out. We look forward to hearing from you and supporting your success with the Finlight.me API.