Quick Start
Run your first scan against the whole U.S. market in about two minutes.
Every scan takes two calls. First you get a scan payload, the JSON that describes the screen. Then you run it. You don't write the payload by hand: describe the screen in English and the API writes it, or export a scan you already built in the scanr.ai scanner.
1. Get a token
- Pick an API plan on API pricing. Every plan includes the full scanner.
- Create a token at Account → API Tokens with the
readscope, and copy it. It is shown once. - Put it in an environment variable, which every example in these docs reads:
Check it works:
A JSON body with "status": {"market": "open" | "closed" | "extended-hours", ...} means you're in.
The cURL examples below use jq to move JSON between calls.
2. Get a scan payload
A scan payload says which stocks are eligible and which filters they must pass. There are two ways to get one, and both produce the same JSON.
Describe it in English
POST /api/v2/scan/natural turns a sentence into a payload. It returns the payload and an explanation of each filter. It does not run the scan.
Check reasoning.summary before you run anything: it is the quickest way to catch a misread. Generation takes a few seconds and spends AI credits; running the payload afterwards doesn't. Natural-Language Scans covers the full response.
Or export it from the scanner
If you already screen in the scanr.ai scanner, use the scan you have:
- Open the scan, or build one. Presets work too.
- Click Filters, then Export filters (or press Ctrl+Shift+E).
- Click Download JSON, or Copy to clipboard, and save it as
payload.json.
The export is the same payload /scan/natural returns, and costs no AI credits. Filters you've switched off in the scanner stay in the export so it imports back intact; the API skips them when it runs the scan. Scans you've saved can also be read from code with POST /scan/myscans.
No credits to spare? Use this payload
This is the screen from the sentence above, written out. Save it as payload.json:
3. Run it
Send the payload to POST /api/v2/scan as instructions. The payload goes in unchanged; only the wrapper is new:
The response lists every matching ticker, largest first:
(The tickers and count depend on the market when you run it.)
Keep the payload
payload.json is now a reusable screen. Run it again tomorrow, from a cron job or from your agent, for one request and no AI credits. Generating it again from the sentence costs credits and can come back slightly different.
4. Change the question
To change the screen, refine the payload in English. POST /api/v2/scan/refine applies your change and keeps every filter you didn't mention:
Run refined.json exactly as in step 3. Refinement spends AI credits too.
You can also edit the JSON yourself. Every filter is a small object inside the All group:
Oversold instead of strong: RSI(14) below 30
Replace the Technical block with:
and drop the Indicator block.
Only recent golden crosses
Replace the Technical block with an SMA 50 that CrossesAbove the SMA 200 Within 5 bars. The full payload is in Building Scan Payloads.
Only one sector
Add a sector filter next to MarketCap:
The allowed names come from GET /api/v2/stocks/sectors.


