网页元数据提取 API 接入文档webmeta
提取网页的标题、描述、关键词、OG/Twitter Card、favicon,并自动识别使用的 30+ 项技术栈(React/Vue/Next.js/WordPress/Cloudflare 等)。适合 SEO 检测、技术调研、链接预览。
1. 基本信息
| 接口地址 | https://v1.apizero.cn/api/webmeta |
|---|---|
| 请求方法 | GET |
| 分类 | dev |
| 提供方 | 极数本源 |
| 计费模式 | 免费试用 |
| 单次消耗 | 0 积分 |
| 起步价 | — |
| QPS 限制 | 5 req/s |
| 每日免费额度 | 10000 次(已认证用户) |
| 匿名每日额度 | 5000 次(无 API Key) |
| VIP 免费 | 否 |
| 调用次数 |
2. 认证
匿名免登录可调每日 20 次;登录用户每日 100 次。
获取 API Key:登录 https://apizero.cn/account/keys
3. 请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
url | string | 是 | 网页 URL,自动补 https:// | https://baidu.com |
5. 请求示例
以下 5 种语言示例都是可直接运行的,只需把 YOUR_API_KEY 替换为实际 Key。
cURL
curl "https://v1.apizero.cn/api/webmeta?url=https%3A%2F%2Fbaidu.com&key=YOUR_API_KEY"Python
import requests
resp = requests.get(
"https://v1.apizero.cn/api/webmeta",
params={
"url": "https://baidu.com",
"key": "YOUR_API_KEY",
},
timeout=15,
)
resp.raise_for_status()
print(resp.json())JavaScript (Node.js)
// Node.js 18+ / 浏览器原生 fetch
const params = new URLSearchParams({
"url": "https://baidu.com",
"key": "YOUR_API_KEY",
});
const res = await fetch(`https://v1.apizero.cn/api/webmeta?${params}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://v1.apizero.cn/api/webmeta", nil)
q := req.URL.Query()
q.Set("url", "https://baidu.com")
q.Set("key", "YOUR_API_KEY")
req.URL.RawQuery = q.Encode()
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}PHP
<?php
$url = "https://v1.apizero.cn/api/webmeta?" . http_build_query([
"url" => "https://baidu.com",
"key" => "YOUR_API_KEY",
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
$body = curl_exec($ch);
curl_close($ch);
$data = json_decode($body, true);
print_r($data);6. 响应字段
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
url | string | 最终 URL(跟随重定向后) | — |
title | string | 网页标题 | — |
description | string | 描述(meta description) | — |
keywords | string | 关键词 | — |
og | object | Open Graph 标签集 | — |
twitter | object | Twitter Card 标签集 | — |
favicon | string | 图标 URL | — |
tech_stack | array | 识别出的技术栈列表 | — |
http_code | number | 响应状态码 | — |
7. 响应示例
{
"code": 0,
"msg": "成功",
"data": {
"url": "https:\/\/www.baidu.com\/",
"title": "百度一下,你就知道",
"tech_stack": [
"jQuery",
"Baidu Analytics"
],
"http_code": 200
}
}8. 错误码
| code | status | 说明 |
|---|---|---|
4000 | — | url 为空 / 格式错误 / 内网地址 |
5020 | — | 目标网页不可访问或返回 4xx/5xx |
9. 变更日志
- 1.0.0(2026-05-07)
- 首次上线 · 30+ 项技术栈识别
常见问题
网页元数据提取 接口怎么免费使用?
未登录用户每个 IP 每天 5000 次免费。登录用户创建 API Key 后每天 10000 次免费,超额部分按点数计费(0 点/次)。
网页元数据提取 支持哪些调用方式?
接口使用 GET 请求。文档提供 cURL、Python、JavaScript (Node.js)、Go、PHP 五种语言的可运行示例。也可以下载 /openapi.json 导入 Postman / Insomnia / Apifox 反向生成 SDK。
调用不限额么? QPS 是多少?
本接口 QPS 限制 5 req/s,每个 API Key 每日免费 10000 次。需要更高额度可升级 VIP 套餐或联系售后提高 QPS。
这个接口跟自己直连上游有什么区别?
极数本源 作为中间层提供:统一鉴权(一个 Key 调所有接口)、统一计费(点数制)、统一限流、统一错误码、多上游自动切换。免去逐个对接上游、维护 Key、统计调用量的运维成本。