HasData

官方

为智能体结构化的实时网络数据

你可以用 HasData MCP 做什么?

  • 抓取网页 — 让您的助手抓取页面,并通过 hasdata 连接返回其内容。
  • 运行 Google 搜索 — 让模型执行 Google SERP 查询并获取结构化搜索结果。
  • 拉取市场数据 — 从 Amazon、Walmart 和 Shopify 等提供商处检索产品、评论和搜索数据。
  • 限制暴露的 API — 向端点添加 apis 参数,以便仅将您需要的提供商加载为工具。
  • 通过 OAuth 或 API 密钥连接 — 通过 HasData 登录进行身份验证,或为无人值守的代理发送 x-api-key 标头。

文档

MCP 服务器

通过模型上下文协议将 LLM 客户端和 AI 代理连接到 HasData。

HasData MCP 服务器 将 HasData 的抓取和搜索能力开放给任何支持模型上下文协议的客户端。将支持 MCP 的客户端(Claude、Codex、Cursor、VS Code、Windsurf、自定义代理等)指向 HasData 端点,你的模型即可抓取网页、运行 Google 搜索并获取结构化数据,无需编写 API 集成代码。

端点

https://mcp.hasdata.com/mcp

该服务器使用可流式 HTTP 传输。

身份验证

有两种连接方式:使用你的 HasData 账户登录,或发送 API 密钥。

使用你的 HasData 账户登录

支持 OAuth 的客户端无需你手动处理密钥即可连接:添加端点并按照登录提示操作。每个连接都会获得自己的 API 密钥,以客户端命名——在 API 密钥页面删除该密钥即可断开连接。

claude mcp add --transport http hasdata https://mcp.hasdata.com/mcp
# then run /mcp and authenticate
codex mcp add hasdata --url https://mcp.hasdata.com/mcp
codex mcp login hasdata
code --add-mcp '{"name":"hasdata","type":"http","url":"https://mcp.hasdata.com/mcp"}'
Settings → Connectors → Add custom connector → https://mcp.hasdata.com/mcp
Settings → MCP → Add custom MCP → https://mcp.hasdata.com/mcp

API 密钥

在 x-api-key 请求头中发送来自仪表板的密钥。适用于不支持 OAuth 的客户端以及无人值守的代理。

claude mcp add --transport http hasdata https://mcp.hasdata.com/mcp \
  --header "x-api-key: <your-api-key>"
// ~/.cursor/mcp.json
{
  "mcpServers": {
    "hasdata": {
      "url": "https://mcp.hasdata.com/mcp",
      "headers": { "x-api-key": "<your-api-key>" }
    }
  }
}
// ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "hasdata": {
      "serverUrl": "https://mcp.hasdata.com/mcp",
      "headers": { "x-api-key": "<your-api-key>" }
    }
  }
}
// cline_mcp_settings.json
{
  "mcpServers": {
    "hasdata": {
      "type": "streamableHttp",
      "url": "https://mcp.hasdata.com/mcp",
      "headers": { "x-api-key": "<your-api-key>" }
    }
  }
}
# ~/.codex/config.toml
[mcp_servers.hasdata]
url = "https://mcp.hasdata.com/mcp"
env_http_headers = { "x-api-key" = "HASDATA_API_KEY" }

任何其他支持可流式 HTTP 传输的客户端都以相同方式工作:将其指向端点并发送 x-api-key。没有有效凭据的请求会被拒绝,并返回 401 Unauthorized。

选择要公开的 API

默认情况下,服务器将所有 57 个 HasData API 作为工具公开,你的模型在每次调用时都会重新读取全部 57 个工具定义。添加 apis 参数以仅公开你需要的工具:

https://mcp.hasdata.com/api/mcp?apis=amazon,shopify

该连接只有 7 个工具,而不是 57 个。身份验证、计费和工具行为保持不变。

指定提供商名称可获取其所有 API,或指定单个 API——?apis=google_maps_search,web_scraping 会提供两个工具。

提供商单个 API
airbnbairbnb_listing, airbnb_property
amazonamazon_product, amazon_reviews, amazon_search, amazon_seller, amazon_seller_products
bingbing_serp
bookingbooking_place, booking_search
chatgptchatgpt_chat
duckduckgoduckduckgo_serp
facebookfacebook_profile
glassdoorglassdoor_job, glassdoor_listing
google_financegoogle_finance_finance
google_imagesgoogle_images_images
google_mapsgoogle_maps_contributor_reviews, google_maps_photos, google_maps_place, google_maps_posts, google_maps_reviews, google_maps_search
google_scholargoogle_scholar_case_law, google_scholar_cite, google_scholar_scholar
google_serpgoogle_serp_ai_mode, google_serp_ai_overview, google_serp_events, google_serp_immersive_product, google_serp_news, google_serp_product, google_serp_serp, google_serp_serp_light, google_serp_shopping, google_serp_short_videos
google_travelgoogle_travel_flights, google_travel_flights_deals, google_travel_hotels
google_trendsgoogle_trends_search
indeedindeed_job, indeed_listing
instagraminstagram_comments, instagram_posts, instagram_profile
perplexityperplexity_chat
redfinredfin_listing, redfin_property
shopifyshopify_collections, shopify_products
tiktoktiktok_comments, tiktok_posts, tiktok_profile, tiktok_search
tripadvisortripadvisor_place, tripadvisor_reviews, tripadvisor_search
walmartwalmart_product, walmart_reviews, walmart_search
web_scrapingweb_scraping_web_scraping
yellowpagesyellowpages_place, yellowpages_search
yelpyelp_place, yelp_reviews, yelp_search
youtubeyoutube_channel, youtube_search, youtube_transcript, youtube_video
zillowzillow_listing, zillow_property

拼写错误的名称会被忽略,其余名称仍会加载。如果所有名称都拼写错误,请求会失败并返回 400,同时列出有效的提供商。

计费

每次工具调用都会像直接 API 请求一样消耗 HasData 积分,从连接所附加的工作区中扣除。详情请参阅积分与并发。

本文档构建并托管于 Mintlify,一个开发者文档平台。