Skip to main content
Glama

GroundAPI 为 AI Agent 提供统一的数据层 —— 18 个工具,涵盖金融、信息和生活服务。一个 API Key,三种访问方式:REST API、MCP 和 CLI。

License: MIT MCP PyPI

目录

Related MCP server: Stock MCP

快速开始

在 groundapi.net 获取您的 API Key —— 每月 500 次免费调用,无需信用卡。

选项 1:MCP (推荐用于 AI Agent)

添加到 Claude Desktop、Cursor、Windsurf 或任何兼容 MCP 的客户端:

{
  "mcpServers": {
    "groundapi": {
      "url": "https://mcp.groundapi.net/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

选项 2:REST API

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.groundapi.net/v1/finance/stock?symbol=600519&aspects=overview"

选项 3:CLI

pip install groundapi-cli
groundapi config set-key YOUR_API_KEY
groundapi stock --symbol 600519

MCP 工具参考

金融 (6 个工具)

finance_stock — 证券数据

A 股股票、指数和 ETF 的一体化查询。支持 13 个数据维度 和多股对比。

参数

类型

默认值

描述

symbol

string

—

股票代码。对比时使用逗号分隔 (例如 "600519,000858")

keyword

string

—

按名称搜索 (例如 "茅台")

aspects

string

"overview"

数据维度,逗号分隔 (见下表)

days

int

60

K 线/技术指标的历史范围

period

string

"d"

K 线周期:5/15/30/60/d/w/m

13 个可用维度:

维度

返回内容

使用场景

overview

快速快照:行情 + 简介 + 财务简报

“XXXX 表现如何?”

profile

公司全貌、概念、指数成分、资本结构

“这家公司是做什么的?”

quote

实时价格、PE/PB、五档盘口、涨跌停距离

“当前价格是多少?”

kline

K 线数据 (支持 5/15/30/60 分钟、日、周、月)

“给我看图表”

technical

MACD、MA、BOLL、KDJ + 信号检测 (例如 “DIF 上穿 DEA”)

“技术分析如何?”

financial

三大财务报表、季度损益、现金流、分红、预测

“财务状况如何?”

flow

资金流向 (超大/大/中/小单)、连续流入/流出

“主力资金在买入吗?”

holders

前十大股东、流通股东、户数趋势、基金持仓

“主要股东是谁?”

management

高管、董事、监事

“管理层是谁?”

events

分红、增发、解禁、财报日历

“下次分红是什么时候?”

tick

日内逐笔成交及买卖方向统计

“今天买盘多还是卖盘多?”

summary

多维度事实聚合 (无观点)

“给我一份完整的数据摘要”

peers

同行业对比表 (PE/PB/市值排名)

“它在行业内排名如何?”

# Quick overview
finance_stock(symbol="600519")

# Deep dive with multiple aspects
finance_stock(symbol="600519", aspects="quote,technical,financial,flow")

# Search by name
finance_stock(keyword="平安")

# Compare multiple stocks
finance_stock(symbol="601398,601939,600036", aspects="quote")

# Index / ETF
finance_stock(symbol="000001.SH", aspects="kline,technical")  # SSE Composite
finance_stock(symbol="510300", aspects="quote")                # CSI 300 ETF

finance_market — 市场概览

全市场数据:主要指数、热门股、板块轮动、IPO 日历、异常信号。

参数

类型

默认值

描述

scope

string

"overview"

数据范围,逗号分隔

sector

string

—

深入特定板块

date

string

—

日期筛选 (YYYY-MM-DD)

范围: overview (指数 + 情绪) · hot (涨跌停池、连板分析) · sectors (概念与行业列表) · ipo (IPO 日历) · signals (异常检测)

finance_market()                                    # Today's market
finance_market(scope="hot")                         # Limit-up/down stocks
finance_market(scope="sectors", sector="AI")        # AI sector constituents
finance_market(scope="ipo")                         # IPO calendar

finance_screen — 选股器

支持 20+ 维度和预设组合的多条件选股。

参数

类型

描述

industry

string

行业筛选 (例如 "银行", "半导体")

concept

string

概念筛选 (例如 "AI", "新能源")

pe_max / pe_min

float

市盈率范围

pb_max

float

最大市净率

min_market_cap / max_market_cap

float

市值范围

min_dividend_yield

float

最小股息率 (%)

filter_preset

string

low_pe_high_div · small_cap_growth · large_cap_stable

sort_by

string

排序字段 (默认:change_pct)

finance_screen(industry="银行", pe_max=10)                       # Low-PE bank stocks
finance_screen(min_dividend_yield=3, sort_by="dividend_yield")   # High dividend
finance_screen(concept="AI")                                      # AI concept stocks
finance_screen(filter_preset="low_pe_high_div")                  # Preset: value picks

搜索 11,780+ 种证券:股票、概念、板块、ETF、指数。

参数

类型

描述

keyword

string

搜索关键词

type

string

all · stock (6,104) · concept (2,222) · sector (1,466) · etf (1,377) · index (613)

finance_search(keyword="芯片", type="etf")        # Chip ETFs
finance_search(keyword="AI", type="concept")       # AI concept indices
finance_search(keyword="沪深300", type="index")    # CSI 300

finance_exchange_rate — 汇率查询

finance_exchange_rate(from_currency="USD", to_currency="CNY")
finance_exchange_rate(from_currency="EUR", to_currency="JPY")

finance_gold_price — 贵金属价格

finance_gold_price()   # Gold, silver, platinum real-time prices

信息 (5 个工具)

参数

类型

描述

query

string

搜索关键词

count

int

结果数量 (1–50,默认 10)

recency

string

noLimit · oneDay · oneWeek · oneMonth · oneYear

info_search(query="AI Agent trends 2026", count=20, recency="oneWeek")

info_scrape — 网页抓取

info_scrape(url="https://example.com")   # Returns clean markdown

info_news — 新闻头条

参数

类型

描述

category

string

finance · general · tech · sports ...

limit

int

文章数量 (1–50)

info_news(category="finance", limit=10)
info_news(category="tech")

来自微博、抖音、知乎等平台的实时热搜榜。

info_trending()

info_bulletin — 每日简报

info_bulletin()   # Morning news digest

生活服务 (7 个工具)

life_weather — 天气

参数

类型

描述

city

string

城市名称 (例如 "Beijing")

location

string

经纬度 (例如 "39.9,116.4")

forecast

bool

是否包含 7 天预报

life_weather(city="北京", forecast=True)
life_weather(location="39.9,116.4")

life_logistics — 物流追踪

life_logistics(number="SF1234567890")              # Auto-detect carrier
life_logistics(number="1234567890", company="yt")   # Specify carrier

life_ip — IP 地理位置

life_ip(address="8.8.8.8")   # Country, city, timezone, ISP
life_ip()                     # Caller's IP

life_tax — 个税计算器

life_tax(monthly_salary=20000, insurance=2000, special_deduction=1500)

life_calendar — 日历与交易日

life_calendar()                  # Today: lunar date, solar terms, holiday, trading day
life_calendar(date="2026-05-01") # Specific date

life_oil_price — 油价查询

life_oil_price()                  # National average
life_oil_price(province="北京")   # Province-specific

life_traffic — 限行查询

life_traffic(city="北京")   # Today's restricted plate numbers

REST API

基础 URL: https://api.groundapi.net

所有接口均需 X-API-Key 请求头。

接口

描述

GET /v1/finance/stock

股票/指数/ETF 数据

GET /v1/finance/market

市场概览

GET /v1/finance/stock/screen

选股

GET /v1/finance/search

证券搜索

GET /v1/finance/exchange-rate

汇率

GET /v1/finance/gold-price

黄金及贵金属

GET /v1/info/search

网页搜索

GET /v1/info/scrape

网页抓取

GET /v1/info/news

新闻头条

GET /v1/info/trending

热搜榜

GET /v1/info/bulletin

每日简报

GET /v1/life/weather

天气

GET /v1/life/logistics

物流追踪

GET /v1/life/ip

IP 地理位置

GET /v1/life/tax

个税计算器

GET /v1/life/calendar

日历信息

GET /v1/life/oil-price

油价

GET /v1/life/traffic

限行查询

# Stock overview
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.groundapi.net/v1/finance/stock?symbol=600519&aspects=overview"

# Multi-aspect deep dive
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.groundapi.net/v1/finance/stock?symbol=600519&aspects=quote,technical,financial"

# Market overview
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.groundapi.net/v1/finance/market?scope=overview"

# Stock screening
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.groundapi.net/v1/finance/stock/screen?industry=银行&pe_max=10"

# Web search
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.groundapi.net/v1/info/search?q=AI+Agent&count=10"

# Weather
curl -H "X-API-Key: YOUR_KEY" \
  "https://api.groundapi.net/v1/life/weather?city=北京&forecast=true"

完整 API 文档:docs.groundapi.net


CLI 参考

安装

pip install groundapi-cli
groundapi config set-key YOUR_API_KEY

金融

# Stock quotes
groundapi stock --symbol 600519                            # Real-time quote
groundapi stock --keyword 贵州茅台                          # Search by name
groundapi stock --symbol 600519 --date 2024-12-31          # Specific date
groundapi stock --symbol 600519 --days 30                  # Last 30 days
groundapi stock --symbol 600519 --days 30 --include technicals  # With technicals

# Screening
groundapi screen                                           # Default ranking
groundapi screen --industry 白酒 --pe-max 30               # Industry + PE filter
groundapi screen --sort-by total_market_cap --limit 10     # Top 10 by market cap

# Market overview
groundapi market                                           # Indices + macro
groundapi market --include sectors,valuation               # With sectors + valuation
groundapi market --sector 半导体 --type industry           # Sector drill-down

# Funds
groundapi fund                                             # Fund ranking
groundapi fund --keyword 沪深300                            # Search funds
groundapi fund --code 110011                               # Fund details

信息

groundapi search "AI Agent"                                # Web search
groundapi search "AI Agent" --count 20 --recency oneWeek   # With filters
groundapi scrape https://example.com                       # Scrape webpage
groundapi news                                             # Finance news
groundapi news --category tech --limit 10                  # Tech news

生活服务

groundapi weather --city 北京                               # Current weather
groundapi weather --city 北京 --forecast                    # 7-day forecast
groundapi weather --location 39.9,116.4                    # By coordinates
groundapi logistics SF1234567890                           # Track package
groundapi ip 8.8.8.8                                       # IP lookup

Agent 技能

预构建的技能,将 GroundAPI 工具组合为自动化工作流。可在 Cursor、OpenClaw 或 Smithery 中安装:

技能

描述

市场简报

生成每日 A 股市场摘要 —— 指数、板块、热门股、异常情况

A 股分析师

13 个数据维度的深度分析 —— 输出包含技术面、财务面、资金流的结构化报告

选股器

自然语言选股 —— “寻找高股息的低估值银行股”

网页研究员

多源研究 —— 搜索、抓取并综合信息

情境感知

位置感知的日常助手 —— 一次性获取天气、日历、交通、新闻

异常追踪器

市场异常检测 —— 异动成交量、价格缺口、连板分析


自托管 MCP 服务器

在本地运行 MCP 服务器 (使用 stdio 传输给本地 AI 客户端):

pip install -r requirements.txt
python mcp_server.py

或连接到托管的 MCP 端点 (无需部署):

https://mcp.groundapi.net/mcp

定价

免费版

付费版

调用次数

500 次/月

按量付费

速率限制

60 次/分

300 次/分

支付方式

—

支付宝 / 微信支付 / 信用卡

在 groundapi.net 获取您的 API Key。

链接

许可

MIT — 仅限技能、MCP 服务器包装器和文档。GroundAPI 是商业 API 服务。

Available Tools

10 tools
finance_fundA

Query fund data: search, detail, or ranking.

  • Search: finance_fund(keyword="沪深300")

  • Detail: finance_fund(code="110011")

  • Ranking: finance_fund(sort_by="return_1y", limit=20)

Inputs: code, limit, order, keyword, +2 more. Returns: object

finance_marketA

Get market data. Supports multiple modes:

  • Market overview: finance_market() — indices, breadth, volume, top sectors, macro

  • With sectors: finance_market(include="sectors") — add sector ranking

  • With funds: finance_market(include="funds") — add fund ranking

  • With valuation: finance_market(include="valuation") — add industry valuation map

  • With macro: finance_market(include="macro") — add macro indicators

  • All extras: finance_market(include="sectors,funds,valuation,macro")

  • Sector detail: finance_market(sector="半导体") — specific sector with constituents

Inputs: date, type, limit, sector, +2 more. Returns: object

finance_stockA

Query A-share stock data. Supports multiple modes:

  • Search: finance_stock(keyword="茅台") — find stocks by name or code

  • Latest quote: finance_stock(symbol="600519") — current price, PE, PB, dividend yield

  • Specific date: finance_stock(symbol="600519", date="2026-03-28")

  • History: finance_stock(symbol="600519", days=60) — last N trading days

  • With technicals: finance_stock(symbol="600519", days=60, include="technicals")

  • With fundamentals: finance_stock(symbol="600519", include="fundamental") Either keyword or symbol is required.

Inputs: date, days, limit, symbol, +3 more. Returns: object

finance_stock_screenA

Screen stocks by criteria or get top/bottom rankings.

  • Ranking: finance_stock_screen(sort_by="change_pct", limit=10) — today's top gainers

  • Filter: finance_stock_screen(industry="半导体", pe_max=30) — semiconductor stocks with PE < 30 All filter params are optional. With no filters, returns a simple ranking.

Inputs: limit, order, pb_max, pe_max, +6 more. Returns: object

info_newsA

Get latest news headlines. category: finance/general/tech/sports/... (default: finance). limit: number of articles (1-50).

Inputs: limit, category. Returns: object

info_scrapeC

Read a webpage and return its content as markdown. url: the webpage URL to scrape.

Inputs: url (required). Returns: object

life_ipA

Get IP geolocation info. address: IP address (defaults to caller IP if omitted).

Inputs: address. Returns: object

life_logisticsA

Track a courier package. number: tracking number. company: courier company code (auto-detected if omitted).

Inputs: number (required), company. Returns: object

life_weatherA

Get weather data: current conditions and optional 7-day forecast. city: city name (e.g. '北京'). location: lat,lng. forecast: include 7-day forecast.

Inputs: city, forecast, location. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 10 tools

    Disambiguation5/5

    Every tool targets a distinct domain: fund, market, stock, info retrieval, and life utilities. No overlap in functionality.

    Naming Consistency5/5

    All tools use a consistent 'domain_specific' lowercase underscore pattern, e.g., finance_fund, info_news, life_weather.

    Tool Count5/5

    10 tools is well-scoped for a general-purpose assistant covering finance, info, and life domains. Each tool earns its place.

    Completeness5/5

    Finance tools cover fund, market, stock, and screening comprehensively. Info tools cover news, web scraping, and search. Life tools cover IP, logistics, weather. No obvious gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and backend services to retrieve and analyze A-share, US equity, ETF, index, and crypto data, including technical indicators, fundamentals, money flow, filings, and news through MCP tools and HTTP APIs.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and applications to access and analyze A-share, US equity, ETF, index, and crypto market data, including technical indicators, fundamentals, news, filings, money flow, and exportable CSV/JSON datasets through MCP tools and HTTP APIs.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and HTTP clients to access standardized financial market data, technical indicators, fundamentals, news, money-flow, and filings across A-shares, US equities, ETFs, indices, and crypto, with MCP tools and CSV/JSON exports for code workflows.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and backends to retrieve and analyze financial market data — A-shares, US equities, ETFs, indices, and crypto — through MCP tools or an HTTP API. It provides quotes and K-lines, technical indicators, fundamentals, money flow, filings, and news search, with CSV/JSON export for code-execution workflows.
      -

    Appeared in Searches