> Source: https://ashareapi.com/en/ai-screener/  ·  Markdown version for LLMs / AI agents

AI stock screening

# AI stock screening runs on a chain you can check
 An AI can help you screen stocks only if every step is checkable: how factors are computed, what conditions are applied, and how the picks are validated. We turn each link of that chain into an API — no ticker list, just the ability to select and validate.

 In one sentence
 **AI stock screening = letting the AI run the chain factor → screen → backtest**, while you set the rules and adjudicate. What matters is not more data but that **every step is recomputable** — otherwise you cannot tell what it computed from what it invented.

## Three steps, each with its own endpoint
 Screening is not “ask once, get a list” — it is three steps you can audit. Each has a matching endpoint:
 |
| | Step | Endpoint | What it does

| | ① Define factors | [/v1/factors](/en/docs/endpoints/factors) | 88 factors (valuation / earnings / balance sheet / cash flow) + 50 screening entries + 22 presets — see what dimensions exist

| | ② Write conditions | [/v1/screen](/en/docs/endpoints/screen) | Screen with an expression like `intersect([PE_TTM > 0, PE_TTM 15])`; supports historical cross-sections, so you can go back to any trading day

| | ③ Validate | [/v1/backtest](/en/docs/endpoints/backtest) | Backtest the screened names by strategy with real trading costs — is the sample big enough, does it hold out of sample

 ① Define factors
 [/v1/factors](/en/docs/endpoints/factors)
 88 factors (valuation / earnings / balance sheet / cash flow) + 50 screening entries + 22 presets — see what dimensions exist

 ② Write conditions
 [/v1/screen](/en/docs/endpoints/screen)
 Screen with an expression like `intersect([PE_TTM > 0, PE_TTM 15])`; supports historical cross-sections, so you can go back to any trading day

 ③ Validate
 [/v1/backtest](/en/docs/endpoints/backtest)
 Backtest the screened names by strategy with real trading costs — is the sample big enough, does it hold out of sample

 ⇒ Only after all three does a “screening idea” stand up. What we give is not “a plausible-looking list”, but whether **that list can be validated**.

## A screening condition you can run
 Turn conditions into an expression and screen — this one runs as-is (free endpoints need no key; the screening endpoint needs a paid tier):
 ```
# ① See which factors are available
cli.factors()

# ② Screen: positive P/E under 20x, ROE above 15%
cli.screen("intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])")

# ③ Run an equal-weight portfolio backtest
cli.backtest(strategy="buy_hold_equal", mode="portfolio")
```
 ⚠️ The most common trap: `PE_TTM > 0` must come first — loss-making stocks have negative P/E and would otherwise be picked as “low P/E”.

## How an AI uses this
 Once connected, an agent can run the whole screening flow:
 1 Connect the data
 Expose endpoints as tools the agent can call (MCP or REST) — not as web pages to read

 2 Propose a screening idea
 The agent proposes: “how have high-ROE, low-P/E names performed over past years?”

 3 Fetch and screen
 Query the factor library, write an expression, get candidates — all with reproducible conditions and conventions

 4 Validate by backtest
 Backtest the candidates by strategy and adjudicate on statistical thresholds

## Our boundaries, up front
 This page is about capability, not a promise. Three things we do not do:

 We do not pick stocks
 We will not give you a buy list. You get the screening logic and the validation method; the call is yours.

 We do not promise returns
 Backtest results do not represent future performance. What we guarantee is fixed conventions and reproducible conclusions.

 We do not touch automated trading
 Data and validation only — no order placement, no account access.

## Go deeper
 This page shows how; the fuller background is here:
 [What is Agent quant (vs traditional quant)](/en/agent-quant) Why checkable data is the precondition · quant-only endpoints · the full loop

 [AI quant: data and validation (full guide)](/en/docs/ai-quant) Four data paths compared · REST and MCP routes · the traps that fool a backtest

 [Factor library / screening dictionary](/en/docs/endpoints/factors) All 88 factors · 50 screening entries · 14 strategy templates · common-wrong-syntax guide

## FAQ
 Do you provide AI stock screening?
 We provide everything screening needs: a factor library, rule-based screening, and strategy backtests. But we do **not** provide the picks themselves (no recommendations, no returns promise) — that is a retail-facing returns promise; we build capability for developers and researchers. You or your AI Agent set the rules, run the backtest, and adjudicate.

 How is this different from using a library like AKShare?
 Libraries such as AKShare hand you raw data whose stability depends on upstream websites; we hand you a **managed screening chain** (factor → screen → backtest) with fixed conventions, mutually backed backup sources, and self-correcting error codes — so every step the AI takes is reproducible.

 Do I need to code?
 Not to start. State your screening idea and the AI turns it into an expression and calls the endpoints. But **adjudication** is yours: is the sample big enough, does it hold out of sample.

 How much does it cost?
 Free endpoints (quote / K-line / hot list / market overview / breadth) need no key. Screening, factors and backtesting are paid features, starting at the ¥9.9 trial tier, with wider quotas from Standard up. See the pricing page.

 Start with one real data point
 Free endpoints need no key — connect and let the AI run its first screening chain.

 [MCP setup](/en/mcp)[Pricing](/en/pricing)
