开发者 · REST JSON

Astrina 开发者 API

一个 REST JSON API 用于您的流量统计、评论、评分、电话智能、32 可运行的工具和社交登录。简单的密钥认证,慷慨的免费层。

20API参考部分
18社交网络
6广告网络

认证与配额

每个请求都需要您的 API 密钥。在您的 API 控制面板. 在请求头中传递 — 密钥永远不在URL中接受,因此它们无法泄漏到服务器日志、代理或Referer头中:

curl https://astrina.io/api/v1/rating?site=example.com \
     -H "X-Api-Key: ak_your_key_here"

# or:  Authorization: Bearer ak_your_key_here

您的每日配额随您的计划而来:免费100/天,专业版5000/天,商业版25000/天,商业增强版100000/天 — 升级您的计划以获得更高的限制。每个响应都会回显您的配额。错误返回一个"error"字段,包含正确的状态:401(密钥错误),429(配额),400/422(参数错误),403/404(不属于您/未找到)。响应是CORS开放和noindex的。

社交API

一个REST API用于在您连接的每个网络中发布、安排、测量和发送消息 — 18个社交网络和6个广告网络,一个认证模型,一个请求格式。

支持的网络 (18): X (Twitter), Instagram, Facebook, Threads, LinkedIn, TikTok, YouTube, Pinterest, Reddit, Snapchat, Google Business, VK, Odnoklassniki, Telegram, WhatsApp, Discord, Mastodon, Bluesky. 广告网络: Meta Ads, Google Ads, TikTok Ads, LinkedIn Ads, Pinterest Ads, X Ads.

与上述所有内容相同的密钥认证(仅限头部),范围为 social. 在您的上连接频道 社交仪表板. 发布是异步的:/publish返回每个目标排队的帖子;工作者在一分钟内交付,并在到达时触发webhook。

GET/api/v1/social/channels 每个网络、其功能以及您已连接的网络。首先调用此内容。
GET/api/v1/social/accounts 您已连接的频道 — ids /publish目标。
POST/api/v1/social/publish 发布或安排一条帖子到一个或多个频道。
参数描述
text帖子内容(除非提供媒体,否则为必填项)
channels"all",或来自/accounts的频道ID列表
media数组 {url,type,alt}(可选)
scheduled_atISO-8601时间;省略或过去=立即发布
idempotency_key您帖子的ID — 使用相同的键重试将返回第一个,绝不会重复发布
overrides按频道ID键入的每个频道内容覆盖
POST /api/v1/social/publish
Authorization: Bearer <your API key>
Content-Type: application/json

{ "text": "We just shipped 🚀", "channels": "all",
  "idempotency_key": "launch-42" }

{ "ok": true, "post": {
    "id": 1841, "status": "publishing", "text": "We just shipped 🚀",
    "targets": [
      { "channel_id": 12, "provider": "telegram", "status": "queued", "url": null },
      { "channel_id": 31, "provider": "mastodon", "status": "queued", "url": null } ] },
  "quota": { "used": 3, "limit": 25000 } }
GET/api/v1/social/post 一条帖子和每个目标的交付结果(?id=…),或最近的列表。
GET/api/v1/social/analytics 关注者、展示次数、覆盖面和参与度 — 一个频道系列或一个账户汇总。快照,绝不估算。
GETPOST/api/v1/social/messages 阅读DM线程,或在支持的频道上发送直接消息。
GET/api/v1/social/comments 在您发布的帖子上捕获的评论。
GETPOST/api/v1/social/ads 在六个广告网络中列出并创建广告活动。
GETPOSTDELETE/api/v1/social/webhooks 当帖子发布或评论/DM/提及到达时通知您。

事件: post.published, post.partial, post.failed, comment.received, dm.received, mention.received. 通用钩子已签名为 X-Astrina-Signature: sha256=hmac(timestamp.body, secret).

分析

GET/api/v1/stats 您拥有的网站的流量分析。
参数描述
site您拥有的网站 ID 或域名(必填)
period24h · 7d (默认) · 30d · 90d
reportsummary (默认) · timeseries · pages · sources · countries · devices
limit分解报告的行数(1–100,默认 20)
GET /api/v1/stats?site=example.com&period=30d

{
  "site": "example.com", "site_id": 4, "period": "30d",
  "summary": {
    "visitors": 18204, "pageviews": 54881, "visits": 24310,
    "pages_per_visit": 2.26, "online_now": 7
  },
  "top_sources":   [{ "source": "google.com", "visitors": 9021 }, …],
  "top_countries": [{ "country": "US", "visitors": 7440 }, …],
  "quota": { "used": 12, "limit": 100 }
}

转化

POST/api/v1/conversion 从您的服务器记录一次转化,这样未接触浏览器的收入仍然可以归属。
参数描述
site您拥有的网站 ID 或域名(必填)
kindlead · qualified · deal · sale · recurring · refund · churn
value金额,使用以下货币。负数表示退款。
currency三字母代码,默认 USD
uid来自跟踪脚本的访客 ID。可选 — 请参见下面的说明。
external_id您自己的记录 ID,用于避免重复计数重试
POST /api/v1/conversion
Authorization: Bearer <your API key>

site=example.com&kind=sale&value=249.00&currency=USD&uid=v_8f3c…&external_id=order-1042

{ "recorded": true, "id": 5512, "kind": "sale" }

没有 uid 的转化被记录,而不是被拒绝:通过电话完成的销售仍然是收入。它计入总数,并被报告为未归因,而不是分配给无法追踪的渠道。

压缩

POST/api/v1/minify 压缩HTML、CSS或JS并获取压缩后的字节。运行在我们的服务器上(不使用AI令牌);按输入大小按请求计费。
参数描述
kindhtml · css · js — 必需(通过 ?kind=、上传的文件名或Content-Type)
主体要压缩的源:原始请求主体,一个多部分 file, 或JSON {"kind":"…","data":"…"}
POST /api/v1/minify?kind=css
X-Api-Key: ak_your_key_here

