当前位置: 首页 > Skill >

Find API

Find API

Find API

🔍 Find API | 寻找可靠数据源 TRIGGERS: Use when agent needs to fetch external data, user mentions "reliable data source", "数据源", "API", or when web scraping is inef...

0.0.2 2026.11.26 826
获取Skill文件查看使用说明
作 者:陆景 许可证: 更新时间:2026.11.26
本文目录展开

🔍 Find API | 寻找可靠数据源

The comprehensive guide to reliable data APIs. Stop scraping, start using APIs.

跨领域可靠数据 API 的综合指南。停止爬取,开始使用 API。

⚠️ Core Principle | 核心原则

API First, Scraping Last.

Priority Method When to Use 优先级 方法 何时使用
1st Official API Always check first 第一 官方 API 始终优先检查
2nd Third-party API When official API unavailable/expensive 第二 第三方 API 当官方 API 不可用/太贵
3rd Public Dataset For historical/static data 第三 公共数据集 用于历史/静态数据
4th Web Scraping Only as last resort 第四 网页爬取 仅作为最后手段

📋 Table of Contents | 目录

  1. Stock & Financial Data | 股票与金融数据
  2. Weather Data | 天气数据
  3. News & Media | 新闻与媒体
  4. Maps & Geolocation | 地图与地理定位
  5. E-commerce & Products | 电商与商品
  6. More domains coming soon... | 更多领域持续完善中...

1. Stock & Financial Data | 股票与金融数据

1.1 A股市场 / Chinese A-Share Market

API Rating Cost Auth Data Coverage
AKShare ⭐⭐⭐⭐⭐ Free None Real-time quotes, historical K-lines, financial statements, fund flows, dragon-tiger list
Tushare ⭐⭐⭐⭐⭐ Free+Paid Token Real-time quotes, historical data, financial statements, margin trading
East Money API ⭐⭐⭐⭐ Free None Real-time quotes, fund flows, research reports

Recommended: AKShare (Best for most use cases)

Installation:

pip install akshare

Quick Examples:

import akshare as ak

# 获取A股实时行情
df = ak.stock_zh_a_spot_em()

# 获取个股历史数据
df = ak.stock_zh_a_hist(symbol="000001", period="daily", adjust="qfq")

# 获取财务指标
df = ak.stock_financial_analysis_indicator(symbol="000001")

# 获取资金流向
df = ak.stock_individual_fund_flow(stock="000001")

Documentation: https://akshare.akfamily.xyz

1.2 港股市场 / Hong Kong Stock Market

API Rating Cost Auth Data Coverage
AKShare ⭐⭐⭐⭐⭐ Free None Real-time quotes, historical data
Tushare ⭐⭐⭐⭐ Free+Paid Token Hong Kong stock data

Recommended: AKShare

Quick Examples:

import akshare as ak

# 港股实时行情
df = ak.stock_hk_spot_em()

# 个股历史数据(如腾讯 00700)
df = ak.stock_hk_hist(symbol="00700", period="daily", adjust="qfq")

# 港股通资金
df = ak.stock_hk_ggt_components_em()

1.3 美股市场 / US Stock Market

API Rating Cost Auth Data Coverage
yfinance ⭐⭐⭐⭐⭐ Free None Real-time quotes, historical data, financials, options
Alpha Vantage ⭐⭐⭐⭐ Free+Paid API Key Quotes, technical indicators, forex
Polygon.io ⭐⭐⭐⭐ Free+Paid API Key Real-time data, options

Recommended: yfinance (Best free option for US stocks)

Installation:

pip install yfinance

Quick Examples:

import yfinance as yf

# 获取股票信息
stock = yf.Ticker("AAPL")

# 历史数据
hist = stock.history(period="1mo")

# 财务报表
financials = stock.financials
balance_sheet = stock.balance_sheet
cashflow = stock.cashflow

# 股息信息
dividends = stock.dividends

# 推荐分析师评级
recommendations = stock.recommendations

Documentation: https://github.com/ranaroussi/yfinance

1.4 期货与衍生品 / Futures & Derivatives

API Rating Cost Auth Data Coverage
AKShare ⭐⭐⭐⭐⭐ Free None Domestic futures, international futures
Tushare ⭐⭐⭐⭐ Free+Paid Token Futures data

Quick Examples:

import akshare as ak

# 国内期货主力合约
df = ak.futures_zh_main_sina()

# 国际期货
df = ak.futures_foreign_hist(symbol="CL")  # 原油

