Execute a natural language stock scan
Converts a natural language query to a scanner payload using AI and validates it. This is an experimental feature that uses natural language processing to generate scan criteria. Note: This endpoint only generates the payload and does not execute the scan.
Authentication Methods:
- Session-based: For UI users with active session
- API Token: For programmatic access (requires Starter tier or higher)
- Provide token via
Authorization: Bearer <token>header orX-API-Key: <token>header - Enforces tier-based access control and rate limiting per token
- Tracks usage for billing and analytics
- Provide token via
Rate Limits (API Token):
- Starter: 30/min, 500/hour, 5000/day
- Power User: 60/min, 2000/hour, 20000/day
- Business: 120/min, 5000/hour, 50000/day
Daily AI Quota (API Token): Natural-language + refine scans share a per-user daily AI budget separate from the request rate limits above. Limits: 500/day (Starter), 2000/day (Power User), 10000/day (Business). Exceeding returns 429.
Body·
required
application/json
Natural language query and optional parameters
- Type: stringquerymin length:1required
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/api/v2/scan/natural
curl https://dev.scanr.ai/api/v2/api/v2/scan/natural \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"query": ""
}'
{ "conversion_success": true, "conversion_time_taken_ms": 1, "generated_payload": { "All": [ { "$schema": "string", "CandlestickPattern": { "additionalProperty": [ {