当前位置: 首页 > Skill >

x402-direct

x402-direct

1.0.0 2026.11.08 浏览:789
获取Skill文件查看使用说明
作者:叶知许可证:
本文目录展开

x402.direct -- Service Directory

The x402.direct API is a directory of x402-enabled services. It indexes services that accept x402 payments (HTTP 402 + crypto) and provides search, browsing, and trust scoring.

Base URL: https://x402.direct

Endpoints

1. Search (Paid -- $0.001 via x402)

GET /api/search?q=<query>

Full-text search across all indexed services. Results ranked by blended text relevance + trust score. Protected by x402 middleware -- first request returns HTTP 402, re-send with payment proof.

Parameters:

Param Type Required Description
q string yes Search query (max 500 chars)
category string no Filter by category
network string no Filter by blockchain network
maxPrice string no Max price in atomic units (bigint)
minScore integer no Minimum trust score (0-100)
limit integer no Max results (default 20, max 50)

Example:

curl "https://x402.direct/api/search?q=weather+api&minScore=60&limit=5"

Response shape:

{
  "query": "weather api",
  "count": 3,
  "results": [
    {
      "id": 42,
      "resourceUrl": "https://example.com/api/weather",
      "description": "Real-time weather data for any location",
      "category": "weather",
      "provider": "example.com",
      "network": "base-mainnet",
      "price": "1000",
      "priceUsd": "0.001",
      "scoutScore": 85,
      "scoutVerdict": "safe",
      "relevance": 0.3214,
      "score": 58.11
    }
  ]
}

x402 payment flow:

  1. Send GET to /api/search?q=... with no payment header.
  2. Server returns HTTP 402 with payment details in the response body (price, network, payTo address, facilitator URL).
  3. Pay $0.001 USDC on Base (via agent wallet or Coinbase Agentic Wallet).
  4. Re-send the same request with X-402-Payment: <proof> header.
  5. Server verifies payment via facilitator and returns search results.

If using an x402-aware HTTP client (e.g., x402 npm package), the payment is handled automatically:

import { createX402Client } from "x402";
const client = createX402Client({ wallet: agentWallet });
const resp = await client.fetch("https://x402.direct/api/search?q=weather+api");

2. Browse Services (Free)

GET /api/services

Paginated list of all indexed services. No payment required.

Parameters:

Param Type Default Description
page integer 1 Page number
limit integer 50 Results per page (max 100)
category string -- Filter by category
network string -- Filter by network
sort string score Sort: score, newest, price
minScore integer -- Minimum trust score (0-100)

Examples:

# Top-rated AI services
curl "https://x402.direct/api/services?category=ai&sort=score&limit=10"

# Newest services on Base mainnet
curl "https://x402.direct/api/services?network=base-mainnet&sort=newest"

# Only high-trust services
curl "https://x402.direct/api/services?minScore=70&sort=score"

Response shape:

{
  "services": [
    {
      "id": 1,
      "resourceUrl": "https://example.com/api/generate",
      "type": "x402",
      "description": "AI text generation endpoint",
      "category": "ai",
      "provider": "example.com",
      "network": "base-mainnet",
      "scheme": "exact",
      "price": "5000",
      "priceUsd": "0.005",
      "scoutScore": 92,
      "scoutVerdict": "safe",
      "lastSeen": "2025-05-01T12:00:00.000Z",
      "createdAt": "2025-04-15T08:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 127,
    "totalPages": 3
  }
}

3. Service Details (Free)

GET /api/services/:id

Full details for a single service including payment options, raw metadata, and facilitator info.

Example:

curl "https://x402.direct/api/services/42"

Response shape:

{
  "id": 42,
  "resourceUrl": "https://example.com/api/weather",
  "type": "x402",
  "x402Version": "1",
  "description": "Real-time weather data for any location",
  "mimeType": "application/json",
  "category": "weather",
  "provider": "example.com",
  "network": "base-mainnet",
  "scheme": "exact",
  "price": "1000",
  "priceUsd": "0.001",
  "payTo": "0xAbC123...",
  "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "scoutScore": 85,
  "scoutVerdict": "safe",
  "accepts": [{"scheme": "exact", "network": "base-mainnet", "maxAmountRequired": "1000", "asset": "..."}],
  "metadata": {"description": "...", "mimeType": "application/json"},
  "lastSeen": "2025-05-01T12:00:00.000Z",
  "lastUpdated": "2025-05-01T12:00:00.000Z",
  "createdAt": "2025-04-15T08:00:00.000Z",
  "facilitator": {
    "name": "x402.org",
    "url": "https://x402.org/facilitator",
    "facilitatorId": "x402-org-mainnet"
  }
}

4. Ecosystem Stats (Free)

GET /api/stats

High-level directory statistics. Good for dashboards or understanding the ecosystem at a glance.

Example:

curl "https://x402.direct/api/stats"

Response shape:

{
  "services": 247,
  "providers": 38,
  "categories": 12,
  "facilitators": 3,
  "avgScoutScore": 62,
  "networks": [
    { "network": "base-mainnet", "count": 180 },
    { "network": "base-sepolia", "count": 45 },
    { "network": "polygon", "count": 15 },
    { "network": "solana", "count": 7 }
  ]
}

Filter Values

Categories: ai, image, weather, search, data, audio, video, developer, finance, language, storage, other

Networks: base-mainnet, base-sepolia, polygon, solana (more may appear as the ecosystem grows)

Sort options: score (trust score, default), newest (creation date), price (cheapest first)

Trust Score (ScoutScore)

Every service is scored 0-100 based on automated trust signals:

  • HTTPS transport security
  • Mainnet vs testnet deployment
  • Domain uniqueness and provider reputation
  • Description quality and documentation
  • Pricing reasonableness
  • Valid payment address
  • Custom domain (not generic hosting)

Verdicts:

Score Range Verdict Meaning
70-100 safe Well-documented, mainnet, custom domain
40-69 caution Some trust signals missing
0-39 avoid Missing critical trust signals

Recommendation: Use minScore=60 or higher when searching for production-ready services. Use minScore=0 only when exploring or debugging.

Usage Patterns

Find a service for a specific task:

# Agent needs image generation
curl "https://x402.direct/api/services?category=image&sort=score&minScore=60&limit=5"

Search with specific capability in mind (paid):

curl "https://x402.direct/api/search?q=text+to+speech&minScore=70" 
  -H "X-402-Payment: <proof>"

Get full details before calling a service:

# Found service ID 42 from browse/search, now get payment details
curl "https://x402.direct/api/services/42"
# Use the payTo, asset, network, and price fields to construct the x402 payment

Check ecosystem health:

curl "https://x402.direct/api/stats"

Decision Guide

Goal Endpoint Cost
Browse by category/network /api/services Free
Get service payment details /api/services/:id Free
Natural language search /api/search $0.001
Ecosystem overview /api/stats Free

Prefer /api/services with filters when the category is known. Use /api/search when the agent needs semantic/keyword matching across descriptions and providers.

相关文章

更多
Linux find命令结合rm删除文件时出现No such file or directory错误的排查与解决

在Linux系统中使用find命令结合rm进行批量删除时,若目标目录下的子目录被提前删除,find继续遍历该路径时会抛出“No such file or directory”错误。尽管报错,但符合条件的文件通常已被成功删除。通过将-maxdepth参数置于其他参数之前,限制find仅搜索第一层目录,可有效避免此类错误并提升执行效率。

2025.03.31 531
Linux执行.sh文件提示No such file or directory的三种解决方法

在Linux中执行.sh文件时若遇到“No such file or directory”报错,通常由Windows与Linux的文件格式差异或权限不足引起。可通过UltraEdit等工具将编码从DOS转换为UNIX,或在vim编辑器中使用:set ff=unix命令修改文件格式,同时确保文件具备可执行权限(chmod u+x)。

2026.01.28 486
Laravel执行migrate命令提示:No such file or directory的解决方法

在使用 Laravel 命令行工具执行数据库迁移时,若遇到 mysql 2002 错误或提示 No such file or directory,通常是因为数据库连接配置中的 socket 路径不匹配。本文介绍两种在 Laravel 5 环境下的解决方案:一是在数据库配置文件中显式添加 unix_socket 项以指定正确的 socket 文件路径;二是临时修改 .env 文件中的 DB_HOST 为 localhost:8889 以强制使用 TCP 连接,但需注意操作后需恢复原配置以免网站前台无法连接数据库。

2026.01.17 426
Linux为现有用户创建主目录及修复登录问题

在Linux系统中使用useradd命令时,若未添加-m参数,系统将不会自动创建用户的主目录。对于已存在的用户,可通过执行mkhomedir_helper命令来补建主目录并复制默认配置文件。由于该命令不修改/etc/passwd中的家目录路径,可能导致登录后出现“Change directory failed”错误,此时需使用usermod命令修正家目录设置以恢复正常登录。

2026.02.06 329
Skill 文件
  • SKILL.md
    • x402.direct -- Service Directory
    • Endpoints
      • 1. Search (Paid -- $0.001 via x402)
      • 2. Browse Services (Free)
      • 3. Service Details (Free)
      • 4. Ecosystem Stats (Free)
    • Filter Values
    • Trust Score (ScoutScore)
    • Usage Patterns
    • Decision Guide
  • 项目或源文件

相关 Skill

更多
网易邮箱大师本地读取 网易邮箱大师本地读取 Locate, search, and read NetEase Mail Master (网易邮箱大师) local macOS mail data without using the app's AI search or network APIs. Use when Codex needs to find the Mail Master data directory, search local mail by keyword, date, account, or folder, read and decompress message bodies, inspect message metadata, or analyze mailbox content for any user-requested mail task.
AgentWeb.live — Global Business Directory AgentWeb.live — Global Business Directory 在AgentWeb.live全球企业目录中搜索并获取企业信息。适用于用户需要查找企业、获取电话号码、地址、邮件等场景。
AgentMade — Directory for Agent-Built Projects AgentMade — Directory for Agent-Built Projects 在 AgentMade 提交、发现、投票及评论 AI 智能体构建的项目——这是首个专注于 AI 智能体作品的公开目录。
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表