Stock API Comparison Guide股票 API 对比指南

Best Free Stock Screener API
Filters, Limits & Python
最佳免费股票筛选 API
字段、限额与 Python 接入

Compare free stock screening APIs by usable filters, market coverage, freshness, quotas, licensing, and a documented test request.

按筛选字段、市场覆盖、数据时效、免费限额与许可比较股票选股接口,
再用文档化请求验证实际返回。

Best free stock screener API whiteboard comparing filters, free-tier limits, test requests, market coverage, data delay, and licensing 最佳免费股票筛选 API 中文白板:比较筛选条件、免费额度、测试请求、市场覆盖、数据延迟、数据许可与应用或智能体连接

Best free stock screener API: choose by workload免费股票筛选 API:按实际任务选择

There is no universal winner. A stock-screener API must provide a programmable way to filter an eligible universe—not merely fetch one ticker’s quote. The best fit exposes the required fundamental or technical filters, covers the target exchanges, returns a stable schema, and permits the intended use.

股票筛选 API 必须能够按程序化条件过滤一个定义清楚的证券池,而不只是查询单只股票价格。应先确认接口能否直接执行所需筛选,再比较覆盖市场、字段口径、数据延迟、调用频率与许可。

Choose by workload before choosing by brand. A server-side fundamental screen needs expressive conditions and reliable fiscal-period semantics; a live technical scanner needs broad quote coverage and synchronized timestamps; a small research notebook may work better with bulk data and local filtering; a historical strategy test requires point-in-time fundamentals, old universes, and delisted securities. One free plan rarely leads all four categories.

应先按任务选型,再比较品牌。服务端基本面筛选需要丰富条件和可靠的财务期间口径;实时技术扫描需要广泛行情覆盖与同步时间戳;小型研究脚本可能更适合批量取数后本地过滤;历史策略检验则必须具备时点基本面、历史证券池和退市股票。一种免费套餐通常无法同时在四类任务中领先。

Shortlist: Business Quant currently documents a free POST screener with broad fundamental filters. Financial Modeling Prep documents a stock screener endpoint. Alpha Vantage, Finnhub, Twelve Data, Alpaca, and Massive can supply data for custom screens but may require client-side filtering. Verify each live plan.

结论:Business Quant 当前文档提供免费 POST 筛选端点和大量基本面字段;Financial Modeling Prep 也公开股票筛选端点。Alpha Vantage、Finnhub、Twelve Data、Alpaca 与 Massive 更常作为自建筛选器的数据源,可能需要本地筛选。套餐会变化,应以官方文档为准。

Stock screener API filters and limits to compare股票筛选 API 应比较的字段与限制

Filters, exchange coverage, freshness, pagination, rate limits, authentication, and licensing are separate pass/fail requirements. Confirm every one before comparing SDK convenience or response speed.

字段、交易所覆盖、时效、分页、限流、鉴权与许可都是独立的准入条件。应先逐项确认,再比较 SDK 是否方便或响应速度是否更快。

Fundamental stock screener API fields

Check P/E, market cap, revenue and earnings growth, margins, dividend yield, sector, country, exchange, currency, operators, null handling, and reporting periods.

Technical stock screener API signals

Confirm price, volume, moving averages, RSI, relative volume, interval, adjustment method, timestamp, and whether free data is real-time, delayed, or end-of-day.

Free stock API limits and market coverage

Record requests per minute and day, credits per endpoint, maximum rows, pagination cost, supported exchanges, symbol universe, history, and caching rules.

Authentication and commercial-use rights

A free API key is not automatically a production license. Verify display, storage, attribution, derived-data, redistribution, and commercial rights.

Server-side versus client-side screening

Server-side filters reduce bandwidth and request volume but constrain you to the provider's fields and operators. Client-side screens offer custom formulas but require a complete, consistently timestamped universe and enough quota to retrieve it.

Historical screening and research integrity

Ask whether an as-of date changes both the metrics and the eligible universe. Backtests need filing availability dates, historical classifications, restatement policy, and delisted names; current values attached to an old date are not point-in-time data.

