Screener Documentation

Screener Documentation

Using the Intrinio Screener API entails constructing conditions and optional logic to arrive at your desired list of securities. The usage of the conditions and logic parameters will allow you to construct complex screening queries.

Screener API Endpoint: https://api.intrinio.com/securities/search

Conditions

The conditions parameter consists of a comma-separated list of conditions. Each condition consists three or four elements separated by tildes ~

  1. A data tag
  2. An operator
    • Equal to: eq
    • Greater than: gt
    • Greater than or equal to: gte
    • Less than: lt
    • Less than or equal to: lte
    • Contains text: contains
  3. A value
  4. A label (optional)

Examples of Valid Conditions

  • pricetoearnings~gt~15
  • pricetoearnings~gte~10,open_price~lte~10.50
  • long_description~contains~aero,state~eq~Colorado

Examples of Invalid Conditions

  • pricetoearnings,gt,15 - condition elements must be separated by ~
  • pricetoearnings~gte~10&open_price~lte~10.50 - conditions must be separated by ,
  • pricetoearnings~>~15 - invalid operator used

Logic

By default, every condition is applied to the dataset with an AND operator. For example, if you have three conditions , volume > 1000 , pricetoearnings < 10 , percent_change > 0.1 , the corresponding query will be volume > 1000 AND pricetoearnings < 10 AND percent_change > 0.1

However, you can use the logic parameter to specify how the conditions are applied. For example, you might want to do volume > 1000 AND (pricetoearnings < 10 OR percent_change > 0.1) , which produces a different result. This is possible using the logic parameter.

To use the logic parameter, first make sure each condition has a label field that is made up of characters a-z, A-Z, 0-9, or _. Valid labels look like high_volume , interesting_pe , or mover . Invalid labels look like Stuff I like , watchthis! , or @!01@(!)

Here is an example of a labeled condition: pricetoearnings~gt~15~high_pe , where high_pe is the label to be used in the logic.

Acceptable Logic Components

  • Labels of conditions
  • Operators , AND , OR NOT (mind proper spacing and capitalization)
  • Parentheses groups ((condition1 OR condition2) AND condition3)

Examples of Valid Logic

  • high_volume AND (interesting_pe OR mover)
  • high_profits AND (tech OR healthcare) AND low_debt_ratio
  • NOT (california_hq OR high_debt_service) AND high_dividend_yield

Examples of Invalid Logic

  • high_volume AND(interesting_pe OR mover) - needs proper space after AND
  • (high_profits AND (tech OR healthcare) AND low_debt_ratio - unbalanced parantheses groups
  • NOT (california_hq OR high_debt_service) AND high_dividend_yield - too many spaces between labels and operators
  • pe * 2 > ebitda - math and comparisons not supported yet

NOTE: Make sure to properly encode URL parameters before making the request, such as replacing spaces with %20 and parenthesis with %28 , %29 logic=high_volume%20AND%20%28interesting_pe%20OR%20mover%29

Complete Examples

Below are several complete examples demonstraing the usage of the condition and logic parameters for screening securities.

Example 1: Securities with low PE and high ROI

Goal:
Return securities with a PE ratio <= 5 and a return-on-equity >= to 20%.
Conditions:
pricetoearnings~lte~5,roe~gte~0.2
API Endpoint:
https://api.intrinio.com/securities/search?conditions=pricetoearnings~lte~5,roe~gte~0.2

Example 2: Securities with more than $10b cash or $100b market cap

Goal:
Return securities with cash >= 10,000,000,000 or market cap >= 100,000,000,000
Conditions:
cashandequivalents~gte~10000000000~cash,marketcap~gte~100000000000~mktcap
Logic:
cash OR mktcap
API Endpoint
https://api.intrinio.com/securities/search?conditions=cashandequivalents~gte~10000000000~cash,marketcap~gte~100000000000~mktcap&logic=cash%20OR%20mktcap

If you need additional help, please visit our Help Center.