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
The conditions parameter consists of a comma-separated list of conditions. Each condition consists three or four elements separated by tildes ~
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.
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
Below are several complete examples demonstraing the usage of the condition and logic parameters for screening securities.
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
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.