基本面选股 API 字段

检查市盈率、市值、营收与利润增长、利润率、股息率、行业、国家、交易所、币种、操作符、空值处理和财报周期。

技术面股票筛选接口

确认价格、成交量、均线、RSI、相对成交量、时间周期、复权方式和时间戳,并区分实时、延迟与日终数据。

免费额度与市场覆盖

记录每分钟和每日调用量、端点积分、单页行数、分页成本、交易所、股票池、历史深度和缓存规则。

鉴权与商用许可

免费 API Key 不等于生产授权。应核对展示、存储、署名、衍生数据、再分发与商用权利。

服务端筛选与本地筛选

服务端筛选能减少带宽和请求次数,但只能使用供应商支持的字段与操作符;本地筛选可以自定义公式,却需要完整、时间一致的证券池,以及足够的批量取数额度。

历史筛选与研究完整性

应确认截至日期是否同时作用于指标和证券池。回测需要申报可用日、历史分类、重述规则与退市股票;把当前数值贴上过去日期,并不等于时点数据。

Use a fixed four-stock fixture to verify filter semantics用四只合成股票验证筛选语义

Define the universe before the rules: US primary-listed common stocks, excluding ETFs and ADRs, observed at the June 30 close. Use only fundamentals that were publicly available by that cutoff. Apply market_cap_usd >= 1,000m, ttm_revenue_growth > 10%, and avg_dollar_volume_20d_usd >= 5m. Exclude a security when a required field is null rather than treating null as zero.

应先定义证券池,再定义筛选条件:以 6 月 30 日收盘为截至时点,选择美国主要上市的普通股,排除 ETF 与 ADR,并且只使用该时点前已经公开的基本面数据。条件设为 market_cap_usd >= 1,000mttm_revenue_growth > 10%avg_dollar_volume_20d_usd >= 5m。必需字段为空时排除该证券,不能把空值当成零。

Stable ID稳定 IDMarket cap市值TTM revenue growthTTM 营收增长20-day avg dollar volume20 日平均成交额Expected result预期结果
ALP$1.2bn12.0%$8.0mInclude: all rules pass纳入:全部条件通过
BRD$1.0bn10.1%$5.0mInclude: inclusive boundaries pass纳入:两个含等号的边界均通过
CRN$2.4bnnull$20.0mExclude: required growth is missing排除:必需增长字段缺失
DLT$3.0bn18.0%$4.9mExclude: liquidity rule fails排除:流动性条件不通过

The API should return the same two matches and an explainable reason for each exclusion. Record whether market cap uses the closing price or a later quote, which four fiscal quarters form TTM revenue, how non-USD values are converted, and whether the threshold operators are inclusive. Without those details, two syntactically identical screens can implement different decisions.

接口应稳定返回两只符合条件的股票,并能解释每一项排除原因。同时记录市值采用收盘价还是更晚的行情、TTM 收入由哪四个财季组成、非美元数值如何换算,以及阈值是否包含边界。缺少这些信息时,两个写法相同的筛选条件仍可能执行不同决策。

Free stock screener API options to verify需要核验的免费股票筛选 API 选项

This is a verification shortlist, not a permanent ranking. “Best” depends on whether you need server-side screening or raw data for client-side filtering. Build a scorecard before testing: assign pass/fail gates for market, security type, required fields, freshness, historical behavior, license, and budget; score convenience only after every gate passes. This prevents an attractive SDK or generous headline quota from masking a missing core capability.

这是核验清单,不是永久排名。“最佳”取决于你需要服务端直接筛选,还是获取原始数据后在本地筛选。测试前应先建立评分表:把市场、证券类型、必需字段、时效、历史能力、许可和预算设为通过/不通过门槛,全部满足后再评价接入便利性。这样可以避免好看的 SDK 或醒目的高额度掩盖核心能力缺失。

