接口总览
以下是当前可直接调用的公共业务接口。管理后台内部路由/api/admin/* 不属于公共 API。
/v1/analytics/ga4GA4 流量、渠道和落地页数据需要密钥/v1/analytics/gscGSC 搜索词和页面数据需要密钥/v1/serp通过私有 SerpAPI 账号池代理 Google 搜索需要密钥/v1/ahrefs-domain-rating查询域名或 URL 的 Ahrefs Domain Rating需要密钥/v1/aitdkAITDK domain traffic, Whois, and SEO event data需要密钥/v1/product-hunt/daily-products拉取 Product Hunt 指定日期的全部产品和产品 URL需要密钥/v1/url-redirect解析 HTTP(S) URL 的最终地址和完整跳转链需要密钥/v1/url-content抓取指定 URL 并转换为 Markdown 内容需要密钥/v1/keyword-volumesGoogle Ads 关键词历史指标需要密钥/v1/chrome2cf/*PXAny 浏览器/扩展采集通道需要密钥/v1/publishing/deliveries/{id}Substack、Medium 与 Beehiiv 冻结文稿、私有配图与一次性发布许可需要密钥/v1/extension/statusPXAny Chrome 扩展连接状态需要密钥/v1/on-page-seo-check/*检测扩展当前标签页,并按 page_id 读取关键词和历史报告需要密钥/v1/backlinks/settings外链库筛选组配置需要密钥/v1/backlinks/directory-submissions/plan外链表单分析后生成 AI 填写计划需要密钥/v1/backlinks/submission-guides/generate根据整页内容生成通用外链提交步骤和全部草稿需要密钥/v1/backlinks/directory-submissions/rewrite外链表单单字段按自定义要求重新生成草稿需要密钥/v1/backlinks/campaign-items/{itemId}/*博客评论任务准备、一次性提交许可、结果回写与人工继续需要密钥/v1/backlinks/*外链目标网站、任务创建、评论生成和结果回写需要密钥外部调用统一走 https://api.pxany.com/v1/*。 扩展不直接访问 Supabase,也不直接调用 Gemini。
身份鉴权
所有公共业务接口使用同一把私有密钥。请求头必须包含 Bearer Token。
Authorization: Bearer <PXANY_API_KEY>密钥只保存到服务端、Cloudflare Secret 或所有者本机环境。 示例、日志、文档和仓库中只允许出现占位符。
/v1/analytics/ga4 / /v1/analytics/gsc站点 Analytics
从最近一次同步的数据中读取 GA4 或 GSC 报告。
查询参数
sitestring / 必填已在 PXAny 中启用的标准站点域名。
daysinteger / 可选1 到 90 的整数,默认 28。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/analytics/ga4?site=<SITE_DOMAIN>&days=28"
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/analytics/gsc?site=<SITE_DOMAIN>&days=28"包含 totals、dailySeries、channelBreakdown 和 topLandingPages。
包含 totals、dailySeries、topQueries 和 topPages。
/v1/ahrefs-domain-ratingAhrefs Domain Rating
查询域名或 URL 当前的 Ahrefs DR。
查询参数
targetstring / 必填目标域名或 HTTP(S) URL,例如 example.com。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/ahrefs-domain-rating?target=example.com"/v1/aitdkAITDK
Proxy the former Cloudflare aitdk Worker through PXAny. The default response parses AITDK SSE events and also includes the raw upstream stream text.
Query parameters
domainstring / requiredDomain or HTTP(S) URL, for example htmltourl.com.
formatjson | sse / optionalDefaults to json. Use sse to stream the upstream event stream.
nonce / signature / timestampoptionalOmit these to let PXAny sign the upstream AITDK request with its stored API Account. Provide all three to forward a pre-signed request.
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/aitdk?domain=htmltourl.com"{
"data": {
"whois": {
"domain": "htmltourl.com",
"data": {
"objectClassName": "domain",
"handle": "3098391454_DOMAIN_COM-VRSN",
"ldhName": "HTMLTOURL.COM",
"links": [
{
"value": "https://rdap.verisign.com/com/v1/domain/HTMLTOURL.COM",
"rel": "self",
"href": "https://rdap.verisign.com/com/v1/domain/HTMLTOURL.COM",
"type": "application/rdap+json"
},
{
"value": "https://rdap.namecheap.com/domain/HTMLTOURL.COM",
"rel": "related",
"href": "https://rdap.namecheap.com/domain/HTMLTOURL.COM",
"type": "application/rdap+json"
}
],
"status": ["client transfer prohibited"],
"entities": [
{
"objectClassName": "entity",
"handle": "1068",
"roles": ["registrar"],
"links": [
{
"href": "http://www.namecheap.com",
"type": "text/html",
"value": "https://rdap.namecheap.com/",
"rel": "about"
}
],
"publicIds": [
{
"type": "IANA Registrar ID",
"identifier": "1068"
}
],
"vcardArray": [
"vcard",
[
["version", {}, "text", "4.0"],
["fn", {}, "text", "NameCheap, Inc."]
]
],
"entities": [
{
"objectClassName": "entity",
"roles": ["abuse"],
"vcardArray": [
"vcard",
[
["version", {}, "text", "4.0"],
["fn", {}, "text", ""],
["tel", { "type": "voice" }, "uri", "tel:+1.6613102107"],
["email", {}, "text", "abuse@namecheap.com"]
]
]
}
]
}
],
"events": [
{
"eventAction": "registration",
"eventDate": "2026-05-11T19:37:13Z"
},
{
"eventAction": "expiration",
"eventDate": "2027-05-11T19:37:13Z"
},
{
"eventAction": "last changed",
"eventDate": "2026-05-11T20:07:52Z"
},
{
"eventAction": "last update of RDAP database",
"eventDate": "2026-07-21T01:30:35Z"
}
],
"secureDNS": {
"delegationSigned": false
},
"nameservers": [
{
"objectClassName": "nameserver",
"ldhName": "ROAN.NS.CLOUDFLARE.COM"
},
{
"objectClassName": "nameserver",
"ldhName": "VAL.NS.CLOUDFLARE.COM"
}
],
"rdapConformance": [
"rdap_level_0",
"icann_rdap_technical_implementation_guide_1",
"icann_rdap_response_profile_1"
],
"cached": 1785667400864
}
},
"traffic": {
"domain": "htmltourl.com",
"data": {
"hostname": "htmltourl.com",
"title": "",
"description": "",
"cached": 1785667400862,
"overview": {
"bounceRate": "0.2031821140725134",
"month": "6",
"year": "2026",
"pagePerVisit": "6.7623626864547965",
"visits": "7268",
"timeOnSite": "305.59707482219966",
"hostname": "htmltourl.com",
"globalRank": 2034642,
"countryRank": 31298
},
"monthlyVisits": {
"2026-02-01": 0,
"2026-03-01": 0,
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 7268
},
"trafficSources": {
"socialOrganic": 0,
"socialPaid": 0,
"mail": 0,
"referrals": 0,
"searchOrganic": 0,
"searchPaid": 0,
"direct": 0,
"genAi": 0,
"affiliate": 0,
"displayAds": 0
},
"trafficSourceTrends": {
"direct": {
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 0
},
"search": {
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 0
},
"social": {
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 0
},
"referrals": {
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 0
},
"paidReferrals": {
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 0
},
"mail": {
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 0
},
"other": {
"2026-04-01": 0,
"2026-05-01": 0,
"2026-06-01": 0
}
},
"topKeywords": [
{
"name": "convert html to url online free",
"estimatedValue": 90,
"volume": 340,
"cpc": null
},
{
"name": "htmltourl",
"estimatedValue": 70,
"volume": 160,
"cpc": null
},
{
"name": "permanent html code to website link converter free",
"estimatedValue": 50,
"volume": 240,
"cpc": null
},
{
"name": "html в url",
"estimatedValue": 50,
"volume": 60,
"cpc": null
},
{
"name": "html code to url converter",
"estimatedValue": 40,
"volume": 110,
"cpc": null
}
],
"topRegions": [
{
"country": 356,
"name": "India",
"value": 0.6081085218092226
},
{
"country": 840,
"name": "United States",
"value": 0.3630825938044913
},
{
"country": 586,
"name": "Pakistan",
"value": 0.028808884386285635
}
],
"aiTraffic": {
"trends": []
}
}
},
"complete": {
"status": "DONE",
"duration": 64
}
},
"domain": "htmltourl.com",
"fetchedAt": "2026-08-02T10:43:21.022Z",
"ok": true,
"raw": "event: whois\ndata: {...}\n\nevent: traffic\ndata: {...}\n\nevent: complete\ndata: {...}\n\n",
"source": "aitdk",
"status": 200
}Callers only need PXANY_API_KEY and domain. PXAny generates the AITDK nonce, timestamp, and signature on the server.
/v1/product-hunt/daily-productsProduct Hunt
每天通过 Product Hunt 官方 v2 GraphQL API 拉取指定日期的全部产品, 重点返回每个产品的官网 URL。
查询参数
dateYYYY-MM-DD / 可选要同步的日期;不传时使用当前 UTC 日期。接口会转换成当天00:00:00.000Z 到 23:59:59.999Z 的查询范围。
featuredboolean / 可选不传时返回 Product Hunt API 在该日期范围内可见的全部 posts; 传 true 时只取 featured 产品。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/product-hunt/daily-products?date=2026-08-01"每个产品包含 productUrl、productHuntUrl、name、slug、tagline、votesCount 和 commentsCount。
Product Hunt developer token 保存在 API Accounts 的product_hunt账号中,调用方仍然只发送PXANY_API_KEY。
该接口调用Product Hunt API v2的 GraphQL 入口;字段按官方 posts 查询封装,按 postedAfter / postedBefore过滤指定日期。
/v1/url-redirectURL 重定向解析
跟随 HTTP 跳转和页面 Meta Refresh,返回最终网页地址、 规范化域名以及完整跳转链。
查询参数
urlstring / 必填需要解析的 HTTP 或 HTTPS URL,最长 2048 个字符。 参数应进行 URL 编码。
curl --fail-with-body --get \
-H "Authorization: Bearer $PXANY_API_KEY" \
--data-urlencode "url=https://httpbin.org/redirect/1" \
"https://api.pxany.com/v1/url-redirect"{
"canonical": null,
"checkedAt": "2026-08-06T00:00:00.000Z",
"contentType": "application/json",
"domain": "httpbin.org",
"finalUrl": "https://httpbin.org/get",
"inputUrl": "https://httpbin.org/redirect/1",
"loopDetected": false,
"redirectCount": 1,
"redirects": [
{
"durationMs": 1004,
"from": "https://httpbin.org/redirect/1",
"statusCode": 302,
"to": "https://httpbin.org/get",
"type": "http"
}
],
"server": "cloudflare",
"statusCode": 200,
"totalDurationMs": 1920,
"warnings": [],
"xRobotsTag": null
}错误响应
400 / 401请求错误URL 不合法、目标为本地地址,或者 API Key 无效。
429 / 502 / 503 / 504上游错误直连目标或备用重定向服务限流、返回异常、不可用或请求超时。
调用方只发送 PXANY_API_KEY。PXAny 先在服务端直接跟踪 公开 HTTP(S) 跳转;直连请求失败或结果不可用时,再依次串行调用 RedirectCheck 和 Unshortened。优秀新站的 Product Hunt URL 解析也复用同一逻辑。
/v1/serpSerp 搜索代理
通过 PXAny 私有 SerpAPI 账号池代理 Google 搜索。
查询参数
qstring / 必填搜索词,不能为空。
gl / hl / start / num / safe可选Google 地区、语言、分页、数量和安全搜索参数。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/serp?q=best+espresso+beans&gl=us&hl=en&num=10&start=0&safe=off"请求中不能传 api_key、engine、output;这些字段由 PXAny 接管。
/v1/url-contentURL 内容提取
抓取指定页面,并返回适合 Agent 消费的 Markdown 内容。遇到 Cloudflare 等验证页会返回 422,不会把验证页伪内容当作成功正文。
JSON 请求体
urlstring / 必填需要抓取的 HTTP 或 HTTPS URL,最长 2048 个字符。
curl --fail-with-body \
-X POST "https://api.pxany.com/v1/url-content" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"url": "https://example.com"
}'该公共接口不会调用所有者 Chrome。仅 `/publishing` 的内部读取流程会在 Browser Run 被验证页拦截后,通过 Chrome2CF 进行人工可见的浏览器兜底。
/v1/keyword-volumes关键词搜索量
生成 Google Ads 关键词历史指标和逐月搜索量。
JSON 请求体
keywordsstring[] / 必填至少一个非空关键词,重复项会被移除。
geoTargetId / languageIdstring / 必填Google Ads 地理位置和语言常量 ID;可使用 ALL。
keywordPlanNetwork / batchSize可选网络类型和批量大小。
curl --fail-with-body \
-X POST "https://api.pxany.com/v1/keyword-volumes" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"keywords": ["<KEYWORD_1>", "<KEYWORD_2>"],
"geoTargetId": "<GEO_TARGET_ID>",
"languageId": "<LANGUAGE_ID>",
"keywordPlanNetwork": "GOOGLE_SEARCH",
"batchSize": 100
}'/v1/chrome2cf/*chrome2cf 采集通道
PXAny 内置的浏览器/扩展采集通道。它负责连接 owner 侧 collector、排队任务和回收结果;当前支持 Semrush keyword_metrics、Google intitle 结果数,以及由 publishing 模块在用户手动确认或已开启的自动发布设置下派发的publishing.substack.publish.v1 / publishing.substack.verify.v1,以及 owner 自用的chatgpt 页面任务。旧的/semrush-keyword 网关路径已退役。
接口
GET /v1/chrome2cf/statuscollector 状态返回当前 collector 连接状态和 Durable Object 队列计数。
GET /v1/chrome2cf/jobs/{jobId}任务查询按任务 ID 查询 queued、running、succeeded 或 failed 状态。
POST /v1/chrome2cf/keyword-metricsSemrush 指标提交 keyword_metrics 采集任务。PXAny 的 one-minute cron 会自动用它处理数据库里的 pending keyword jobs;这个接口主要用于手动验证 collector 链路。
POST /v1/chrome2cf/intitleGoogle intitle提交 google_intitle 任务。collector 会新开一个后台标签页, 使用 intitle:"关键词" 执行 Google 精确短语搜索, 读取 Google 显示的近似结果数,然后关闭该任务标签页。
POST /v1/chrome2cf/chatgptChatGPT 页面任务接受 1–20,000 个字符的原始 prompt,每次在后台新建chatgpt.com 标签页和会话。结果可能包含文字、最多 4 张私有图片,或两者混合;拒绝文字也算正常文字输出。 任务必须轮询,queued/running 不含 success,只有存在可读取文字或成功保存图片时终态才为 success:true。
PUT/GET /v1/chrome2cf/jobs/{jobId}/images/{index}私有图片扩展只上传 PNG、JPEG 或 WebP(每张不超过 16 MiB,索引 1–4)。下载始终需要 Bearer 密钥,不生成公开 URL。PUT 只验证任务仍在 running;终态结果和 GET 才验证图片输出引用。 部分图片失败会留在 warnings 中,只要仍有其他输出任务就算成功。
ChatGPT 参数、轮询与错误
prompt必填去除首尾空白后必须为 1–20,000 个字符;发送时不追加“生成图片”等包装文字。
Idempotency-Key可选1–128 个可打印 ASCII 字符。相同 Key 和提示词返回原任务;换提示词返回 409。服务端只保存 Key 的 SHA-256。
success终态字段queued/running 不返回;succeeded 且至少有文字或图片为 true,失败或没有可用输出为 false。
chatgpt_login_required / chatgpt_captcha / chatgpt_request_blocked / chatgpt_rate_limited / chatgpt_page_changed / chatgpt_timeout稳定错误码页面未登录、可见验证码、接口暂时拒绝、请求频率受限、页面结构变化、十分钟超时,以及图片捕获/上传失败都会以稳定 code 返回;接口拒绝或限流会暂停新 ChatGPT 任务十分钟,错误中不会包含提示词或页面全文。
建议安装 pxany-extension/0.3.24,并由已连接的 owner collector 声明 chatgpt.page.v1。用户需要先在 Chrome 中自然登录 ChatGPT;登录或 CAPTCHA 时停止任务并保留诊断页,不尝试绕过。 插件在后台任务标签页中复用已登录页面的请求客户端。页面模块或响应结构变化可能返回 chatgpt_page_changed,不是官方 API SLA。
ChatGPT 会话请求在已登录页面内执行,页面凭据不传入 PXAny。文字和图片消耗用户自己的 ChatGPT 账户额度;PXAny 不承诺订阅额度可稳定变成第三方 API 配额。 API 调用者不会收到 Cookie、Token 或页面内部请求。
# 页面驱动的 ChatGPT 通用任务;提示词原样发送,不是 OpenAI 官方 API。
curl --fail-with-body -X POST "https://api.pxany.com/v1/chrome2cf/chatgpt" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: local-demo-001" \
--data '{"prompt":"生成一段关于未来城市的简短介绍"}'
# 轮询 Location 或 pollUrl,直到 succeeded / failed。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/chrome2cf/jobs/<CHATGPT_JOB_ID>"
# 图片结果通过同一个 Bearer 密钥下载,不能把 URL 当成公开地址。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/chrome2cf/jobs/<CHATGPT_JOB_ID>/images/1" --output chatgpt-1.png{
"id": "chatgpt:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"object": "chrome2cf.chatgpt.task",
"status": "succeeded",
"success": true,
"data": {
"outputs": [
{
"type": "text",
"text": "未来城市在清洁能源与立体交通中保持安静而高效。"
},
{
"type": "image",
"contentType": "image/png",
"url": "https://api.pxany.com/v1/chrome2cf/jobs/chatgpt%3A0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/images/1"
}
],
"warnings": [],
"conversationUrl": "https://chatgpt.com/c/example-conversation"
},
"error": null,
"createdAt": 1788240000000,
"startedAt": 1788240000100,
"finishedAt": 1788240012000,
"pollUrl": "/v1/chrome2cf/jobs/chatgpt%3A0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}插件通过 PUT /v1/chrome2cf/jobs/{id}/images/{index} 上传图片,使用相同的 Bearer 鉴权。任务必须正在执行,index 为 1–4,Content-Type 为 image/png、image/jpeg 或 image/webp,请求体为图片二进制,最大 16 MiB。相同任务、序号、类型及完全相同的字节可重复上传以恢复丢失的确认响应;不同图片返回 409,已有文件不会被覆盖。成功响应包含 contentType、index、size;类型错误返回 415,超限返回 413,存储异常返回 503。
curl -X PUT "https://api.pxany.com/v1/chrome2cf/jobs/chatgpt%3AEXAMPLE/images/1" -H "Authorization: Bearer YOUR_PXANY_API_KEY" -H "Content-Type: image/png" --data-binary @image.png
# 成功示例:{"contentType":"image/png","index":1,"size":1024}intitle 参数与错误
keyword必填1–200 个字符;接口会把它作为精确短语放入 intitle 查询。
400 / 401 / 404HTTP 错误分别表示参数无效、Bearer 密钥无效和任务不存在。collector 离线、Google 超时、验证码或页面无法解析会体现在任务的 failed 状态与 error 字段中。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/chrome2cf/status"{
"ok": true,
"service": "pxany.chrome2cf",
"status": {
"activeCollector": {
"connectedAt": 1785936000000,
"nodeId": "collector-main",
"status": "idle",
"version": "1.0.0"
},
"queue": {
"queued": 0,
"running": 0,
"succeeded": 12,
"failed": 1
}
}
}curl --fail-with-body \
-X POST "https://api.pxany.com/v1/chrome2cf/keyword-metrics" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"keywords": ["ai website builder", "html to url"],
"waitMs": 10000
}'{
"id": "7e7d5d51-8a1f-4574-9c46-767c6f21f3fb",
"action": "keyword_metrics",
"status": "succeeded",
"payload": {
"keywords": ["ai website builder", "html to url"]
},
"data": {
"data": [
{
"keyword": "ai website builder",
"success": true,
"volume": 2900,
"kd": 47,
"cpc": 3.21
}
]
},
"error": null,
"createdAt": 1785936000000,
"updatedAt": 1785936001200,
"startedAt": 1785936000100,
"finishedAt": 1785936001200,
"nodeId": "collector-main"
}curl --fail-with-body \
-X POST "https://api.pxany.com/v1/chrome2cf/intitle" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"keyword": "ai website builder"
}'{
"id": "17374851-9658-4fa7-a152-5b2de63dbfeb",
"action": "google_intitle",
"status": "succeeded",
"payload": {
"keyword": "ai website builder"
},
"data": {
"source": "google",
"keyword": "ai website builder",
"query": "intitle:\"ai website builder\"",
"intitleCount": 12500,
"resultStats": "About 12,500 results (0.31 seconds)",
"searchUrl": "https://www.google.com/search?q=intitle%3A%22ai+website+builder%22&hl=en&filter=0&pws=0",
"collectedAt": "2026-08-10T08:30:01.200Z"
},
"error": null,
"createdAt": 1786350600000,
"updatedAt": 1786350601200,
"startedAt": 1786350600100,
"finishedAt": 1786350601200,
"nodeId": "pxany-extension"
}/v1/publishing/deliveries/{id}Substack、Medium 与 Beehiiv 内容发布
通过 Chrome2CF 浏览器任务将后台已经冻结的素材发布到 Substack、Medium 个人主页或 Beehiiv 网页。可手动派发,也可由全局自动发布设置按当天排期派发;订阅邮件固定关闭且不发送 App 通知。插件接口只读取已经由后台派发的任务,没有公开的生成或发布触发接口。自动派发同样要求渠道能力、一次性提交许可及提交后的只读核验。后台操作统一在 内容发布。
鉴权、方法与参数
三个接口均发送 Authorization: Bearer <PXANY_API_KEY>,返回 Cache-Control: no-store。路径 id 是 PXAny Delivery UUID,不是渠道平台的远端 ID。
POST /v1/publishing/deliveries/{id}/startJSON插件实际开始执行时提交精确 jobId。Delivery 此前保持 queued 且没有租约;成功后才变为 publishing、attempt 加一并开始十分钟租约。同一活动 jobId 可幂等重试,旧任务或不匹配任务返回 409。
GET /v1/publishing/deliveries/{id}冻结文稿兼容读取活动中的冻结文稿。共同字段为标题、段落、来源 URL、publication 和三张有序私有图片。Medium 另有可选 subtitle、0–5 个 tags 与 paywall=false;Substack 省略这些字段。sendEmail 固定 false,audience 固定 everyone;不返回凭据、Cookie、原始资料快照或可变渠道配置。
GET /v1/publishing/deliveries/{id}/assets/{kind}图片字节kind 固定为 cover、infographic 或 website_screenshot。成功响应是 image/png 或 image/jpeg,最大 8 MiB。插件后台携带 Bearer 下载后粘贴到相应渠道;不能把密钥放入 URL,也不能在公开文章中引用这个私有图片接口。
POST /v1/publishing/deliveries/{id}/checkpointJSON必填 jobId 和 stage。stage=draft 时必填 draftId、draftUrl;stage=committing 使用已保存草稿;stage=confirmed 时必填 remoteId、remoteUrl。draft URL 必须是该 Delivery 对应渠道的草稿,public URL 必须是同一 publication 或 Medium 个人主页下的已公开文章;不接收任意脚本。
一次性许可与恢复
每个 checkpoint 必须匹配当前已派发任务。committing 检查任务所有权和十分钟租约,只有首次成功响应的 clickAllowed=true 才能点击一次。它不读取自动开关、发布日期或排期。重复请求返回 409;最终提交后只能核验,不重新领许可或点击;响应丢失、断线或超时也遵循这一边界。confirmed 必须基于实际公开页面、正文和图片核验,相同确认结果重复回报可成功。
发布配置按渠道定义字段,字段值从素材包选择。Substack 首次分发冻结标题、段落、来源网址,以及固定顺序的封面图、信息图、网站截图。Medium 个人主页首次分发还冻结 subtitle、0–5 tags 与 free paywall=false。三个渠道都要求三张图按 cover、infographic、website_screenshot 顺序完整;缺少任意一张都会阻止发布。
# 用现有任务的真实 delivery ID 替换 <DELIVERY_ID>;这里只读取,不触发发布。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/publishing/deliveries/<DELIVERY_ID>"
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/publishing/deliveries/<DELIVERY_ID>/assets/infographic" --output infographic.png{
"id": "a390d5a5-f0fd-4bd8-97da-a69a9b6b292a",
"jobId": "publishing:substack:a390d5a5-f0fd-4bd8-97da-a69a9b6b292a:1",
"publicationUrl": "https://example.substack.com",
"title": "A practical tool introduction",
"paragraphs": [
"A source-grounded introduction to the product."
],
"sourceUrl": "https://example.com/product",
"images": [
{
"kind": "cover",
"path": "/v1/publishing/deliveries/a390d5a5-f0fd-4bd8-97da-a69a9b6b292a/assets/cover",
"altText": "Product cover",
"caption": ""
},
{
"kind": "infographic",
"path": "/v1/publishing/deliveries/a390d5a5-f0fd-4bd8-97da-a69a9b6b292a/assets/infographic",
"altText": "Product workflow",
"caption": "Key workflow"
},
{
"kind": "website_screenshot",
"path": "/v1/publishing/deliveries/a390d5a5-f0fd-4bd8-97da-a69a9b6b292a/assets/website_screenshot",
"altText": "Product website",
"caption": "Official website"
}
],
"contentPackage": {
"title": "A practical tool introduction",
"shortText": "完整独立短文,用于需要短内容的分发渠道;长文仍由 blocks 表示。",
"excerpt": "A source-grounded introduction to the product.",
"seoTitle": "A practical tool introduction",
"seoDescription": "How this practical tool works and who it helps.",
"socialShort": "A practical tool introduction in one minute.",
"socialMedium": "A practical tool introduction with the key takeaways.",
"tags": [
"tools",
"workflow"
],
"blocks": [
{
"type": "heading",
"level": 2,
"text": "A practical tool introduction"
}
],
"images": [
{
"type": "cover",
"slot": "cover",
"prompt": "Editorial product illustration",
"altText": "Product illustration",
"caption": "Cover illustration"
}
],
"sourceUrl": "https://example.com/product",
"sourceFetchedAt": "2026-08-30T00:00:00.000Z",
"audio": [],
"video": []
},
"draftId": null,
"draftUrl": null,
"commitStartedAt": null,
"sendEmail": false,
"audience": "everyone"
}自动领取在数据库内原子检查同一目标、同一渠道所有素材版本的 Delivery 历史。前置配置或素材校验失败会持久化 failed Delivery(AUTOMATIC_VALIDATION_FAILED),下一分钟继续其他候选,修复后须手动发布。Cron 的 dispatched 包含 queued 与 publishing;queued/running 不代表文章已公开。Chrome2CF 全局最多同时运行 6 个任务,每种任务类型最多运行 1 个,其余按可执行 FIFO 排队;队首类型繁忙时不会阻塞其他空闲类型。状态接口只返回总数和 byLane 数量,不返回任务 payload。
# 以下是手动模拟格式,只能对已分配的测试任务按真实进度调用。
# start:插件实际开始执行时才领取十分钟租约;同一 jobId 的响应丢失可安全重试。
curl --fail-with-body -X POST "https://api.pxany.com/v1/publishing/deliveries/<DELIVERY_ID>/start" -H "Authorization: Bearer $PXANY_API_KEY" -H "Content-Type: application/json" --data '{"jobId":"publishing:substack:<DELIVERY_ID>:<ATTEMPT>"}'
# draft:草稿已创建且 ID/URL 已核对后保存。
curl --fail-with-body -X POST \
"https://api.pxany.com/v1/publishing/deliveries/<DELIVERY_ID>/checkpoint" \
-H "Authorization: Bearer $PXANY_API_KEY" -H "Content-Type: application/json" \
--data '{"jobId":"publishing:substack:<DELIVERY_ID>:<ATTEMPT>","stage":"draft","draftId":"12345","draftUrl":"https://example.substack.com/publish/post/12345"}'
# committing:会消耗一次性提交许可。不要重复请求,不要配置 curl --retry。
curl --fail-with-body -X POST \
"https://api.pxany.com/v1/publishing/deliveries/<DELIVERY_ID>/checkpoint" \
-H "Authorization: Bearer $PXANY_API_KEY" -H "Content-Type: application/json" \
--data '{"jobId":"publishing:substack:<DELIVERY_ID>:<ATTEMPT>","stage":"committing"}'
# confirmed:只有已实际核验公开文章、正文和配图后才能回报。
curl --fail-with-body -X POST \
"https://api.pxany.com/v1/publishing/deliveries/<DELIVERY_ID>/checkpoint" \
-H "Authorization: Bearer $PXANY_API_KEY" -H "Content-Type: application/json" \
--data '{"jobId":"publishing:substack:<DELIVERY_ID>:<ATTEMPT>","stage":"confirmed","remoteId":"12345","remoteUrl":"https://example.substack.com/p/practical-tool"}'draft: {"clickAllowed":false,"status":"publishing"}
committing: {"clickAllowed":true,"status":"publishing"}
confirmed: {"clickAllowed":false,"status":"published"}错误响应
400:非法 UUID、JSON、参数或 URL;401:缺失或错误 Bearer;404:文章或图片不存在;409:旧 job、租约过期、并发操作、状态冲突或许可已领取;503:数据库、图片存储或发布执行器暂不可用。响应使用 application/problem+json,包含 status、title、detail、requestId;发布业务错误还带安全 code,不返回凭据或第三方原始错误。
{
"type": "https://api.pxany.com/errors/conflict",
"title": "Conflict",
"status": 409,
"detail": "当前任务或文章状态不允许此操作,请刷新后重试;已提交的文章只能重新核验。",
"code": "STATE_CONFLICT",
"requestId": "example-request-id"
}c2CF 发布动作
Beehiiv 文稿另含 subtitle、seoDescription、publishToEmail=false、platform="web" 和 displayThumbnailOnWeb=false;发布器保存并读回三图正文,确认无邮件收件人数且关闭社区发布,再领取最终提交许可。Beehiiv draftId 是 UUID,草稿地址为 https://app.beehiiv.com/posts/<UUID>/edit,成功地址必须为配置的 publicationUrl 下的 /p/<slug>。
插件握手声明 capabilities=["publishing.substack.publish.v1","publishing.substack.verify.v1","publishing.medium.publish.v1","publishing.medium.verify.v1","publishing.beehiiv.publish.v1","publishing.beehiiv.verify.v1"];缺失时需要更新插件。publish 动作执行准备与一次性提交;verify 动作只核验,不写编辑器、不提交。三个渠道动作共用现有 WebSocket,最长十分钟;最终提交后断线不会自动重排发布。
{
"action": "publishing.substack.publish.v1",
"id": "publishing:substack:a390d5a5-f0fd-4bd8-97da-a69a9b6b292a:1",
"payload": {
"deliveryId": "a390d5a5-f0fd-4bd8-97da-a69a9b6b292a",
"postId": "9b4769e5-b784-4a63-9b78-dab4b775d574",
"channel": "substack",
"deadline": "2026-09-23T01:10:00.000Z"
}
}{
"action": "publishing.medium.publish.v1",
"id": "publishing:medium:a390d5a5-f0fd-4bd8-97da-a69a9b6b292a:1",
"payload": {
"deliveryId": "a390d5a5-f0fd-4bd8-97da-a69a9b6b292a",
"postId": "9b4769e5-b784-4a63-9b78-dab4b775d574",
"channel": "medium",
"deadline": "2026-09-23T01:10:00.000Z"
}
}任务 ID 格式为 publishing:<channel>:<deliveryUUID>:<attempt>,payload 必含 deliveryId、postId、channel,以及 Hub 在实际派发时生成的 deadline。verify 使用相同 payload,分别改为 publishing.substack.verify.v1 、publishing.medium.verify.v1 或 publishing.beehiiv.verify.v1。收到任务后先调用 start,再读取配图和调用 checkpoint;start 只是执行握手,不是公开发布触发入口。
# 发布动作只能由 publishing 模块调度;没有公开的提交发布任务接口。
# 读取执行器能力和已有任务状态:
curl --fail-with-body -H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/chrome2cf/status"
curl --fail-with-body -H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/chrome2cf/jobs/publishing:substack:<DELIVERY_ID>:<ATTEMPT>"后台接口
PATCH /api/admin/publishing/settings 保存素材语言、AI 提示词、全局自动发布开关及 Asia/Shanghai 每日开始时间;PATCH /api/admin/publishing/channels/{channel} 独立保存指定渠道地址、language 与素材字段映射,POST channels/{channel}/preview 只读预览该映射的内容。POST /api/admin/publishing/targets 只接受网站 url;targets/{id}/prepare 每次对账同一个持久化 ChatGPT 生成任务,失败不会自动重投,retry-generation 才能在版本 CAS 通过后解锁新 attempt;posts/{id}/regenerate 会在安全 Delivery 前重新生成素材。posts/{id}/deliveries/{channel}/publish 手动派发冻结 Delivery,deliveries/{id}/sync 只同步已有插件任务,deliveries/{id}/verify 只核验已有 commit_started_at 的不确定提交。每分钟 Cron 最多自动处理一个当天到期、素材已就绪且没有 Delivery 历史的渠道;失败或结果未知不会自动重试。后台使用管理员 Cookie;修改请求必须同源,不接受公开 API 密钥代替登录。
/v1/extension/statusPXAny Chrome 扩展状态
用于测试扩展与 PXAny API 的公共连接,并返回当前可用模块。 当前返回 backlinks、chrome2cf 和on-page-seo-check。
参数
无GET仅需要 Bearer 鉴权。
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/extension/status"{
"name": "PXAny",
"status": "ok",
"modules": ["backlinks", "chrome2cf", "on-page-seo-check"]
}/v1/on-page-seo-check/*On Page SEO Check
供 PXAny Chrome 扩展的独立 SEO 面板使用。扩展直接采集当前标签页渲染后的 DOM 快照,pageId 用于读取 1 个核心词、按搜索量排序的最多 5 个相关词; 其余关键词全部按长尾词检查。 当前页可以是 localhost、预览环境或任意 HTTP(S) URL,不要求与 page_id 登记域名一致,浏览器也不会接触 Supabase Service Role Key。
接口
POST /v1/on-page-seo-check/runs执行检测JSON 请求体包含 pageId 和扩展当前标签页的snapshot。服务端直接分析该 DOM,不重新抓 URL,也不做域名限制; 成功返回 201 和完整报告,只有检测成功才写入历史。
GET /v1/on-page-seo-check/runs/{runId}单次报告读取指定历史运行的完整评分、关键词分层、逐项结论和抓取统计。
GET /v1/on-page-seo-check/history?pageId=123历史趋势返回最近 20 次摘要以及最新完整报告;从未检测时history 为空且 run 为 null。
新报告使用 on-page-seo-check-v3 契约:核心词严格检查 Title、Description、H1、URL、开头和正文,并独立决定聚焦度封顶;相关词重点检查 H2/H3 与对应段落正文;长尾词只检查正文完整词组覆盖,不要求进入 TDK。 每个关键词同时返回 Google KGR、Semrush KGR、Semrush eKGR 和 Semrush KD 作为选词参考; 这四个数据库指标不参与页面聚焦度或总分计算,缺失时返回 null。densityRankings 返回正文 1–5 gram 的前 20 个连续词组及其出现次数、密度和名次;targetDensity 将核心词与相关词的精确词组密度合并为一个词族,长尾词不参与合并。 词族状态包含 missing、low、base、focused、high 和 stuffing_risk,其中 3%–5% 标记为 focused; 这些状态只用于诊断提示,不参与页面聚焦度或总分计算。 报告还包括 0–100 总分、正文词数/noindex 封顶、关键词分层对比、 7 类分类分和逐项整改建议。DOM 快照 UTF-8 体积上限 2 MB,原始快照不写入历史。 仅凭 DOM 无法可靠取得的跳转链、robots.txt、Sitemap 和 SSR/CSR 等技术项显示为 N/A, 不进入分类分母。
curl --fail-with-body \
-X POST "https://api.pxany.com/v1/on-page-seo-check/runs" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"pageId": 123,
"snapshot": {
"pageUrl": "http://localhost:3000/preview",
"contentType": "text/html",
"html": "<html><body>Current rendered page</body></html>",
"responseStatus": 200,
"responseTimeMs": 120
}
}'curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/on-page-seo-check/history?pageId=123"{
"run": {
"runId": 42,
"pageId": 123,
"url": "https://example.com/tools/compress",
"targetKeywords": ["image compressor", "compress image online"],
"focusKeyword": "image compressor",
"rawScore": 84,
"finalScore": 75,
"focusScore": 78,
"grade": "pass",
"wordCount": 512,
"scoringVersion": "on-page-seo-check-v3",
"createdAt": "2026-08-09T09:30:00.000Z",
"report": {
"version": "on-page-seo-check-v3",
"scores": {
"raw": 84,
"final": 75,
"focus": 78,
"grade": "pass",
"appliedCaps": [
{"cap": 75, "reason": "Visible body content is below 600 words."}
]
},
"categories": [],
"keywordFocus": [],
"densityRankings": {
"1": [{"phrase": "image", "count": 20, "density": 3.91, "rank": 1}],
"2": [{"phrase": "image compressor", "count": 6, "density": 2.34, "rank": 1}],
"3": [],
"4": [],
"5": []
},
"targetDensity": {
"phrases": [
{"phrase": "image compressor", "role": "core", "count": 6, "density": 2.34},
{"phrase": "compress image online", "role": "related", "count": 2, "density": 1.17}
],
"totalCount": 8,
"totalDensity": 3.51,
"status": "focused"
},
"checks": [],
"crawl": {},
"page": {},
"stats": {},
"generatedAt": "2026-08-09T09:30:00.000Z"
}
}
}/v1/backlinks/*外链发布工作流
供 PXAny Chrome 扩展使用。旧版单次评论生成仍只返回草稿;博客评论任务则由后台排期, 插件先检测页面、获取冻结文案和一次性提交许可,再回写公开、待审核或异常结果。 扩展不直接访问 Supabase 或 Gemini,异常时整个任务暂停并保留标签页等待人工继续。
接口列表
GET /v1/backlinks/sitesactive 网站返回 PXAny 后台 status 为 active 的网站资料;网站地址由domain 计算,并返回可编辑的 anchorTexts、productDescription、websiteScreenshotUrl、shareImageUrl 和 logoUrl,供扩展只读显示、 预览,并在手动提交时复制或补齐。
PATCH /v1/backlinks/sites/{siteId}更新发布资料请求体包含 websiteUrl、commenterName、commenterEmail、productDescription 和anchorTexts。图片地址不接受人工提交;PXAny 后台使用 Cloudflare 自动截图,并按 og:image、twitter:image、截图回退的顺序生成分享图。websiteUrl 可传完整 URL 或裸域名,PXAny 会保存归一化域名。
GET / PATCH /v1/backlinks/settings筛选组配置读取或完整替换扩展外链库的筛选组列表。PATCH 需要提交完整的libraryFilterGroups 数组;每一组都包含稳定的id、展示用 label 和完整的filters 对象。filters 支持qualityScoreMin / qualityScoreMax表示 0-5 的人工关注度区间,也支持 DR、月流量、搜索/直接占比、任务状态、外链属性、付费属性、网站类型和外链方式。数据库是唯一持久化来源,扩展重载后会重新读取这份列表。
GET /v1/backlinks/resources外链库返回数据库中的外链资源列表,供 Chrome 扩展外链库筛选展示。可选传入siteId 查询参数;传入后每条资源会返回当前网站的publicationStatus 和 siteStatus。 列表按 qualityScore 从高到低返回;qualityScore 是 0-5 的人工关注度;0 代表未关注, 1-5 代表关注度递增,越高越适合优先处理。publicationStatus 只可能是 detecting、published 或 null;对应提交记录的手动备注通过publicationRemark 返回。siteStatus只用于表示 unsuitable 排除状态。linkMethod 支持 blog_comment、resource_page、forum_post、directory_submission、content_edit、guest_blog、profile、qa_answer、social_profile 和 press_release。 无法归入标准方式时返回 other。siteType 还支持 podcast、marketplace、community 和other。
PATCH /v1/backlinks/resources/{resourceId}修改资源地址只修改外链资源的 url,用于 Chrome 扩展里人工把地址调整为更准确的规范 URL。 请求体必须包含绝对 http/https 地址;规范化后必须仍属于原资源的同一域名, 否则返回 400 application/problem+json。接口会移除 URL hash 和常见 tracking 参数,保留 DR、AITDK 流量、搜索占比、直接占比和更新时间等指标字段;如果规范 URL 已被另一条资源占用,当前编辑的资源作为最新数据保留。
GET /v1/backlinks/resources/{resourceId}/example真实发布案例需要 Authorization: Bearer $PXANY_API_KEY;路径参数resourceId 必须是正整数。接口按资源域名读取一条最近采集的真实 Semrush 外链记录,返回同一行中的 sample_backlink_url、sample_anchor_text 和 sample_target_url,供 Chrome 扩展在资源地址下方展示来源页、锚文本和目标页。资源没有探索案例时返回{"example": null};资源不存在返回 404,参数错误返回 400, API Key 缺失或无效返回 401。
DELETE /v1/backlinks/resources/{resourceId}删除资源从外链库删除废弃资源。删除成功后返回被删除的resource;相关发布记录和站点资源状态会一并删除。 常用于 Chrome 扩展访问资源后确认页面已失效的场景。
GET /v1/backlinks/resources/{resourceId}/site-status跨项目处理结果返回这条外链在各项目中的处理结果,供 Chrome 扩展项目下拉菜单展示detecting、published 或 unsuitable。 没有处理记录的项目不会出现在 statuses 数组中。
PATCH /v1/backlinks/resources/{resourceId}/site-status发布或排除状态请求体必须包含 siteId 和 status。status 只支持 detecting、published、unsuitable:前两者创建或更新 当前资源/网站的唯一发布记录;unsuitable 会删除这条发布记录, 并把资源从当前网站排除。可同时保存检测出的评论 URL、Follow 属性等字段。
PATCH /v1/backlinks/resources/{resourceId}/verification修改核验数据只更新人工核验字段,包括 siteType、linkMethod、language、linkFollow、loginRequired、paidRequired、qualityScore、anchorText 和remark。除 qualityScore 会清空为 0 外, 其他字段传 null 或空字符串会清空为未知;接口会刷新verificationUpdatedAt。
POST /v1/backlinks/resources/{resourceId}/metrics/refresh刷新指标数据触发一次 Ahrefs DR 和 AITDK 流量补数;成功后更新指标字段和metricsUpdatedAt,不修改核验字段。
POST /v1/backlinks/directory-submissions/plan外链表单 AI 填表规划供 PXAny Chrome 扩展的“AI 分析当前页”调用。请求体包含siteId、resourceId 和内容脚本提取出的snapshot。每个下拉框、单选组和复选组都会把全部候选项的显示文字与实际 value key 交给 AI,AI 只能返回页面存在的 key。接口接受非博客评论外链资源;博客评论继续使用专用评论生成流程。返回可自动填写字段、 unresolved 字段和 warnings;不会创建或更新 publication 数据,也不会自动提交第三方表单。
POST /v1/backlinks/directory-submissions/rewrite外链表单单字段重写请求体包含 siteId、resourceId、pageUrl、当前字段 control、原草稿assignment 和用户自定义 instruction。 支持 title/site_name、description、tags、category 和通用 selection;选择题只能返回当前页面存在的 option value key。URL、作者、邮箱等精确资料字段不能重写。
POST /v1/backlinks/publications/generate生成评论草稿请求体包含 siteId 和当前页 pageContext;resourceId 可选。未提供资源时也会按当前页面内容调用 Gemini 返回评论 draft,但不会创建资源或保存检测结果;提供资源时仍要求 当前 URL 与 blog + blog_comment 记录完全匹配,手动提交后可通过 资源状态接口保存 detecting 或 published。
POST /v1/backlinks/campaign-items/{itemId}/prepare准备自动评论文档仅供后台已经分派的插件任务调用。插件先打开真实页面并通过标准 WordPress 表单预检,再提交 pageContext;服务端只生成并固化一次 Gemini 评论草稿,重复请求返回同一份文档。
POST /v1/backlinks/campaign-items/{itemId}/checkpoint一次性提交许可与结果回写stage=committing 原子领取一次性提交许可。服务端写入commitStartedAt 后,任何重连、重试或人工继续都只能核验, 不得再次点击提交。stage=result 回写 published、pending_moderation、verification_missing、unsupported 或 needs_attention。
POST /v1/backlinks/campaign-items/{itemId}/continue人工处理后继续异常会暂停整个任务并保留插件标签页。所有者在页面完成登录、验证码或其他人工处理后, 从插件点击继续;接口只恢复原任务和原 Job ID,不创建新的盲目提交。
资源列表示例
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/backlinks/resources?siteId=1"{
"resources": [
{
"id": 501,
"url": "https://example.com/post",
"domain": "example.com",
"anchorText": "PXAny",
"dr": 35,
"aitdkMonthlyVisits": 7268,
"aitdkSearchTrafficShare": 0.18,
"aitdkDirectTrafficShare": 0.42,
"aitdkCheckedAt": "2026-08-02T10:43:21.022Z",
"metricsUpdatedAt": "2026-08-02T10:43:21.022Z",
"siteType": "blog",
"linkMethod": "blog_comment",
"language": "en",
"linkFollow": "nofollow",
"loginRequired": null,
"paidRequired": null,
"remark": "Good contextual blog comment target.",
"reviewStatus": "fulldata",
"publicationStatus": "published",
"publicationRemark": "您的产品计划于 2027 年 2 月 13 日发布。",
"siteStatus": null,
"siteStatusRemark": null,
"siteStatusUpdatedAt": null,
"verificationUpdatedAt": "2026-08-03T08:42:10.000Z"
}
]
}curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/backlinks/resources/501/example"{
"example": {
"backlinkUrl": "https://source.example/reviews/b2b-tools",
"anchorText": "TrustRadius",
"targetUrl": "https://trustradius.com/products/example"
}
}{
"example": null
}curl --fail-with-body \
-X PATCH "https://api.pxany.com/v1/backlinks/resources/501" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"url": "https://example.com/post?ref=directory"
}'{
"resource": {
"id": 501,
"url": "https://example.com/post?ref=directory",
"domain": "example.com",
"anchorText": "PXAny",
"dr": 35,
"aitdkMonthlyVisits": 7268,
"aitdkSearchTrafficShare": 0.18,
"aitdkDirectTrafficShare": 0.42,
"aitdkCheckedAt": "2026-08-02T10:43:21.022Z",
"metricsUpdatedAt": "2026-08-02T10:43:21.022Z",
"siteType": "blog",
"linkMethod": "blog_comment",
"language": "en",
"linkFollow": "nofollow",
"loginRequired": null,
"paidRequired": null,
"publicationStatus": null,
"publicationRemark": null,
"remark": "Good contextual blog comment target.",
"reviewStatus": "fulldata",
"siteStatus": null,
"siteStatusRemark": null,
"siteStatusUpdatedAt": null,
"verificationUpdatedAt": "2026-08-03T08:42:10.000Z"
}
}curl --fail-with-body \
-X DELETE "https://api.pxany.com/v1/backlinks/resources/501" \
-H "Authorization: Bearer $PXANY_API_KEY"{
"resource": {
"id": 501,
"url": "https://example.com/post",
"domain": "example.com",
"anchorText": "PXAny",
"dr": 35,
"aitdkMonthlyVisits": 7268,
"aitdkSearchTrafficShare": 0.18,
"aitdkDirectTrafficShare": 0.42,
"aitdkCheckedAt": "2026-08-02T10:43:21.022Z",
"metricsUpdatedAt": "2026-08-02T10:43:21.022Z",
"siteType": "blog",
"linkMethod": "blog_comment",
"language": "en",
"linkFollow": "dofollow",
"loginRequired": false,
"paidRequired": false,
"publicationStatus": null,
"publicationRemark": null,
"remark": "Dead page removed from the Chrome extension.",
"reviewStatus": "fulldata",
"siteStatus": null,
"siteStatusRemark": null,
"siteStatusUpdatedAt": null,
"verificationUpdatedAt": "2026-08-04T11:06:00.000Z"
}
}curl --fail-with-body \
-X PATCH "https://api.pxany.com/v1/backlinks/resources/501/verification" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"siteType": "blog",
"linkMethod": "blog_comment",
"language": "en",
"linkFollow": "dofollow",
"loginRequired": false,
"paidRequired": false,
"qualityScore": 4,
"anchorText": "PXAny",
"remark": "Verified from the Chrome extension side panel."
}'{
"resource": {
"id": 501,
"url": "https://example.com/post",
"domain": "example.com",
"anchorText": "PXAny",
"dr": 35,
"aitdkMonthlyVisits": 7268,
"aitdkSearchTrafficShare": 0.18,
"aitdkDirectTrafficShare": 0.42,
"aitdkCheckedAt": "2026-08-02T10:43:21.022Z",
"metricsUpdatedAt": "2026-08-02T10:43:21.022Z",
"siteType": "blog",
"linkMethod": "blog_comment",
"language": "en",
"linkFollow": "dofollow",
"loginRequired": false,
"paidRequired": false,
"publicationStatus": null,
"publicationRemark": null,
"remark": "Verified from the Chrome extension side panel.",
"reviewStatus": "fulldata",
"siteStatus": null,
"siteStatusRemark": null,
"siteStatusUpdatedAt": null,
"verificationUpdatedAt": "2026-08-04T11:06:00.000Z"
}
}curl --fail-with-body \
-X PATCH "https://api.pxany.com/v1/backlinks/resources/501/site-status" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"siteId": 1, "status": "unsuitable", "remark": "Needs login to comment."}'{
"resourceStatus": {
"publicationStatus": null,
"resourceId": 501,
"siteId": 1,
"siteStatus": "unsuitable"
}
}curl --fail-with-body \
"https://api.pxany.com/v1/backlinks/resources/501/site-status" \
-H "Authorization: Bearer $PXANY_API_KEY"{
"statuses": [
{
"publicationStatus": "published",
"resourceId": 501,
"siteId": 1,
"siteStatus": null
},
{
"publicationStatus": null,
"resourceId": 501,
"siteId": 2,
"siteStatus": "unsuitable"
}
]
}curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/resources/501/metrics/refresh" \
-H "Authorization: Bearer $PXANY_API_KEY"{
"resource": {
"id": 501,
"url": "https://example.com/post",
"domain": "example.com",
"dr": 35,
"aitdkMonthlyVisits": 7268,
"aitdkSearchTrafficShare": 0.18,
"aitdkDirectTrafficShare": 0.42,
"aitdkCheckedAt": "2026-08-02T10:43:21.022Z",
"metricsUpdatedAt": "2026-08-02T10:43:21.022Z",
"siteType": "blog",
"linkMethod": "blog_comment",
"language": "en",
"linkFollow": "nofollow",
"loginRequired": null,
"paidRequired": null,
"publicationStatus": null,
"publicationRemark": null,
"reviewStatus": "fulldata",
"siteStatus": null,
"siteStatusRemark": null,
"siteStatusUpdatedAt": null,
"verificationUpdatedAt": "2026-08-03T08:42:10.000Z"
}
}自动博客评论执行接口
curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/campaign-items/<ITEM_UUID>/prepare" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"jobId": "backlink-comment:<ITEM_UUID>:1",
"pageContext": { "pageUrl": "https://example.com/post", "pageTitle": "Example article" }
}'curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/campaign-items/<ITEM_UUID>/checkpoint" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{ "jobId": "backlink-comment:<ITEM_UUID>:1", "stage": "committing" }'curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/campaign-items/<ITEM_UUID>/continue" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{ "jobId": "backlink-comment:<ITEM_UUID>:1" }'这些请求用于手动模拟协议排查,不是创建任务的入口。任务在 PXAny 后台创建; 外部调用必须使用当前 item UUID 与当前 Job ID,否则返回 409。400 表示参数错误, 401 表示密钥错误,404 表示任务不存在,409 表示状态或 Job 冲突,503 表示生成服务暂不可用。
结果状态
curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/backlinks/sites"{
"sites": [
{
"id": 1,
"name": "PXAny",
"domain": "pxany.com",
"anchorTextCount": 3,
"anchorTexts": ["PXAny", "AI website builder", "website generator"],
"commenterName": "PXAny",
"commenterEmail": "name@example.com",
"logoUrl": "https://www.google.com/s2/favicons?domain=pxany.com&sz=128",
"productDescription": "PXAny helps ship and operate AI-assisted websites.",
"shareImageUrl": "https://pxany.com/images/og.png",
"websiteScreenshotUrl": "https://pxany.com/images/screenshot.png",
"websiteUrl": "https://pxany.com"
}
]
}curl --fail-with-body \
-X PATCH "https://api.pxany.com/v1/backlinks/sites/1" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"websiteUrl": "https://pxany.com",
"commenterName": "PXAny",
"commenterEmail": "name@example.com",
"productDescription": "PXAny helps ship and operate AI-assisted websites.",
"anchorTexts": ["PXAny", "AI website builder", "website generator"]
}'{
"site": {
"id": 1,
"name": "PXAny",
"domain": "pxany.com",
"anchorTextCount": 3,
"anchorTexts": ["PXAny", "AI website builder", "website generator"],
"commenterName": "PXAny",
"commenterEmail": "name@example.com",
"logoUrl": "https://www.google.com/s2/favicons?domain=pxany.com&sz=128",
"productDescription": "PXAny helps ship and operate AI-assisted websites.",
"shareImageUrl": "https://pxany.com/images/og.png",
"websiteScreenshotUrl": "https://pxany.com/images/screenshot.png",
"websiteUrl": "https://pxany.com"
}
}curl --fail-with-body \
-H "Authorization: Bearer $PXANY_API_KEY" \
"https://api.pxany.com/v1/backlinks/settings"
curl --fail-with-body \
-X PATCH "https://api.pxany.com/v1/backlinks/settings" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"settings": {
"libraryFilterGroups": [
{
"id": "directory",
"label": "导航站",
"filters": {
"siteType": "directory",
"linkMethod": "directory_submission",
"drMin": "15",
"usageStatuses": ["unused"],
"drMax": "",
"monthlyVisitsMin": "",
"monthlyVisitsMax": "",
"qualityScoreMin": "3",
"qualityScoreMax": "5",
"searchTrafficShareMin": "",
"searchTrafficShareMax": "",
"directTrafficShareMin": "",
"directTrafficShareMax": "",
"linkFollows": [],
"paidStatuses": []
}
}
]
}
}'{
"settings": {
"libraryFilterGroups": [
{
"id": "directory",
"label": "导航站",
"filters": {
"directTrafficShareMax": "",
"directTrafficShareMin": "",
"drMax": "",
"drMin": "15",
"linkFollows": [],
"linkMethod": "directory_submission",
"monthlyVisitsMax": "",
"monthlyVisitsMin": "",
"paidStatuses": [],
"qualityScoreMax": "5",
"qualityScoreMin": "3",
"searchTrafficShareMax": "",
"searchTrafficShareMin": "",
"siteType": "directory",
"usageStatuses": ["unused"]
}
},
{
"id": "blog_comment",
"label": "博客评论",
"filters": {
"directTrafficShareMax": "",
"directTrafficShareMin": "20",
"drMax": "",
"drMin": "10",
"linkFollows": ["dofollow"],
"linkMethod": "blog_comment",
"monthlyVisitsMax": "",
"monthlyVisitsMin": "1000",
"paidStatuses": [],
"qualityScoreMax": "",
"qualityScoreMin": "",
"searchTrafficShareMax": "",
"searchTrafficShareMin": "20",
"siteType": "blog",
"usageStatuses": ["unused"]
}
}
]
}
}curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/publications/generate" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"siteId": 1,
"resourceId": 501,
"pageContext": {
"pageUrl": "https://example.com/post",
"pageTitle": "Example article",
"pageDescription": "Short article description",
"mainHeadings": ["Example heading"],
"pageText": "Visible page summary"
}
}'{
"draft": {
"generatedComment": "Natural comment with <a href=\"https://pxany.com\">PXAny</a>.",
"pageContext": {
"pageUrl": "https://example.com/post"
},
"resourceId": 501,
"selectedAnchorText": "PXAny",
"siteId": 1,
"targetUrl": "https://pxany.com"
}
}curl --fail-with-body \
-X PATCH "https://api.pxany.com/v1/backlinks/resources/501/site-status" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"siteId": 1,
"status": "detecting",
"selectedAnchorText": "PXAny",
"targetUrl": "https://pxany.com"
}'curl --fail-with-body \
-X PATCH "https://api.pxany.com/v1/backlinks/resources/501/site-status" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"siteId": 1,
"status": "published",
"detectedCommentUrl": "https://example.com/post#comment-123",
"detectedLinkFollow": "dofollow"
}'第一版只支持手动提交。评论必须包含一个 HTML <a>链接,锚文本由后台站点发布资料按当前页面语境选择。扩展不会绕过 nofollow、ugc、 验证码或反垃圾机制。
通用外链提交指南
POST /v1/backlinks/submission-guides/generate 使用 Authorization: Bearer <PXANY_API_KEY> 鉴权。 根据当前网页和已保存的网站资料,一次生成提交步骤、可编辑文案、页面依据和缺失资料。不要求页面存在表单,不按资源分类限制生成,不会发送、提交或修改发布状态。
必填参数:siteId 与 resourceId 为已有记录的正整数 ID;snapshot 包含页面 URL、标题、语言(可为 null)、完整可读正文、链接、字段元数据和读取警告。links 每项包含 label/url;fields 每项包含 label/type/required/maxLength/options,未限制长度时 maxLength 为 null。无链接、字段或警告时传空数组。 目标网站须启用。邮件、目录、论坛和个人资料等使用同一接口;支持用户打开外部提交入口后重新生成,服务端不会自行访问链接。
curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/submission-guides/generate" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"siteId": 1,
"resourceId": 501,
"snapshot": {
"pageUrl": "https://directory.example/submit",
"pageTitle": "Recommend a tool",
"language": "en",
"text": "Email support@directory.example with your tool name, URL, category and one-sentence description.",
"links": [{"label": "Email submissions", "url": "mailto:support@directory.example"}],
"fields": [],
"warnings": []
}
}'手动模拟时,请将示例 ID、页面地址和快照替换为实际资源;Example Tool 的名称、网址与介绍仅为响应示例,实际生成读取所选网站资料。
{
"guide": {
"summary": "页面通过邮件接收工具推荐,需要工具名称、网址、分类和一句话介绍。",
"evidence": [
"Email support@directory.example with your tool name, URL, category and one-sentence description."
],
"steps": [
{
"title": "检查并发送推荐邮件",
"instruction": "检查下列内容后发送到 support@directory.example。分类资料缺失,发送前请补充。",
"contents": [
{
"label": "邮件主题",
"text": "Tool recommendation: Example Tool"
},
{
"label": "邮件正文",
"text": "Hi team,\nI'd like to recommend Example Tool for your directory.\nWebsite: https://example-tool.test\nCategory: [please confirm]\nDescription: A tool for preparing product submission materials.\nThank you for reviewing it."
}
],
"completion": "邮件已发送后标记待确认;确认公开收录链接后才标记已发布。"
}
],
"missing": [
"工具分类未在网站资料中提供,请确认后补充。"
],
"warnings": [
"指南只准备内容,不会代发邮件或自动修改发布状态。"
]
}
}{
"type": "https://api.pxany.com/errors/service-unavailable",
"title": "Service unavailable",
"status": 503,
"detail": "AI guide generation is currently unavailable.",
"requestId": "example-request-id"
}返回 guide.summary/evidence/steps/missing/warnings。每步包含 title、instruction、contents 和 completion;contents 是 label/text 列表,文本保留换行。 无明确入口时可返回空步骤,并说明缺失信息。解释使用中文,提交文案遵循页面要求或页面语言。
请求体最多 100 KiB,页面快照序列化后最多 24,000 字符;链接最多 200 项、字段最多 100 项、每字段选项最多 100 项,其他字段长度限制见 OpenAPI。超限拒绝生成,不静默截断。 只分析当前已加载可读内容;无法读取的嵌入区域需要在 warnings 中说明。 400 表示参数不合法或快照超限;401 表示鉴权失败;404 表示站点不存在或未启用、资源不存在;503 表示 AI 不可用或输出校验失败;500 表示内部错误。 本接口会将页面可读内容、字段元数据及所选网站的发布资料交给 Workers AI;不要上传 Cookie、密码、隐藏字段或已有表单值。 扩展中的指南只暂存在当前浏览器会话,按网站、资源、标签页和 URL 隔离。现有评论与表单填写接口继续保留。
外链表单 AI 填表规划
POST /v1/backlinks/directory-submissions/plan 供 PXAny Chrome 扩展在“AI 分析当前页”流程中调用。请求体包含siteId、resourceId 和当前页面表单snapshot;原生下拉框、ARIA combobox、单选组和复选组都作为选择题。对于动态弹层,扩展会临时展开控件、从实际弹层读取 option label、value key、禁用状态、多选状态和 maxSelections,随后恢复原状态;AI 只可从本次读取到的启用 key 中选择。interaction 标识原生控件、动态 popup_selection、兼容 ARIA combobox 或文件上传;inspectionStatus: failed 的动态控件会直接返回人工处理,不猜测选项。文件上传会以 manualOnly 返回为人工步骤,扩展不会自动上传文件。响应中的选项标签由 PXAny 根据页面选项映射,接口接受非博客评论外链资源,博客评论继续使用专用评论生成流程;返回可自动填写字段、 unresolved 字段和 warnings。本接口不会创建或更新 publication 数据,也不会自动提交第三方表单。
curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/directory-submissions/plan" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"siteId": 1,
"resourceId": 501,
"snapshot": {
"pageUrl": "https://bestofai.com/submit-tool",
"pageTitle": "Submit a Tool",
"language": "en",
"blockers": [],
"forms": [
{
"formId": "pxany-form-1",
"fingerprint": "pxany-5f98fdf",
"instructions": [],
"controls": [
{
"controlId": "pxany-form-1-input-1",
"label": "Category",
"name": "category",
"tag": "input",
"inputType": "checkbox",
"autocomplete": null,
"placeholder": null,
"required": true,
"maxLength": null,
"minLength": null,
"helpText": null,
"hasValue": false,
"multiple": true,
"options": [
{ "disabled": false, "label": "AI Search", "value": "ai-search" },
{ "disabled": false, "label": "Writing", "value": "writing" },
{ "disabled": false, "label": "Productivity", "value": "productivity" }
]
},
{
"controlId": "pxany-form-1-input-2",
"label": "URL",
"name": "url",
"tag": "input",
"inputType": "url",
"autocomplete": "url",
"placeholder": "https://example.com",
"required": true,
"maxLength": 255,
"minLength": null,
"helpText": "Use the public product URL.",
"hasValue": false,
"options": []
},
{
"controlId": "pxany-form-1-textarea-5",
"label": "Description",
"name": "description",
"tag": "textarea",
"inputType": null,
"autocomplete": null,
"placeholder": null,
"required": true,
"maxLength": 160,
"minLength": 40,
"helpText": "Write a concise product description.",
"hasValue": false,
"options": []
}
]
}
]
}
}'{
"plan": {
"formId": "pxany-form-1",
"fingerprint": "pxany-5f98fdf",
"assignments": [
{
"controlId": "pxany-form-1-input-1",
"label": "Category",
"role": "category",
"value": "ai-search",
"values": ["ai-search", "writing"],
"selectedOptions": [
{ "label": "AI Search", "value": "ai-search" },
{ "label": "Writing", "value": "writing" }
],
"source": "ai",
"confidence": "medium"
},
{
"controlId": "pxany-form-1-input-2",
"label": "URL",
"role": "site_url",
"value": "https://pxany.com",
"values": ["https://pxany.com"],
"source": "deterministic",
"confidence": "high"
},
{
"controlId": "pxany-form-1-textarea-5",
"label": "Description",
"role": "description",
"value": "PXAny helps makers ship AI-assisted websites with reusable publishing workflows.",
"values": ["PXAny helps makers ship AI-assisted websites with reusable publishing workflows."],
"source": "ai",
"confidence": "high"
}
],
"unresolved": [
{
"controlId": "pxany-form-1-input-9",
"label": "Logo upload",
"reason": "AI planning is unavailable for this field."
}
],
"warnings": ["Page blocker detected: file_upload."],
"aiStatus": "used"
}
}{
"type": "https://api.pxany.com/errors/invalid-request",
"title": "Invalid request",
"status": 400,
"detail": "Current page is outside the selected resource domain.",
"requestId": "00000000-0000-0000-0000-000000000000"
}curl --fail-with-body \
-X POST "https://api.pxany.com/v1/backlinks/directory-submissions/rewrite" \
-H "Authorization: Bearer $PXANY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"siteId": 1,
"resourceId": 501,
"pageUrl": "https://bestofai.com/submit-tool",
"pageLanguage": "en",
"instruction": "Make the slug shorter and more readable.",
"assignment": {
"controlId": "pxany-form-1-input-3",
"label": "Title",
"role": "site_name",
"value": "how-old-do-i-look",
"values": ["how-old-do-i-look"],
"source": "ai",
"confidence": "high"
},
"control": {
"controlId": "pxany-form-1-input-3",
"label": "Title",
"name": "title",
"tag": "input",
"inputType": "text",
"autocomplete": null,
"placeholder": null,
"required": true,
"maxLength": 80,
"minLength": null,
"helpText": null,
"hasValue": false,
"options": []
}
}'{
"assignment": {
"controlId": "pxany-form-1-input-3",
"label": "Title",
"role": "site_name",
"value": "How Old Do I Look",
"values": ["How Old Do I Look"],
"source": "ai",
"confidence": "high"
}
}{
"type": "https://api.pxany.com/errors/invalid-request",
"title": "Invalid request",
"status": 400,
"detail": "Exact profile fields cannot be AI rewritten.",
"requestId": "00000000-0000-0000-0000-000000000000"
}外链表单填表只把项目名称、URL、基础描述、anchor text 和字段结构发给 Workers AI;不发送作者、邮箱、Cookie、截图、网页正文或已有表单内容。 AI 用于生成/改写标题与描述、生成标签,并从页面全部合法选项中回答任意下拉框、单选组或复选组;AI 返回的是页面 option 的 value key,不是显示文字;单字段重写只会把 当前字段、原草稿和你的自定义要求发给 AI。URL、 作者和邮箱只使用 PXAny 保存的原值。AI 不可用或返回无效结构时, 确定性字段仍会填写,描述和标签会退回基础资料,无法可靠回答或 key 非法的选择题转为人工处理。 扩展会先展示可编辑草稿,只有点击“填写当前草稿”才回填页面,并且永远不会自动点击第三方提交按钮。
错误响应
公共 API 默认使用 application/problem+json。 排查问题时保留响应头 x-request-id 和正文中的requestId。
{
"type": "https://api.pxany.com/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "A valid PXAny API key is required.",
"requestId": "00000000-0000-0000-0000-000000000000"
}