1.5 基金数据 / Fund Data

API Rating Cost Auth Data Coverage
AKShare ⭐⭐⭐⭐⭐ Free None Open-end funds, ETFs, money funds
East Money API ⭐⭐⭐⭐ Free None Fund rankings, holdings

Quick Examples:

import akshare as ak

# 开放式基金列表
df = ak.fund_open_fund_info_em(fund="000001")

# ETF实时行情
df = ak.fund_etf_spot_em()

# 基金持仓
df = ak.fund_portfolio_em(fund="000001")

2. Weather Data | 天气数据

API Rating Cost Auth Data Coverage
OpenWeatherMap ⭐⭐⭐⭐⭐ Free+Paid API Key Current weather, forecast, historical
WeatherAPI.com ⭐⭐⭐⭐ Free+Paid API Key Weather, astronomy, sports
QWeather 和风天气 ⭐⭐⭐⭐ Free+Paid API Key 中国地区天气数据

Recommended: OpenWeatherMap (Global coverage)

Quick Examples:

import requests

api_key = "YOUR_API_KEY"
city = "Beijing"

# 当前天气
url = f"https://api.openweathermap.org/data/2.5/weather?q={city}&appid={api_key}&units=metric"
response = requests.get(url)
data = response.json()

print(f"Temperature: {data['main']['temp']}°C")
print(f"Weather: {data['weather'][0]['description']}")

Get API Key: https://openweathermap.org/api

3. News & Media | 新闻与媒体

API Rating Cost Auth Data Coverage
NewsAPI ⭐⭐⭐⭐⭐ Free+Paid API Key Global news articles
GNews ⭐⭐⭐⭐ Free+Paid API Key News articles, search
MediaStack ⭐⭐⭐⭐ Free+Paid API Key News data

Recommended: NewsAPI

Quick Examples:

import requests

api_key = "YOUR_API_KEY"

# 获取头条新闻
url = f"https://newsapi.org/v2/top-headlines?country=us&apiKey={api_key}"
response = requests.get(url)
articles = response.json()['articles']

for article in articles[:5]:
    print(article['title'])

Get API Key: https://newsapi.org

4. Maps & Geolocation | 地图与地理定位

API Rating Cost Auth Data Coverage
OpenStreetMap Nominatim ⭐⭐⭐⭐⭐ Free None Geocoding, reverse geocoding
高德地图 API ⭐⭐⭐⭐⭐ Free+Paid API Key 中国地区地图、导航、POI
百度地图 API ⭐⭐⭐⭐ Free+Paid API Key 中国地区地图、导航
Google Maps API ⭐⭐⭐⭐ Paid API Key Global maps, places, routes

Recommended: Nominatim (Free, no auth) | 高德地图 (中国地区)

Nominatim Quick Examples:

import requests

# 地理编码(地址转坐标)
address = "Beijing, China"
url = f"https://nominatim.openstreetmap.org/search?q={address}&format=json"
response = requests.get(url, headers={'User-Agent': 'AgentApp'})
data = response.json()

print(f"Lat: {data[0]['lat']}, Lon: {data[0]['lon']}")

高德地图 Quick Examples:

import requests

api_key = "YOUR_API_KEY"
address = "北京市朝阳区"

# 地理编码
url = f"https://restapi.amap.com/v3/geocode/geo?address={address}&key={api_key}"
response = requests.get(url)
data = response.json()

print(data['geocodes'][0]['location'])

Get 高德 API Key: https://lbs.amap.com

5. E-commerce & Products | 电商与商品

API Rating Cost Auth Data Coverage
淘宝开放平台 ⭐⭐⭐⭐ Free+Paid OAuth 商品搜索, 订单
京东开放平台 ⭐⭐⭐⭐ Free+Paid OAuth 商品, 订单, 物流
Barcode Lookup ⭐⭐⭐ Free+Paid API Key Product info by barcode

Note: 电商API通常需要商家认证,普通用户可考虑爬取商品页面或使用第三方服务。

6. More domains coming soon... | 更多领域持续完善中

Planned additions:

  • Social Media APIs (Twitter, Weibo, Reddit)
  • Translation APIs
  • Image & Video APIs
  • Scientific & Research Data APIs
  • Government & Public Data APIs
  • Real Estate Data APIs
  • Job & Recruitment APIs

Contribute: If you know reliable APIs in other domains, help expand this skill!

🔄 Decision Flow | 决策流程