Provider供应商Documented signal文档信号Best-fit task适合任务Verify now当前需核对
Business QuantFree POST screener, AND/OR conditions, pagination, and broad fundamental metrics.免费 POST 筛选、AND/OR 条件、分页和大量基本面指标。Server-side fundamental screening.服务端基本面股票池筛选。Key issuance, fair use, coverage, license.Key、合理使用、覆盖与许可。
Financial Modeling PrepDocuments a company screener endpoint and fundamentals.公开公司筛选端点和基本面数据。Common filters and enrichment.常用筛选与公司数据补充。Current free access and quota.当前免费权限与额度。
Alpha VantageStock time series, fundamentals, and technical indicators.股票时间序列、基本面与技术指标。Small-universe local screens.小股票池本地筛选。Daily limit, delay, bulk workflow.每日限额、延迟与批量流程。
Finnhub / Twelve DataQuotes, fundamentals, indicators, and free-plan access.行情、基本面、指标与免费层。Inputs for a custom technical screener.自建技术筛选器的数据输入。Universe calls, credits, redistribution.股票池调用、积分与再分发权。

Free stock screener API Python test workflow免费股票筛选 API 的 Python 验证流程

1. Define a reproducible screen

Start with a small rule such as US common stocks, minimum market cap, positive revenue growth, and minimum average volume. Record units and null behavior.

2. Send the documented request

Use requests.post(url, params={"page":1,"limit":50,"api_key":api_key}, json={"filters":[...]}, timeout=20) only as a pattern; copy the exact endpoint, headers, operators, and body from official documentation.

3. Validate response and pagination

Call raise_for_status(), then verify unique symbols, exchanges, numeric types, currencies, timestamps, total rows, next-page behavior, empty results, and 429 handling.

4. Recheck freshness and license

Compare a sample with an exchange or issuer source, log retrieval time and provider, and retain storage, display, attribution, commercial-use, and redistribution terms.

5. Benchmark the same screen across candidates

Run one narrow and one broad screen at a fixed time. Compare eligible-universe count, matches, nulls, metric values, page stability, latency, credits consumed, and error behavior. Investigate disagreements rather than averaging them away.

6. Estimate the real free-tier workload

Translate headline quotas into complete screen runs. Include metadata calls, universe refreshes, pagination, retries, enrichment, and scheduled frequency. A plan with many requests can still be unusable if each symbol or metric costs a separate credit.

7. Shadow the preferred option before production

Run it on schedule without driving user actions. Track missing pages, schema drift, stale fields, quota exhaustion, changed match counts, and provider incidents, then define a fallback or safe failure mode.

1. 定义可复现的选股条件

从小而明确的规则开始,例如美国普通股、市值阈值、营收正增长和最低平均成交量,并记录单位和空值处理。

2. 按官方文档发送请求

使用环境变量保存 API Key,并完全按当前文档设置 URL、Header、操作符和请求体,不猜测字段名。

3. 验证返回与分页

检查代码唯一性、交易所标识、数值类型、币种、时间戳、总行数、翻页、空结果和 429 限流处理。

4. 复核时效与许可

抽样与交易所或公司原始来源对照,记录获取时间与供应商,并保存展示、存储、署名、商用与再分发条款。

5. 用同一筛选条件横向测试

在固定时点分别运行一组窄条件和一组宽条件,比较证券池数量、匹配结果、空值、指标数值、分页稳定性、延迟、消耗额度和错误行为;出现分歧时应查明口径,而不是简单取平均。

6. 估算免费额度能完成多少完整任务

把宣传额度换算成完整筛选次数,并计入元数据查询、证券池更新、分页、重试、结果补充和计划频率。即便总请求数很多,如果每只股票或每项指标单独计费,仍可能无法使用。

7. 上线前进行影子运行

按正式频率运行,但暂不触发用户动作,持续记录漏页、结构变化、字段陈旧、额度耗尽、匹配数量突变和供应商事故,再定义备用源或安全失败方式。

Provider-neutral Python example. Replace the request keys and response adapter with the exact schema from the selected provider. The important behavior is preserving one snapshot across pages, validating stable security identity, treating required nulls as exclusions, and deduplicating before returning matches.

