---
title: "Smart Route"
method: GET
path: "/api/smart-route"
tags: ["Smart Route"]
---

# Smart Route

`GET /api/smart-route`

## Request

- Base URL: `https://api.xfinlab.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xfinlab.com/api/smart-route`
- Auth: none declared

Powers the homepage's single "tell me what you're thinking" input
box (js/smart-router.js): given free text, figures out which
Engine page best answers it (and any ticker mentioned), so a
visitor doesn't need to already know XFINLAB has 11 separate tools.

js/smart-router.js tries its own fast regex/keyword pass first and
only calls this endpoint when that's inconclusive -- this endpoint
re-runs the same fast pass server-side (cheap, no harm) and falls
back to an AI classification call only if that also comes up
empty. See services/intent_router_service.py for the full design
rationale.

## Query parameters

- `q` string
- `lang` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xfinlab/apis/xfinlab-api.md) · [All operations](https://skmtc.dev/xfinlab/apis/xfinlab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xfinlab/apis/xfinlab-api/revisions/205f85614bc6?raw)
