蜡笔猫导航

HTTP API

只读 JSON 接口,MCP、Skill、CLI 底层都用它。无需注册和 API Key,支持跨域调用。

基础信息

https://www.crayoncat.online/api/agent/v1
  • 只有 GET 请求,返回 JSON;成功时 ok: true。
  • 失败时返回 { "ok": false, "code": "…", "message": "…" },message 会说明哪个参数有问题。
  • 结果可能有最多 1 分钟的缓存。
  • OpenAPI 3.1 描述:https://www.crayoncat.online/api/agent/v1/openapi.json,可导入 Postman 或给支持 OpenAPI 的 Agent 使用。

GET /categories

列出有已发布资源的分类。

示例
curl https://www.crayoncat.online/api/agent/v1/categories
返回
{
  "ok": true,
  "categories": [
    {
      "slug": "ui-components",
      "name": "UI 组件库",
      "count": 12
    }
  ]
}

GET /tags

列出常用标签,按使用量排序,最多 50 个。

参数说明
category可选,只看某个分类的标签
示例
curl "https://www.crayoncat.online/api/agent/v1/tags?category=ui-components"

GET /resources

筛选资源。所有参数都可选;有关键词时只返回命中的资源,按相关度排序,否则按精选和更新时间排序。

参数说明
q关键词或一句需求描述,中英文均可,最多 100 字
category分类 slug
tag标签 slug,可重复传多个(需同时具备),最多 5 个;也可用 tags=a,b
pricingfree / freemium / paid
limit每页条数,1–20,默认 10
cursor翻页:传上一页返回的 nextCursor
示例
curl "https://www.crayoncat.online/api/agent/v1/resources?category=ui-components&q=React%20无样式&limit=3"
返回
{
  "ok": true,
  "total": 12,
  "nextCursor": "3",
  "items": [
    {
      "slug": "shadcn-ui",
      "name": "shadcn/ui",
      "summary": "可复制进项目的 React 组件集合,基于 Radix 与 Tailwind",
      "category": "ui-components",
      "tags": [
        "react",
        "tailwind"
      ],
      "pricing": "free",
      "websiteUrl": "https://ui.shadcn.com",
      "githubUrl": "https://github.com/shadcn-ui/ui",
      "url": "https://www.crayoncat.online/resources/shadcn-ui"
    }
  ]
}

pricing 为 null 表示价格类型未知;nextCursor 为 null 表示没有下一页。

GET /resources/{slug}

资源详情。quickstart 是安装命令或配置片段,没有时为 null;siteTools 是本站可直接使用的配套工具(如已预填的 MCP 配置生成器)。

示例
curl https://www.crayoncat.online/api/agent/v1/resources/shadcn-ui
返回
{
  "ok": true,
  "slug": "shadcn-ui",
  "name": "shadcn/ui",
  "summary": "…",
  "description": "…",
  "category": {
    "slug": "ui-components",
    "name": "UI 组件库"
  },
  "tags": [
    {
      "slug": "react",
      "name": "React"
    }
  ],
  "pricing": "free",
  "pricingNote": null,
  "websiteUrl": "https://ui.shadcn.com",
  "githubUrl": "https://github.com/shadcn-ui/ui",
  "url": "https://www.crayoncat.online/resources/shadcn-ui",
  "highlights": [
    "…"
  ],
  "useCases": [
    "…"
  ],
  "platforms": [
    "web"
  ],
  "quickstart": "npx shadcn@latest init",
  "siteTools": [],
  "updatedAt": "2026-10-30T08:00:00.000Z"
}

错误码

HTTPcode说明
400invalid_input参数不合法,看 message
404not_found资源不存在或未发布
429rate_limited请求太频繁,按 Retry-After 等待后重试
500error服务出错,稍后再试