与供应商无关的 Python 示例。 请按所选服务商的官方文档替换请求字段与响应适配器。示例的重点是:所有分页使用同一快照、校验稳定证券身份、将必需字段空值视为排除条件,并在返回结果前完成去重。

from decimal import Decimal, InvalidOperation
import requests


FILTERS = {
    "as_of": "2026-06-30",
    "security_type": "common_stock",
    "country": "US",
    "filters": [
        {"field": "market_cap_usd", "op": "gte", "value": 1_000_000_000},
        {"field": "ttm_revenue_growth", "op": "gt", "value": 0.10},
        {"field": "avg_dollar_volume_20d_usd", "op": "gte", "value": 5_000_000},
    ],
    "sort": ["market_cap_usd:desc", "security_id:asc"],
    "limit": 100,
}


def as_decimal(row, field):
    value = row.get(field)
    if value is None:
        return None
    try:
        return Decimal(str(value))
    except InvalidOperation as exc:
        raise ValueError(f"{field} is not numeric: {value!r}") from exc


def fetch_screen(endpoint, api_key):
    cursor = None
    snapshot = None
    seen = set()
    matches = []

    with requests.Session() as session:
        while True:
            body = {**FILTERS, "cursor": cursor}
            response = session.post(
                endpoint,
                headers={"Authorization": f"Bearer {api_key}"},
                json=body,
                timeout=(5, 30),
            )
            response.raise_for_status()
            payload = response.json()

            page_snapshot = payload.get("snapshot")
            snapshot = snapshot or page_snapshot
            if page_snapshot != snapshot:
                raise RuntimeError("Provider snapshot changed during pagination")

            for row in payload.get("results", []):
                identity = (row.get("security_id"), row.get("exchange"))
                if not all(identity):
                    raise ValueError("Stable security_id and exchange are required")
                if identity in seen:
                    raise ValueError(f"Duplicate security across pages: {identity}")
                seen.add(identity)

                cap = as_decimal(row, "market_cap_usd")
                growth = as_decimal(row, "ttm_revenue_growth")
                liquidity = as_decimal(row, "avg_dollar_volume_20d_usd")
                if None in (cap, growth, liquidity):
                    continue
                if cap >= 1_000_000_000 and growth > Decimal("0.10") \
                        and liquidity >= 5_000_000:
                    matches.append(row)

            cursor = payload.get("next_cursor")
            if not cursor:
                return matches

The example intentionally accepts endpoint and api_key as inputs instead of inventing a live URL. In production, keep the key in a secret store, add bounded retry handling for transient failures, and record the normalized query, provider snapshot, retrieval time, page count, excluded-null count, and license version with the result.

示例有意把 endpointapi_key 作为输入,而不是虚构一个可调用地址。生产环境中应把密钥保存在密钥服务里,仅对暂时性故障进行有限重试,并随结果保存标准化查询、供应商快照、抓取时间、页数、因空值被排除的数量及许可版本。

Stable pagination rule: bind every page to the same as_of, normalized query hash, universe version, and provider snapshot token. Sort by the requested metric plus a stable security ID as a tie-breaker. If page two observes a newer market or fundamental snapshot than page one, changing ranks can create duplicates or skipped rows. When the API offers no snapshot token, retrieve the complete result in a controlled short window and reject the run if total count, query time, or boundary rows change during pagination.

稳定分页规则:每一页都应绑定相同的 as_of、标准化查询哈希、证券池版本和供应商快照令牌;排序时除目标指标外,还要用稳定证券 ID 作为并列排序依据。如果第二页采用比第一页更新的行情或基本面快照,排名变化就可能造成重复或漏行。接口没有快照令牌时,应在受控的短时间窗口内取完整结果;分页期间总数、查询时间或边界记录发生变化,则本次结果应判为无效。

How QVeris helps connect stock screening toolsQVeris 如何连接股票筛选能力

QVeris does not create market data, grant data licenses, rank investments, or guarantee a provider. It helps developers and AI agents discover external capabilities, inspect inputs and outputs, and connect a selected tool through a consistent workflow.