.button{ color: #ffffff; margin: 0 0 0 0; }

{ "kind":"css", "in_bytes":42, "out_bytes":24, "saved_pct":43,
  "hash":"be6ca66f…", "output":".button{color:#fff;margin:0}" }

认证:仅限头部(X-Api-Key或Bearer),范围 minify. CSS和JS安全地压缩 — calc()间距和JS ASI被保留;HTML在保持<pre>、<textarea>、<script>、<style>和JSON-LD不变的同时折叠空白。跟踪您在上的使用情况和密钥 压缩仪表板.

原创性&amp; AI检测

POST/api/v1/originality 开始一个检查:文本唯一性、AI撰写文本、图像唯一性或AI生成图像。立即返回一个运行ID——工作在一个工作者上进行。
参数描述
kindtext-unique · ai-text · image-unique · ai-image — 必填
text要检查的文本(文本模块)
url从此地址读取文本——或获取图像——
image多部分文件字段(图像模块);或 image_base64
POST /api/v1/originality
X-Api-Key: ak_your_key_here
kind=ai-text&text=In+today%27s+rapidly+evolving+digital+landscape…

{ "ok":true, "run":1042, "kind":"ai-text", "status":"queued",
  "poll":"https://astrina.io/api/v1/originality?run=1042",
  "units_charged":5, "balance_charged_usd":0,
  "checks_used_today":7, "checks_per_day":500 }

认证:仅限头部(X-Api-Key或Bearer),范围 originality. 专业版及以上。一个任务消耗您每日配额中的固定数量的API请求——文本唯一性10个,AI文本5个,图像唯一性5个,AI图像3个——因为一个任务涉及十几个索引查询、十几个页面下载或几百次模型评估。超出您计划的每日检查配额后,任务还会从您的余额中扣除固定费用,响应会准确说明收费情况。

GET/api/v1/originality?run=<id> 轮询运行。在运行时,您会获得其所处的阶段;完成后,您将获得完整报告。
GET /api/v1/originality?run=1042
X-Api-Key: ak_your_key_here

{ "ok":true, "run":1042, "kind":"ai-text", "status":"running",
  "progress":75, "stage":"model", "stage_label":"Scoring every sentence against a language model" }

{ "ok":true, "status":"done", "score":88.4, "verdict":"ai", "confidence":71,
  "report":{ "per_sentence":[…], "features":{…}, "notes":[…] } }

轮询消耗1个请求。文本唯一性检查通常在15-40秒内完成;每2-3秒轮询一次。 每个报告都包含其置信度和背后的证据:匹配的页面及引用的片段,或每个信号产生的测量。检测是概率性的——API从不在没有来源数字的情况下返回裁决。

POST/api/v1/originality 去AI层,同一入口:kind=deai-text重写草稿,使其不再被视为机器写的;kind=deai-image重新编码生成的图片,使其像素表现得像一张照片。
POST /api/v1/originality
X-Api-Key: ak_your_key_here
kind=deai-text&text=In+today%27s+rapidly+evolving+digital+landscape…

{ "ok":true, "run":1043, "kind":"deai-text", "status":"queued", "units_charged":15 }

GET /api/v1/originality?run=1043
{ "status":"done", "score":41.2,
  "report":{ "before":93.0, "after":41.2, "target":70, "reached_target":true,
             "changes":["4 stock transition(s) removed","1 sentence pair(s) joined for rhythm"],
             "paid_pass":true, "text":"…the rewritten text…" } }

15个API请求用于文本重写,6个用于图像重新编码 — 重写可以消耗一个模型调用,价格涵盖了这一点。每个任务获得一次免费的确定性通行和最多一次付费模型重写:如果这还不够,答案会说明,而不是再次消费。图像任务以下载链接回应(保留72小时)。 重写器进行的编辑是编辑会辩护的——剪掉常用的过渡,变化节奏,替换过度使用的词汇——并使用相同的检测器重新测量。它不会增加错误,也不会编造事实。图像重编码器拒绝携带签名C2PA清单的文件,而不是剥离它们,并在其生成的内容中写入诚实的“AI辅助插图”信用。

GET/api/v1/originality 目录:每个检查在API请求和金钱上的成本,以及您今天剩余的配额。

评论与评分

GET/api/v1/reviews 最新评论 + 任何主题的综合评分。
参数描述
typesite · phone · email · address · org · shop
key主题值(域名、号码、电子邮件等)
GET /api/v1/reviews?type=site&key=example.com

{ "type": "site", "subject": "example.com", "rating": 4.3, "count": 87,
  "reviews": [{ "author": "Jane", "rating": 5, "body": "…", "date": "2026-07-01" }, …],
  "url": "https://astrina.io/reviews/site/example.com/" }
GET/api/v1/rating 紧凑的评分摘要 + 星级分布 + 嵌入网址。
参数描述
site通过域名访问网站的快捷方式
type + key或按类型 + 关键字的任何主题
GET /api/v1/rating?site=example.com

{ "type": "site", "subject": "example.com", "rating": 4.3, "count": 87,
  "distribution": { "1": 3, "2": 4, "3": 9, "4": 26, "5": 45 },
  "reviews_url": "https://astrina.io/reviews/site/example.com/",
  "widget_url":  "https://astrina.io/widget.php?type=site&key=example.com",
  "badge_url":   "https://astrina.io/badge.php?s=4" }

电话智能

GET/api/v1/phone 号码的运营商、线路类型和社区垃圾邮件风险。
参数描述
number国际格式的电话号码,例如 +14155550123
GET /api/v1/phone?number=+14155550123

{ "number": "+14155550123", "country": "United States", "iso": "US",
  "operator": "…", "line_type": "mobile",
  "risk": { "score": 12, "verdict": "low", "confidence": 0.6, "reports": 3, … },
  "url": "https://astrina.io/reviews/phone/+14155550123/" }

黑名单和垃圾邮件检查

GET/api/v1/blacklist 检查电话、电子邮件、域名或网站是否在垃圾邮件/诈骗黑名单上。
参数描述
value要检查的电话、电子邮件、域名或URL(类型自动检测)。
type可选 — 强制其中一个 phone · email · domain
GET /api/v1/[email protected]

{ "value": "[email protected]", "listed": true,
  "categories": ["disposable"],
  "matches": [
    { "type": "email_domain", "match": "mailinator.com",
      "category": "disposable", "source": "disposable-email-domains",
      "confidence": 90, "added": "2026-07-12 15:46:00" } ],
  "quota": { "used": 7, "limit": 100000 } }

加密货币反洗钱检查

GET/api/v1/aml 根据制裁和威胁情报列表筛选加密钱包地址 — 链自动检测,包含风险评分。
参数描述
address要筛选的钱包地址。识别 BTC、EVM (0x…)、TRON、Solana、TON、LTC、DOGE、XRP、XMR 和 BCH 形状;任何其他字符串按原样查找。
format可选 — 设置为csv以接收CSV而不是JSON。
GET /api/v1/aml?address=TPPR7e8hGC57dexrE2jy1f94wtuGyVP6Dp

{ "address": "TPPR7e8hGC57dexrE2jy1f94wtuGyVP6Dp",
  "chain": "tron", "listed": true, "risk": 100, "level": "sanctioned",
  "categories": ["sanctioned"],
  "matches": [
    { "category": "sanctioned", "source": "US OFAC SDN sanctions list",
      "jurisdiction": "US", "risk": 100, "confidence": 88, "added": "2026-08-10" } ],
  "quota": { "used": 1, "limit": 100 } }

批量:POST一个"addresses"数组(最多50个)以在一次调用中筛选多个 — 每个一个配额单位。

POST /api/v1/aml
{ "addresses": ["0x…", "bc1…", "T…"] }

{ "results": [ { "address": "0x…", "listed": false, "risk": 0, … } ], "count": 3 }

每个响应都携带X-RateLimit-Limit和X-RateLimit-Remaining头部。 完整文档、风险模型和实时面板: astrina.io/aml/

密码泄露检查

GET/api/v1/pwned 检查密码是否出现在数据泄露中 — 使用k-匿名性,因此密码永远不会离开客户端。

在您的应用中使用SHA-1对密码进行哈希,然后仅发送该哈希的前5个十六进制字符。API返回每个共享前缀的泄露哈希后缀;您在本地进行比较。明文密码永远不会被传输。

参数描述
prefixSHA-1哈希的前5个十六进制字符(推荐 — k-匿名性)。返回匹配的后缀及其泄露计数。
hash替代方案:完整的40个十六进制SHA-1。方便,但哈希会离开客户端 — 尽可能使用前缀。
GET /api/v1/pwned?prefix=5BAA6

{ "mode": "range", "prefix": "5BAA6", "returned": 1978,
  "suffixes": [
    { "suffix": "1E4C9B93F3F0682250B6CF8331B7EE68FD8", "count": 52372427 }, ... ],
  "quota": { "used": 22, "limit": 100000 } }

# convenience mode — send the whole SHA-1, get a direct verdict:
GET /api/v1/pwned?hash=5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8

{ "mode": "hash", "found": true, "count": 52372427,
  "note": "This password appears in known breaches - do not use it.",
  "quota": { "used": 23, "limit": 100000 } }

数据来源:我是否被泄露(泄露密码)。相同的k-匿名性模型支持在/password-check/上的免费浏览器工具。

工具

通过 API 运行我们的同步服务器端工具 — 141 个中的 31 个。仅限浏览器的工具和排队的爬虫/渲染未公开。每个工具的形状相同,返回相同的信封;计划限制和每日运行上限与网站相同。

GET /api/v1/tool                         # 目录
GET /api/v1/tool?name=<key>&value=<input>  # 运行一个 (value2 用于双输入工具)     -H "X-Api-Key: ak_your_key_here"
参数描述
name工具密钥(请参见下面的每个块)。
value主要输入 — 一个 URL、域名、以逗号/换行符分隔的 URL 或文本。
value2第二个输入,仅适用于比较两个事物的工具。

错误:404 未知工具 · 400 无法通过 API 运行 · 403 需要计划 · 429 达到每日运行上限 · 422 输入错误。每个返回一个 "error" 字段。

🔍 SEO (18)
GET/api/v1/tool?name=site-audit 🔍 技术、速度和安全一次到位。
GET /api/v1/tool?name=site-audit&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "site-audit",
    "ms": 807,
    "result": {
        "summary": [
            {
                "label": "Overall",
                "value": "93/100",
                "state": "ok"
            },
            {
                "label": "SEO",
                "value": "90/100",
                "state": "ok"
            },
            {
                "label": "Performance",
                "value": "90/100",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Area",
            "What failed",
            "What to do"
        ],
        "rows": [
            {
                "a": "SEO",
                "b": "Headings in logical order",
                "c": "Nest headings sequentially (H1→H2→H3) without skipping levels.",
                "state": "bad"
            },
            {
                "a": "SEO",
                "b": "All images have alt",
                "c": "Add descriptive alt to every <img> (alt=\"\" only for decorative).",
                "state": "bad"
            },
            {
                "a": "SEO",
                "b": "Form inputs have labels",
                "c": "Pair every input with a <label for> or an aria-label.",
                "state": "warn"
            },
            "…"
        ],
        "notes": []
    }
}
GET/api/v1/tool?name=serp-preview 👁️ 搜索结果中片段的外观。
GET /api/v1/tool?name=serp-preview&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "serp-preview",
    "ms": 127,
    "result": {
        "summary": [
            {
                "label": "Title length",
                "value": "53 chars",
                "state": "ok"
            },
            {
                "label": "Description length",
                "value": "163 chars",
                "state": "warn"
            },
            {
                "label": "Title truncated",
                "value": "no",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Part",
            "Value"
        ],
        "rows": [
            {
                "a": "Headline shown",
                "b": "Every site you look after, in one dashboard — Astrina",
                "state": ""
            },
            {
                "a": "Breadcrumb shown",
                "b": "astrina.io",
                "state": ""
            },
            {
                "a": "Snippet shown",
                "b": "Real traffic, daily SEO checks and reviews for your sites and your clients’ sites. One …",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "Google cuts on pixel width, not character count, and rewrites titles on roughly a third…"
        ]
    }
}
GET/api/v1/tool?name=og-preview 📣 当您的链接被分享时显示的卡片。
GET /api/v1/tool?name=og-preview&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "og-preview",
    "ms": 499,
    "result": {
        "summary": [
            {
                "label": "og:title",
                "value": "set",
                "state": "ok"
            },
            {
                "label": "og:description",
                "value": "set",
                "state": "ok"
            },
            {
                "label": "og:image",
                "value": "set",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Field",
            "Value"
        ],
        "rows": [
            {
                "a": "Card title",
                "b": "Every site you look after, in one dashboard — Astrina",
                "state": ""
            },
            {
                "a": "Card description",
                "b": "Real traffic, daily SEO checks and reviews for your sites and your clients’ sites. One …",
                "state": ""
            },
            {
                "a": "Card image",
                "b": "https://astrina.io/og.php",
                "state": "ok"
            },
            "…"
        ],
        "notes": [
            "Facebook, X and LinkedIn each cache what they scraped. After fixing tags, re-scrape in …"
        ]
    }
}
GET/api/v1/tool?name=schema-validator 🧬 验证 JSON-LD 结构化数据。
GET /api/v1/tool?name=schema-validator&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "schema-validator",
    "ms": 75,
    "result": {
        "summary": [
            {
                "label": "JSON-LD blocks",
                "value": "2",
                "state": "ok"
            },
            {
                "label": "Types found",
                "value": "2",
                "state": "ok"
            },
            {
                "label": "Invalid blocks",
                "value": "0",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Where",
            "Type",
            "Verdict"
        ],
        "rows": [
            {
                "a": "block 1",
                "b": "Organization",
                "c": "required properties present",
                "state": "ok"
            },
            {
                "a": "block 2",
                "b": "WebSite",
                "c": "required properties present",
                "state": "ok"
            }
        ],
        "notes": [
            "Valid markup is not the same as an eligible rich result. Google also applies content po…"
        ]
    }
}
GET/api/v1/tool?name=meta-tags 🏷️ 标题、描述和 og 标签的长度。
GET /api/v1/tool?name=meta-tags&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "meta-tags",
    "ms": 164,
    "result": {
        "summary": [
            {
                "label": "Title length",
                "value": "53",
                "state": "ok"
            },
            {
                "label": "Description length",
                "value": "163",
                "state": "warn"
            },
            {
                "label": "H1 count",
                "value": "1",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Tag",
            "Value",
            "Length",
            "…"
        ],
        "rows": [
            {
                "a": "title",
                "b": "Every site you look after, in one dashboard — Astrina",
                "c": "53",
                "d": "Good length.",
                "state": "ok"
            },
            {
                "a": "meta description",
                "b": "Real traffic, daily SEO checks and reviews for your sites and your clients’ sites. One …",
                "c": "163",
                "d": "Long — the snippet is cut around 160 characters.",
                "state": "warn"
            },
            {
                "a": "canonical",
                "b": "https://astrina.io/",
                "c": "19",
                "d": "Declared.",
                "state": "ok"
            },
            "…"
        ],
        "notes": []
    }
}
GET/api/v1/tool?name=keyword-density 📊 页面上单词的密度和频率。
GET /api/v1/tool?name=keyword-density&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "keyword-density",
    "ms": 93,
    "result": {
        "summary": [
            {
                "label": "Words",
                "value": "1093",
                "state": "ok"
            },
            {
                "label": "Unique words",
                "value": "503",
                "state": ""
            },
            {
                "label": "Vocabulary richness",
                "value": "46.0%",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Kind",
            "Term",
            "Count",
            "…"
        ],
        "rows": [
            {
                "a": "single word",
                "b": "one",
                "c": "20",
                "d": "1.83%",
                "e": "title, H1, description",
                "state": "ok"
            },
            {
                "a": "single word",
                "b": "reviews",
                "c": "17",
                "d": "1.56%",
                "e": "description",
                "state": "ok"
            },
            {
                "a": "single word",
                "b": "listed",
                "c": "15",
                "d": "1.37%",
                "e": "body only",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "Density is a diagnostic, not a target. No search engine has a threshold to hit — this i…"
        ]
    }
}
GET/api/v1/tool?name=redirects ↪️ 逐跳跟踪 301/302 链接。
GET /api/v1/tool?name=redirects&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "redirects",
    "ms": 1753,
    "result": {
        "summary": [
            {
                "label": "Final status",
                "value": "200",
                "state": "ok"
            },
            {
                "label": "Redirects followed",
                "value": "0",
                "state": "ok"
            },
            {
                "label": "Ends at",
                "value": "https://astrina.io/",
                "state": ""
            },
            "…"
        ],
        "cols": [
            "Address",
            "Hop",
            "Status",
            "…"
        ],
        "rows": [
            {
                "a": "as entered",
                "b": "1",
                "c": "200",
                "d": "https://astrina.io/",
                "e": "— final destination —",
                "state": "ok"
            },
            {
                "a": "http://astrina.io/",
                "b": "1",
                "c": "200",
                "d": "http://astrina.io/",
                "e": "— final destination —",
                "state": "ok"
            },
            {
                "a": "https://astrina.io/",
                "b": "1",
                "c": "200",
                "d": "https://astrina.io/",
                "e": "— final destination —",
                "state": "ok"
            },
            "…"
        ],
        "notes": [
            "The http, https, www and apex forms of this address do not all end at the same URL. Sea…",
            "The page contains JavaScript that changes location. A crawler may or may not follow it,…",
            "Every hop above was requested and its answer read; nothing in the chain is guessed from…"
        ]
    }
}
GET/api/v1/tool?name=sitemap 🗺️ 验证 XML 网站地图及其索引。
GET /api/v1/tool?name=sitemap&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "sitemap",
    "ms": 2646,
    "result": {
        "summary": [
            {
                "label": "Type",
                "value": "sitemap index",
                "state": "ok"
            },
            {
                "label": "URLs found",
                "value": "5408",
                "state": "ok"
            },
            {
                "label": "Unique URLs",
                "value": "5405",
                "state": "warn"
            },
            "…"
        ],
        "cols": [
            "Child sitemap",
            "Status",
            "URLs",
            "…"
        ],
        "rows": [
            {
                "a": "https://astrina.io/sitemap-core.xml",
                "b": "200",
                "c": "534",
                "d": "59.9 KB",
                "state": "ok"
            },
            {
                "a": "https://astrina.io/sitemap-blog.xml",
                "b": "200",
                "c": "42",
                "d": "5.2 KB",
                "state": "ok"
            },
            {
                "a": "https://astrina.io/sitemap-catalog.xml",
                "b": "200",
                "c": "61",
                "d": "6.9 KB",
                "state": "ok"
            },
            "…"
        ],
        "notes": [
            "Started from the sitemap declared in robots.txt: https://astrina.io/sitemap.xml",
            "3 URLs appear more than once.",
            "7 addresses were fetched, within your plan cap of 25."
        ]
    }
}
GET/api/v1/tool?name=html-validate ✅ 违反 W3C 规则的结构错误。
GET /api/v1/tool?name=html-validate&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "html-validate",
    "ms": 180,
    "result": {
        "summary": [
            {
                "label": "Errors",
                "value": "8",
                "state": "bad"
            },
            {
                "label": "Warnings",
                "value": "0",
                "state": "ok"
            },
            {
                "label": "Total findings",
                "value": "8",
                "state": "warn"
            },
            "…"
        ],
        "cols": [
            "Line",
            "Level",
            "Finding"
        ],
        "rows": [
            {
                "a": "314",
                "b": "error",
                "c": "htmlParseEntityRef: expecting ';'",
                "state": "bad"
            },
            {
                "a": "513",
                "b": "error",
                "c": "Unexpected end tag : svg",
                "state": "bad"
            },
            {
                "a": "514",
                "b": "error",
                "c": "Unexpected end tag : svg",
                "state": "bad"
            },
            "…"
        ],
        "notes": [
            "420 \"unknown element\" complaints were discarded. The parser behind this check knows the…",
            "This is a structural check — parse errors, duplicate ids, obsolete and required element…"
        ]
    }
}
GET/api/v1/tool?name=robots-txt 🤖 解析文件并根据爬虫进行处理。
GET /api/v1/tool?name=robots-txt&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "robots-txt",
    "ms": 133,
    "result": {
        "summary": [
            {
                "label": "robots.txt",
                "value": "found",
                "state": "ok"
            },
            {
                "label": "Size",
                "value": "1.9 KB",
                "state": "ok"
            },
            {
                "label": "Groups",
                "value": "10",
                "state": ""
            },
            "…"
        ],
        "cols": [
            "Crawler",
            "This URL",
            "Deciding rule",
            "…"
        ],
        "rows": [
            {
                "a": "*",
                "b": "allowed",
                "c": "Allow: /",
                "d": "the * group",
                "state": "ok"
            },
            {
                "a": "Googlebot",
                "b": "allowed",
                "c": "Allow: /",
                "d": "the * group",
                "state": "ok"
            },
            {
                "a": "Bingbot",
                "b": "allowed",
                "c": "Allow: /",
                "d": "the * group",
                "state": "ok"
            },
            "…"
        ],
        "text": "# As a condition of accessing this website, you agree to abide by the following\n# conte…",
        "notes": [
            "At least one group carries Disallow: / — that blocks an entire crawler from the whole s…"
        ]
    }
}
GET/api/v1/tool?name=images-seo 🖼️ 替代文本、尺寸和格式。
GET /api/v1/tool?name=images-seo&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "images-seo",
    "ms": 1910,
    "result": {
        "summary": [
            {
                "label": "Images",
                "value": "7",
                "state": "ok"
            },
            {
                "label": "Missing alt",
                "value": "0",
                "state": "ok"
            },
            {
                "label": "Decorative (alt=\"\")",
                "value": "7",
                "state": ""
            },
            "…"
        ],
        "cols": [
            "Image",
            "Alt text",
            "Size",
            "…"
        ],
        "rows": [
            {
                "a": "https://astrina.io/shot.php?s=1",
                "b": "(empty)",
                "c": "46.6 KB",
                "d": "empty alt (decorative); no width/height — causes layout shift",
                "state": "warn"
            },
            {
                "a": "https://astrina.io/shot.php?s=4",
                "b": "(empty)",
                "c": "75.1 KB",
                "d": "empty alt (decorative); no width/height — causes layout shift",
                "state": "warn"
            },
            {
                "a": "https://astrina.io/shot.php?s=8",
                "b": "(empty)",
                "c": "68.1 KB",
                "d": "empty alt (decorative); no width/height — causes layout shift",
                "state": "warn"
            },
            "…"
        ],
        "notes": [
            "6 images declare no width and height. The browser cannot reserve space, so the page jum…",
            "None of the sampled images are WebP or AVIF. Converting usually removes a third of the …",
            "Optimizing the sampled images could save roughly 131 KB. Compress or convert them to We…",
            "…"
        ]
    }
}
GET/api/v1/tool?name=cms-detect 🧱 识别 CMS 和技术栈。
GET /api/v1/tool?name=cms-detect&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "cms-detect",
    "ms": 135,
    "result": {
        "summary": [
            {
                "label": "CMS",
                "value": "Magento",
                "state": "ok"
            },
            {
                "label": "Signals found",
                "value": "2",
                "state": "ok"
            },
            {
                "label": "Server",
                "value": "cloudflare",
                "state": ""
            },
            "…"
        ],
        "cols": [
            "Kind",
            "Name",
            "Evidence",
            "…"
        ],
        "rows": [
            {
                "a": "CMS",
                "b": "Magento",
                "c": "markup: mage/",
                "d": "strong",
                "state": "ok"
            },
            {
                "a": "CDN / Edge",
                "b": "Cloudflare",
                "c": "server: cloudflare",
                "d": "strong",
                "state": "ok"
            }
        ],
        "notes": [
            "This reads fingerprints, not an inventory. A strong match is reliable; a weak one is a …"
        ]
    }
}
GET/api/v1/tool?name=readability 📖 文本难度和可读性指标。
GET /api/v1/tool?name=readability&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "readability",
    "ms": 94,
    "result": {
        "summary": [
            {
                "label": "Reading ease",
                "value": "47.0 — difficult",
                "state": "warn"
            },
            {
                "label": "Grade level",
                "value": "12.6",
                "state": "warn"
            },
            {
                "label": "Gunning Fog",
                "value": "15.5",
                "state": "warn"
            },
            "…"
        ],
        "cols": [
            "Measure",
            "Value"
        ],
        "rows": [
            {
                "a": "Formula used",
                "b": "Flesch Reading Ease and Flesch–Kincaid grade",
                "state": ""
            },
            {
                "a": "Language detected",
                "b": "Latin script",
                "state": ""
            },
            {
                "a": "Syllables per word",
                "b": "1.60",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "10 sentences run past 25 words.",
            "These formulas count syllables and sentence lengths. They cannot tell whether the writi…"
        ]
    }
}
GET/api/v1/tool?name=hreflang 🌍 国际标记,包括返回链接。
GET /api/v1/tool?name=hreflang&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "hreflang",
    "ms": 907,
    "result": {
        "summary": [
            {
                "label": "hreflang tags",
                "value": "4",
                "state": "ok"
            },
            {
                "label": "Problems",
                "value": "0",
                "state": "ok"
            },
            {
                "label": "x-default",
                "value": "yes",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Code",
            "URL",
            "Links back",
            "…"
        ],
        "rows": [
            {
                "a": "en",
                "b": "https://astrina.io/",
                "c": "n/a",
                "d": "ok",
                "state": "ok"
            },
            {
                "a": "ru",
                "b": "https://astrina.io/ru/",
                "c": "yes",
                "d": "ok",
                "state": "ok"
            },
            {
                "a": "uk",
                "b": "https://astrina.io/uk/",
                "c": "yes",
                "d": "ok",
                "state": "ok"
            },
            "…"
        ],
        "notes": [
            "Return links were checked on 2 alternates."
        ]
    }
}
GET/api/v1/tool?name=canonical 🔗 页面声明为原始的 URL。
GET /api/v1/tool?name=canonical&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "canonical",
    "ms": 75,
    "result": {
        "summary": [
            {
                "label": "Canonical",
                "value": "declared",
                "state": "ok"
            },
            {
                "label": "Self-referencing",
                "value": "yes",
                "state": "ok"
            },
            {
                "label": "Declarations found",
                "value": "1",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Field",
            "Value"
        ],
        "rows": [
            {
                "a": "Requested URL",
                "b": "https://astrina.io/",
                "state": ""
            },
            {
                "a": "URL after redirects",
                "b": "https://astrina.io/",
                "state": ""
            },
            {
                "a": "Canonical in HTML",
                "b": "https://astrina.io/",
                "state": ""
            },
            "…"
        ],
        "notes": []
    }
}
GET/api/v1/tool?name=http-status 📋 批量 HTTP 代码和重定向。
GET /api/v1/tool?name=http-status&value=https%3A%2F%2Fastrina.io%2F%0Ahttps%3A%2F%2Fastrina.io%2Fpricing{
    "ok": true,
    "utility": "http-status",
    "ms": 774,
    "result": {
        "summary": [
            {
                "label": "Checked",
                "value": "2",
                "state": "ok"
            },
            {
                "label": "OK (2xx)",
                "value": "2",
                "state": "ok"
            },
            {
                "label": "Redirected",
                "value": "0",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "URL",
            "Status",
            "Hops",
            "…"
        ],
        "rows": [
            {
                "a": "https://astrina.io/",
                "b": "200",
                "c": "0",
                "d": "same URL",
                "e": "97 ms",
                "state": "ok"
            },
            {
                "a": "https://astrina.io/pricing",
                "b": "200",
                "c": "0",
                "d": "same URL",
                "e": "62 ms",
                "state": "ok"
            }
        ],
        "notes": [
            "All 2 addresses were checked, within the cap of 25 for this run."
        ]
    }
}
GET/api/v1/tool?name=favicon ⭐ 浏览器查找的每种尺寸和格式。
GET /api/v1/tool?name=favicon&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "favicon",
    "ms": 573,
    "result": {
        "summary": [
            {
                "label": "Icons declared",
                "value": "1",
                "state": ""
            },
            {
                "label": "Icons that load",
                "value": "1 / 2",
                "state": "ok"
            },
            {
                "label": "/favicon.ico",
                "value": "missing",
                "state": "warn"
            },
            "…"
        ],
        "cols": [
            "Relation",
            "URL",
            "Status",
            "…"
        ],
        "rows": [
            {
                "a": "icon",
                "b": "https://astrina.io/favicon.svg",
                "c": "200",
                "d": "unknown",
                "e": "396 B",
                "state": "ok"
            },
            {
                "a": "icon (browser fallback)",
                "b": "https://astrina.io/favicon.ico",
                "c": "404",
                "d": "unknown",
                "e": "2.8 KB",
                "state": "warn"
            }
        ],
        "notes": [
            "There is no /favicon.ico at the root. Browsers and feed readers still ask for it by def…",
            "No apple-touch-icon. iOS will screenshot the page instead when someone adds it to their…",
            "No web app manifest. Android uses it for the home-screen icon and the install prompt."
        ]
    }
}
🛡️ 安全性 (12)
GET/api/v1/tool?name=ssl 🔒 证书、链和到期。
GET /api/v1/tool?name=ssl&value=astrina.io{
    "ok": true,
    "utility": "ssl",
    "ms": 86,
    "result": {
        "summary": [
            {
                "label": "Certificate",
                "value": "valid and trusted",
                "state": "ok"
            },
            {
                "label": "Days left",
                "value": "75",
                "state": "ok"
            },
            {
                "label": "Hostname matches",
                "value": "yes",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Field",
            "Value"
        ],
        "rows": [
            {
                "a": "Common name",
                "b": "astrina.io",
                "state": ""
            },
            {
                "a": "Subject alternative names",
                "b": "astrina.io, *.astrina.io",
                "state": ""
            },
            {
                "a": "Issued by",
                "b": "WE1",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "Read from a live TLS handshake to 172.67.166.83:443 with SNI for astrina.io."
        ]
    }
}
GET/api/v1/tool?name=security-headers 🛡️ HSTS、CSP、框架选项,分级。
GET /api/v1/tool?name=security-headers&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "security-headers",
    "ms": 94,
    "result": {
        "summary": [
            {
                "label": "Grade",
                "value": "A",
                "state": "ok"
            },
            {
                "label": "Score",
                "value": "85/100",
                "state": "ok"
            },
            {
                "label": "HSTS",
                "value": "yes",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Header",
            "Value",
            "Verdict"
        ],
        "rows": [
            {
                "a": "Strict-Transport-Security",
                "b": "max-age=31536000; includeSubDomains",
                "c": "Set for 365 days.",
                "state": "ok"
            },
            {
                "a": "Content-Security-Policy",
                "b": "default-src 'self' https: data:; script-src 'self' 'unsafe-inline' https:; style-src 's…",
                "c": "Set. The CSP analyser tool checks whether it actually holds.",
                "state": "ok"
            },
            {
                "a": "X-Content-Type-Options",
                "b": "nosniff",
                "c": "Set correctly.",
                "state": "ok"
            },
            "…"
        ],
        "notes": [
            "The grade weighs the headers that change what an attacker can do. It says nothing about…"
        ]
    }
}
GET/api/v1/tool?name=http-headers 📨 每个响应头的解释。
GET /api/v1/tool?name=http-headers&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "http-headers",
    "ms": 88,
    "result": {
        "summary": [
            {
                "label": "Status",
                "value": "200",
                "state": "ok"
            },
            {
                "label": "Protocol",
                "value": "HTTP/2",
                "state": "ok"
            },
            {
                "label": "Headers",
                "value": "20",
                "state": ""
            },
            "…"
        ],
        "cols": [
            "Header",
            "Value",
            "What it does"
        ],
        "rows": [
            {
                "a": "alt-svc",
                "b": "h3=\":443\"; ma=86400",
                "c": "Advertises another protocol for this origin, usually HTTP/3.",
                "state": ""
            },
            {
                "a": "cache-control",
                "b": "no-store, no-cache, must-revalidate",
                "c": "How long, and by whom, this response may be cached.",
                "state": ""
            },
            {
                "a": "cf-cache-status",
                "b": "DYNAMIC",
                "c": "",
                "state": ""
            },
            "…"
        ],
        "text": "alt-svc: h3=\":443\"; ma=86400\ncache-control: no-store, no-cache, must-revalidate\ncf-cach…",
        "notes": [
            "Our fetcher keeps one value per header name, so if the server sent several Set-Cookie l…"
        ]
    }
}
GET/api/v1/tool?name=csp 🚧 列出留下漏洞的指令。
GET /api/v1/tool?name=csp&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "csp",
    "ms": 116,
    "result": {
        "summary": [
            {
                "label": "Policy",
                "value": "enforced",
                "state": "ok"
            },
            {
                "label": "Directives",
                "value": "7",
                "state": ""
            },
            {
                "label": "Serious holes",
                "value": "7",
                "state": "bad"
            },
            "…"
        ],
        "cols": [
            "Directive",
            "Sources",
            "Finding"
        ],
        "rows": [
            {
                "a": "default-src",
                "b": "'self' https: data:",
                "c": "data: in a script source is a known bypass; https: alone allows every https origin on t…",
                "state": "bad"
            },
            {
                "a": "script-src",
                "b": "'self' 'unsafe-inline' https:",
                "c": "'unsafe-inline' on scripts defeats the policy — this is the exact thing CSP exists to s…",
                "state": "bad"
            },
            {
                "a": "style-src",
                "b": "'self' 'unsafe-inline'",
                "c": "'unsafe-inline' — acceptable for styles, still worth removing",
                "state": "warn"
            },
            "…"
        ],
        "text": "default-src 'self' https: data:; script-src 'self' 'unsafe-inline' https:; style-src 's…",
        "notes": [
            "Nothing reports violations, so you will not learn what the policy blocked or nearly blo…",
            "This reads the policy as written. Whether it fits what the page actually loads can only…"
        ]
    }
}
GET/api/v1/tool?name=dns 🌐 A、AAAA、MX、NS、TXT、SOA 和 CAA。
GET /api/v1/tool?name=dns&value=astrina.io{
    "ok": true,
    "utility": "dns",
    "ms": 507,
    "result": {
        "summary": [
            {
                "label": "A",
                "value": "2",
                "state": "ok"
            },
            {
                "label": "AAAA",
                "value": "2",
                "state": "ok"
            },
            {
                "label": "MX",
                "value": "1",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Type",
            "Name",
            "Value",
            "…"
        ],
        "rows": [
            {
                "a": "A",
                "b": "astrina.io",
                "c": "104.21.34.236",
                "d": "292s",
                "e": "",
                "state": ""
            },
            {
                "a": "A",
                "b": "astrina.io",
                "c": "172.67.166.83",
                "d": "292s",
                "e": "",
                "state": ""
            },
            {
                "a": "AAAA",
                "b": "astrina.io",
                "c": "2606:4700:3037::ac43:a653",
                "d": "296s",
                "e": "",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "No CAA record. Adding one names the certificate authorities allowed to issue for this d…",
            "Answered by this server's resolver. A record changed in the last few hours may not have…"
        ]
    }
}
GET/api/v1/tool?name=whois 📜 注册商、日期和名称服务器。
GET /api/v1/tool?name=whois&value=astrina.io{
    "ok": true,
    "utility": "whois",
    "ms": 313,
    "result": {
        "summary": [
            {
                "label": "Domain",
                "value": "astrina.io",
                "state": "ok"
            },
            {
                "label": "Registrar",
                "value": "NameCheap, Inc.",
                "state": ""
            },
            {
                "label": "Expires",
                "value": "2027-07-09",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Field",
            "Value"
        ],
        "rows": [
            {
                "a": "Expires",
                "b": "2027-07-09 15:37 UTC",
                "state": ""
            },
            {
                "a": "Registered",
                "b": "2026-07-09 15:37 UTC",
                "state": ""
            },
            {
                "a": "Last changed",
                "b": "2026-07-14 15:37 UTC",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "Read from the registry over RDAP, the protocol that replaced WHOIS. Registrant contact …"
        ]
    }
}
GET/api/v1/tool?name=email-auth ✉️ SPF、DKIM 和 DMARC 记录。
GET /api/v1/tool?name=email-auth&value=astrina.io{
    "ok": true,
    "utility": "email-auth",
    "ms": 1954,
    "result": {
        "summary": [
            {
                "label": "SPF",
                "value": "present",
                "state": "ok"
            },
            {
                "label": "DKIM",
                "value": "1 selector(s)",
                "state": "ok"
            },
            {
                "label": "DMARC",
                "value": "p=none",
                "state": "warn"
            },
            "…"
        ],
        "cols": [
            "Mechanism",
            "Record",
            "Finding",
            "…"
        ],
        "rows": [
            {
                "a": "MX",
                "b": "mail.astrina.io",
                "c": "priority 10",
                "d": "",
                "state": "ok"
            },
            {
                "a": "SPF",
                "b": "v=spf1 a mx ip4:149.202.80.42 ~all",
                "c": "Ends in ~all (softfail) with about 2 lookups. Move to -all once you are confident the l…",
                "d": "2 lookups",
                "state": "ok"
            },
            {
                "a": "DMARC",
                "b": "v=DMARC1; p=none; rua=mailto:[email protected]; fo=1",
                "c": "p=none — monitoring only. It collects reports and blocks nothing, which is the right pl…",
                "d": "100%",
                "state": "warn"
            },
            "…"
        ],
        "notes": [
            "Move from p=none to p=quarantine once the reports show your legitimate senders passing.…",
            "All of this is read from public DNS. Nothing was sent to your mail servers and no messa…"
        ]
    }
}
GET/api/v1/tool?name=http2 ⚡ 使用了哪种协议和压缩。
GET /api/v1/tool?name=http2&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "http2",
    "ms": 122,
    "result": {
        "summary": [
            {
                "label": "Protocol",
                "value": "HTTP/2",
                "state": "ok"
            },
            {
                "label": "Compression",
                "value": "Zstandard",
                "state": "ok"
            },
            {
                "label": "HTTP/3",
                "value": "advertised",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Measure",
            "Value",
            "What it means"
        ],
        "rows": [
            {
                "a": "Negotiated protocol",
                "b": "HTTP/2",
                "c": "Multiplexed: many requests share one connection, so head-of-line blocking on the browse…",
                "state": "ok"
            },
            {
                "a": "Compression",
                "b": "Zstandard",
                "c": "Zstandard — fast and compact where the client supports it.",
                "state": "ok"
            },
            {
                "a": "Alt-Svc",
                "b": "h3=\":443\"; ma=86400",
                "c": "HTTP/3 is advertised, so browsers will move to QUIC after the first request.",
                "state": "ok"
            },
            "…"
        ],
        "notes": [
            "We ask for every encoding we can accept, so what is reported is what your server chose …"
        ]
    }
}
GET/api/v1/tool?name=ip-info 📍 地址的地理位置和网络。
GET /api/v1/tool?name=ip-info&value=astrina.io{
    "ok": true,
    "utility": "ip-info",
    "ms": 2145,
    "result": {
        "summary": [
            {
                "label": "Host",
                "value": "astrina.io",
                "state": ""
            },
            {
                "label": "Addresses",
                "value": "4",
                "state": "ok"
            },
            {
                "label": "IPv6",
                "value": "yes",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Address",
            "Family",
            "Network",
            "…"
        ],
        "rows": [
            {
                "a": "104.21.34.236",
                "b": "IPv4",
                "c": "AS13335 — CLOUDFLARENET - Cloudflare, Inc., US",
                "d": "104.21.32.0/19",
                "e": "US",
                "f": "no reverse DNS",
                "state": "warn"
            },
            {
                "a": "172.67.166.83",
                "b": "IPv4",
                "c": "AS13335 — CLOUDFLARENET - Cloudflare, Inc., US",
                "d": "172.67.160.0/20",
                "e": "US",
                "f": "no reverse DNS",
                "state": "warn"
            },
            {
                "a": "2606:4700:3035::6815:22ec",
                "b": "IPv6",
                "c": "AS13335 — CLOUDFLARENET - Cloudflare, Inc., US",
                "d": "2606:4700:3035::/48",
                "e": "US",
                "f": "no reverse DNS",
                "state": "warn"
            },
            "…"
        ],
        "notes": [
            "4 addresses answer for this name. That is normal for a CDN or a load balancer.",
            "The country shown is the one recorded on the address allocation in the routing registry…",
            "No commercial geolocation database was consulted, so there is no city, no coordinate an…"
        ]
    }
}
GET/api/v1/tool?name=ports 🔌 知名服务端口,已安全检查。
GET /api/v1/tool?name=ports&value=https%3A%2F%2Fexample.com%2F{ "ok": true, "utility": "ports", "ms": 0, "result": { … } }
GET/api/v1/tool?name=cookies 🍪 Cookies 及其针对 GDPR 的标志。
GET /api/v1/tool?name=cookies&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "cookies",
    "ms": 103,
    "result": {
        "summary": [
            {
                "label": "Cookies in response",
                "value": "1",
                "state": "ok"
            },
            {
                "label": "Third-party trackers",
                "value": "0",
                "state": "ok"
            },
            {
                "label": "Consent mechanism",
                "value": "detected",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Name",
            "Value",
            "Secure",
            "…"
        ],
        "rows": [
            {
                "a": "astrsess",
                "b": "44c774bdb4b0b81bd429e64545acc9a7",
                "c": "yes",
                "d": "yes",
                "e": "lax",
                "f": "session",
                "g": "flags look right",
                "state": "ok"
            }
        ],
        "notes": [
            "Cookies set later by JavaScript, or after a login, are outside what a single anonymous …"
        ]
    }
}
GET/api/v1/tool?name=cors 🔓 您的端点允许哪些来源。
GET /api/v1/tool?name=cors&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "cors",
    "ms": 884,
    "result": {
        "summary": [
            {
                "label": "CORS enabled",
                "value": "no",
                "state": "ok"
            },
            {
                "label": "Allowed origin",
                "value": "same origin only",
                "state": "ok"
            },
            {
                "label": "Origin reflection",
                "value": "none",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Header or probe",
            "Value",
            "Meaning"
        ],
        "rows": [
            {
                "a": "Access-Control-Allow-Origin",
                "b": "— not sent —",
                "c": "No CORS headers on a request that carried no Origin. That is the ordinary case; what ma…",
                "state": "ok"
            },
            {
                "a": "Access-Control-Allow-Credentials",
                "b": "— not sent —",
                "c": "Credentials are not shared.",
                "state": "ok"
            },
            {
                "a": "Access-Control-Allow-Methods",
                "b": "— not sent —",
                "c": "Sent on preflight responses.",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "Two forged origins were sent and neither was echoed back, so this endpoint does not bui…",
            "This is a GET carrying an Origin header, not a full preflight. An endpoint that answers…"
        ]
    }
}
🎨 CSS (1)
GET/api/v1/tool?name=palette-url 🌐 网站实际使用的颜色。
GET /api/v1/tool?name=palette-url&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "palette-url",
    "ms": 578,
    "result": {
        "summary": [
            {
                "label": "Distinct colours",
                "value": "132",
                "state": "warn"
            },
            {
                "label": "Stylesheets read",
                "value": "2 / 2",
                "state": "ok"
            },
            {
                "label": "CSS custom properties",
                "value": "28",
                "state": "ok"
            },
            "…"
        ],
        "cols": [
            "Colour",
            "RGB",
            "Uses",
            "…"
        ],
        "rows": [
            {
                "a": "#ffffff",
                "b": "rgb(255, 255, 255)",
                "c": "40",
                "d": "near-white",
                "e": "contrast on white 1.0:1 · on black 21.0:1",
                "state": ""
            },
            {
                "a": "#000000",
                "b": "rgb(0, 0, 0)",
                "c": "27",
                "d": "near-black",
                "e": "contrast on white 21.0:1 · on black 1.0:1",
                "state": ""
            },
            {
                "a": "#5b5bd6",
                "b": "rgb(91, 91, 214)",
                "c": "20",
                "d": "brand or accent",
                "e": "contrast on white 5.4:1 · on black 3.9:1",
                "state": ""
            },
            "…"
        ],
        "notes": [
            "Over 60 distinct colours. That is usually several palettes layered by different people …",
            "Counts are how often a colour appears in the CSS, which is not the same as how much of …"
        ]
    }
}
{ } DevOps (1)
GET/api/v1/tool?name=php-version 🐘 检测服务器显示的 PHP 版本。
GET /api/v1/tool?name=php-version&value=https%3A%2F%2Fastrina.io%2F{
    "ok": true,
    "utility": "php-version",
    "ms": 74,
    "result": {
        "summary": [
            {
                "label": "PHP version",
                "value": "not disclosed",
                "state": "ok"
            },
            {
                "label": "Security support",
                "value": "unknown",
                "state": ""
            },
            {
                "label": "Version leaked",
                "value": "no",
                "state": "ok"
            }
        ],
        "cols": [
            "Field",
            "Value",
            "Verdict"
        ],
        "rows": [
            {
                "a": "PHP detected",
                "b": "no",
                "c": "Nothing in the response names PHP. The site may not use it, or it may simply be configu…",
                "state": "ok"
            },
            {
                "a": "Server header",
                "b": "cloudflare",
                "c": "No version published here.",
                "state": "ok"
            }
        ],
        "notes": [
            "This reads only what the server volunteers in its headers. Nothing is probed, and a sit…"
        ]
    }
}

使用 Astrina 登录(身份验证 API)

通过一次集成将社交登录添加到您的网站。Astrina是OAuth2/OIDC风格的中介;您只需注册一次网站并重用每个启用的提供者。

GET /auth/authorize.php将用户发送到此处(添加 &provider=google 以跳过选择器)。返回一个代码到您的 redirect_uri。
POST /auth/token.php用代码(服务器端,带有您的客户端密钥)交换身份:sub、提供者、电子邮件、姓名、头像。
GET /auth/providers.php列出当前启用的提供者,并提供准备好的深度链接登录网址。

即插即用的 PHP SDK + 完整指南: 集成指南 · 下载 sdk.php

图像优化 API

压缩和转换图像 (JPEG, PNG, GIF, WebP, AVIF, SVG) — 无损或有损。发送文件、URL 或 base64;获取优化后的图像及其节省的大小。

POST /api/v1/image正文:image=@file,或 JSON {url} / {data:base64}。选项:lossy=1|0,format=keep|webp|avif|jpeg|png,quality,resize。返回输入/输出字节,saved_percent 和下载 URL。
GET /api/v1/image?get=…通过其令牌获取优化结果 — 无需密钥,直接将 URL 交给图像标签。

仅限付费计划;按您的每月图像配额计量。网页界面: 图像优化器

您未调用的端点

在 /api/v1 下存在两个不适用于您的代码的家族,列在这里以便此页面是完整的地图:

POST /api/v1/social/inbound提供者 webhook 接收器(Meta / WhatsApp Cloud API)。由提供者调用,而不是您:GET 是订阅握手,POST 发送消息。在中配置它 社交.
/api/v1/node/…Pulsar 设备协议 — 注册、下一个、提交、心跳及相关 — 由节点代理发言,而不是 API 密钥。它与协议的其余部分一起记录在 Pulsar 协议页面.

网站组

GET/api/v1/groups 您的站点组及其成员——/api/v1/stats?group=…所需的组ID,无需抓取仪表板。
GET /api/v1/groups
X-Api-Key: ak_your_key_here

{ "ok":true, "groups":[ { "id":4, "name":"Client sites", "sites":[ {"id":12,"domain":"example.com"} ] } ] }

只读;组在中编辑 我的站点组. 范围 groups.

推广快照

GET/api/v1/promotion?site=… 您网站的推广图像作为 JSON:排名、地理、反向链接、审计和目标——与推广中心显示的数字相同。
参数描述
site站点 ID 或域名 — 必须属于密钥的所有者
sectionsummary (default) · rankings · geo · backlinks · audit · goals

平台没有数据的字段返回 null — 永远不是猜测。范围 promotion.

脉冲星网络数据

GET/api/v1/pulsar?site=… 您拥有的网站的分布式监控,由独立设备收集:来自多个视角的每个监控确认,以及按国家的延迟。
参数描述
site站点 ID 或域名(必填)
reportmonitors (default) · coverage

每个数字都是来自独立设备的法定人数裁决;当网络尚未决定时,值为 null,而不是单个服务器的意见。 关于网络.

评论

GET/api/v1/comment?key=… 按 URL 对任何页面进行审核的现场评论。与插入评论小部件使用的存储相同。
GET  /api/v1/comment?key=https://example.com/post
POST /api/v1/comment   key=https://example.com/post&author=Ann&body=Nice+one

正文以纯文本形式存储(标签已去除) — 在渲染时转义。审核和小部件位于 评论.

威胁情报导出

GET/api/v1/ti-export 许可意识导出的威胁情报语料库:仅限可再分发许可或 Astrina 来源的行,每行都携带其来源以便归属。

双重门控:有效的密钥和操作员开关,直到商业条款达成一致之前均处于关闭状态。限制性许可的馈送永远不会被包含,无论计划如何。

此页面回答的问题

  • API 端点参考
  • API 身份验证和配额
  • API 请求示例
  • REST JSON API 文档
  • 如何获取 API 密钥
  • 什么是 astrina api
  • astrina api 如何运作
  • astrina api 解释
  • astrina api 指南
  • 如何开始使用 astrina api
  • astrina api 评论
  • astrina api 值得吗
  • astrina api 定价
  • astrina api 替代品
  • astrina api 适合初学者
  • 为什么选择 astrina api
  • astrina api — 你得到的