用户需要获取外部数据
    ↓
Step 1: 确定数据类型
├── 股票/金融 → 查看本 Skill 第1节
├── 天气 → 查看本 Skill 第2节
├── 新闻 → 查看本 Skill 第3节
├── 地图/位置 → 查看本 Skill 第4节
├── 电商/商品 → 查看本 Skill 第5节
└── 其他 → 搜索 RapidAPI / Public APIs
    ↓
Step 2: 选择合适的 API
├── 考虑因素:成本、认证难度、数据覆盖、稳定性
└── 优先选择免费/免认证的 API
    ↓
Step 3: 检查环境
├── Python库是否安装?→ pip install xxx
└── API Key是否获取?→ 引导用户注册
    ↓
Step 4: 调用 API 获取数据
    ↓
Step 5: 返回结构化结果

📊 Before vs After Comparison | 效果对比

Metric Web Scraping Using API
Speed 30-60 seconds 1-3 seconds
Token Cost High (entire HTML) Low (JSON only)
Accuracy Low (parsing errors) High (structured data)
Reliability Low (anti-scraping) High (stable API)
Maintenance High (page changes) Low (stable API)
指标 网页爬取 使用 API
速度 30-60 秒 1-3 秒
Token 成本 高(整个页面) 低(仅 JSON)
准确性 低(解析错误) 高(结构化数据)
稳定性 低(反爬机制) 高(稳定接口)
维护成本 高(页面变化) 低(稳定接口)

🔧 General Setup | 通用安装

Most APIs in this skill require Python. Basic setup:

# 常用数据获取库
pip install akshare yfinance requests pandas

# 可选:更多数据源
pip install tushare

🔍 External Resources | 外部资源

If the data type is not covered in this skill, search these directories:

Resource URL Description
RapidAPI https://rapidapi.com/hub Largest API marketplace
Public APIs https://github.com/public-apis/public-apis Free public APIs list
ProgrammableWeb https://www.programmableweb.com API directory

📝 Version | 版本

  • Version: 1.0.0
  • Created: 2026-03-13
  • Last Updated: 2026-03-13
  • Maintainer: Community
  • Contribution: Welcome to add more reliable data sources

Remember: API First, Scraping Last.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • 🔍 Find API | 寻找可靠数据源
    • ⚠️ Core Principle | 核心原则
    • 📋 Table of Contents | 目录
    • 1. Stock & Financial Data | 股票与金融数据
      • 1.1 A股市场 / Chinese A-Share Market
      • 1.2 港股市场 / Hong Kong Stock Market
      • 1.3 美股市场 / US Stock Market
      • 1.4 期货与衍生品 / Futures & Derivatives
      • 1.5 基金数据 / Fund Data
    • 2. Weather Data | 天气数据
    • 3. News & Media | 新闻与媒体
    • 4. Maps & Geolocation | 地图与地理定位
    • 5. E-commerce & Products | 电商与商品
    • 6. More domains coming soon... | 更多领域持续完善中
    • 🔄 Decision Flow | 决策流程
    • 📊 Before vs After Comparison | 效果对比
    • 🔧 General Setup | 通用安装
    • 🔍 External Resources | 外部资源
    • 📝 Version | 版本
  • 项目或源文件

相关 Skill

更多
Sponge Wallet Sponge Wallet Manages crypto wallets, transfers tokens, swaps on DEXes, checks balances, and accesses paid APIs (search, image gen, prediction markets, web scraping, document parsing, sales prospecting) via x402 micropayments. Use when the user asks about wallet balances, token transfers, swaps, blockchain payments, or paid API services.
Scrapfly SDK Go Scrapfly SDK Go Web scraping from Go with the Scrapfly SDK (`github.com/scrapfly/go-scrapfly`). Use when the user asks to scrape a URL, bypass anti-bot protection, render Ja...
Web Scraping Web Scraping 使用 web_fetch 提取简单页面的结构化信息,使用浏览器自动化处理动态页面、登录受限流程、分页、无限滚动等。
Web scraping skill using Chrome + WebMCP Web scraping skill using Chrome + WebMCP 使用 Chrome + WebMCP 进行网页抓取,是所有网页爬虫任务的主要方法。
freelance-autobot freelance-autobot Autonomous freelance hunter — finds gigs on FreeLanceDAO and CryptoGigs, scores them for fit, and auto-submits proposals. Also builds your CryptoGig profile and services compatibility: Zo Computer, Python 3, requests, web scraping