QVeris 不生产行情、不授予数据许可、不推荐股票,也不保证供应商。它帮助开发者与 AI Agent 发现外部能力、检查输入输出,并通过一致流程连接选定工具。

  • Open the QVeris provider details for stock screening and financial-data capabilities.
  • Inspect provider documentation, authentication, operators, units, response shape, pagination, timestamp behavior, and known limitations before connecting.
  • Give an agent explicit requirements for market, universe, filter logic, as-of date, null policy, sorting, result cap, and freshness instead of asking it for a vague “best screener.”
  • Keep provider attribution, retrieval time, query version, and license notes with every result; capability access is not investment advice.
  • 使用 QVeris 服务商详情搜索股票筛选与金融数据能力。
  • 连接前检查供应商文档、鉴权、操作符、单位、返回结构、分页、时间戳行为和已知限制。
  • 向 Agent 明确提供市场、证券池、筛选逻辑、截至日期、空值规则、排序、结果上限和时效要求,不要只笼统地询问“最佳选股器”。
  • 为结果保留供应商、获取时间、查询版本与许可说明;能力连接不构成投资建议。

Best free stock screener API FAQ免费股票筛选 API 常见问题

Is there a free stock screener API?

Yes. Business Quant currently documents a free screener endpoint; other providers offer free tiers or data for custom screens. Verify quotas and terms.

Which free stock API is best for Python?

Choose the provider whose documented endpoint supports your filters and exchanges. Most REST APIs work with requests, so Python support alone is not decisive.

Can a free API screen stocks by fundamentals?

Some filter server-side by valuation, growth, margins, yield, sector, and market cap. Others require downloading data and filtering locally.

Is a free real-time stock screener API available?

Some plans offer limited real-time feeds, but a quote API is not automatically a full-market screener. Verify feed, delay, and universe.

Can I use free stock API data commercially?

Only when the current license permits the exact display, storage, derived-data, and redistribution use.

Which API is best for a fundamental stock screener?

Prefer a server-side screener with the required ratios, clear formulas and periods, compound conditions, stable pagination, and an explicit null policy. Test several metrics against issuer filings before relying on the ranking.

Which API is best for a technical stock screener?

Prioritize full-universe quote or bar coverage, synchronized timestamps, adjustment rules, interval support, and enough throughput to refresh the entire screen. A large indicator catalog is secondary if the inputs are stale.

How can two screeners return different stocks?

They may use different universes, filing periods, currency conversion, adjustment rules, timestamps, null policies, operators, or pagination snapshots. Compare the exact query and source values for a few included and excluded symbols.

有免费的股票筛选 API 吗?

有。Business Quant 当前公开免费筛选端点,其他供应商也提供免费层或可用于自建筛选器的数据。应核对最新额度与条款。

哪个免费股票 API 适合 Python?

优先选择明确支持所需字段与交易所的端点。大多数 REST API 都能用 requests 调用,Python 兼容性不是唯一标准。

免费接口可以按基本面选股吗?

部分接口支持估值、增长、利润率、股息率、行业和市值等服务端筛选;另一些需要下载后本地筛选。

有免费实时股票筛选 API 吗?

免费层可能提供有限实时行情,但实时行情接口不等于全市场筛选器,需核对数据源、延迟与股票池。

免费股票数据可以商用吗?

只有当前许可明确允许具体的展示、存储、衍生和再分发用途时才可以。

哪类 API 更适合基本面选股?

优先选择支持所需比率、公式与期间清晰、能够组合条件、分页稳定并明确空值规则的服务端筛选器;使用排名前,还应抽样与公司申报核对指标。

哪类 API 更适合技术面选股?

优先考虑全证券池行情或 K 线覆盖、同步时间戳、复权规则、周期支持,以及足以刷新整个股票池的吞吐量。如果底层输入陈旧,再多技术指标也没有意义。

为什么两个选股器返回不同股票?

证券池、财务期间、汇率换算、复权、时间戳、空值规则、操作符或分页快照都可能不同。应对若干入选和未入选标的逐项比较查询条件与来源数值。

Authoritative references and related guides权威参考与相关指南