agentapi

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AgentAPI — AI Agent Native API Provider

AgentAPI — 面向AI Agent的原生API提供商

AgentAPI is an API provider built for the agentic era. No API keys, no signups, no monthly subscriptions. Just pay with USDC per request via the x402 protocol and instantly access 337+ external APIs.
Traditional API providers: Sign up → Generate API key → Subscribe to a plan → Manage rate limits → Rotate keys
AgentAPI: Have a wallet → Call the endpoint → Pay per request. Done.
AI Agents can autonomously discover available endpoints, pay the exact cost per call, and get results — all without human intervention or pre-provisioned credentials.
AgentAPI是为智能体时代打造的API提供商。无需API密钥、无需注册、无需月度订阅。只需通过x402协议按次请求支付USDC,即可立即访问337+个外部API。
传统API提供商流程:注册 → 生成API密钥 → 订阅套餐 → 管理速率限制 → 轮换密钥
AgentAPI流程:拥有钱包 → 调用端点 → 按次付费。完成。
AI Agent可自主发现可用端点、为每次调用支付精确费用并获取结果——全程无需人工干预或预先配置凭证。

Available Endpoints

可用端点

PathPriceDescription
/finance/seeking-alpha/v2/auto-complete
$0.001Seeking Alpha auto-complete
/finance/seeking-alpha/market/get-realtime-quotes
$0.001Get realtime quotes
/finance/yahoo-finance/v6/finance/quote
$0.001Yahoo Finance quote
/social/tiktok/search/search-user
$0.001Search TikTok users
/social/tiktok/search/search-sound
$0.001Search TikTok sounds
/data/social/twitter/followers
$0.001Get Twitter followers
/data/social/twitter/timeline
$0.001Get Twitter timeline
/data/social/twitter/tweets
$0.001Get Twitter tweets
/realty/properties/v3/list
$0.001List properties for sale/rent
/realty/locations/v2/auto-complete
$0.001Location auto-complete
/search/google
$0.001Google search results
/news/crypto/listings/latest
$0.001Latest crypto news
Server URL:
https://agentapi-production.up.railway.app
路径价格描述
/finance/seeking-alpha/v2/auto-complete
$0.001Seeking Alpha 自动补全
/finance/seeking-alpha/market/get-realtime-quotes
$0.001获取实时报价
/finance/yahoo-finance/v6/finance/quote
$0.001Yahoo Finance 报价
/social/tiktok/search/search-user
$0.001搜索TikTok用户
/social/tiktok/search/search-sound
$0.001搜索TikTok音效
/data/social/twitter/followers
$0.001获取Twitter关注者
/data/social/twitter/timeline
$0.001获取Twitter时间线
/data/social/twitter/tweets
$0.001获取Twitter推文
/realty/properties/v3/list
$0.001列出待售/待租房产
/realty/locations/v2/auto-complete
$0.001地点自动补全
/search/google
$0.001Google搜索结果
/news/crypto/listings/latest
$0.001最新加密货币新闻
服务器地址
https://agentapi-production.up.railway.app

Prerequisites & Setup

前提条件与设置

1. awal CLI Authentication

1. awal CLI 身份验证

The awal CLI (
npx awal@latest
) handles wallet operations and x402 payments. You must authenticate before making paid API calls.
Check status:
bash
npx awal@latest status
If not authenticated, use the email OTP flow:
bash
undefined
awal CLI(
npx awal@latest
)负责处理钱包操作和x402支付。在进行付费API调用前,您必须完成身份验证。
检查状态
bash
npx awal@latest status
若未验证,使用邮箱OTP流程:
bash
undefined

Step 1: Send OTP to your email

步骤1:向您的邮箱发送OTP

npx awal@latest auth login user@example.com
npx awal@latest auth login user@example.com

Output: flowId: abc123...

输出:flowId: abc123...

Step 2: Verify with the 6-digit code from email

步骤2:使用邮箱中的6位验证码验证

npx awal@latest auth verify abc123 123456
npx awal@latest auth verify abc123 123456

Confirm authentication

确认身份验证状态

npx awal@latest status

See the `authenticate-wallet` skill for details.
npx awal@latest status

详情请查看`authenticate-wallet`技能。

2. Fund the Wallet

2. 为钱包充值

Check your USDC balance:
bash
npx awal@latest balance
If insufficient, fund via Coinbase Onramp:
bash
npx awal@latest show
This opens the wallet companion UI where you can fund with Apple Pay, debit card, bank transfer, or Coinbase account. Alternatively, send USDC on Base directly to your wallet address:
bash
npx awal@latest address
See the
fund
skill for details.
检查您的USDC余额:
bash
npx awal@latest balance
若余额不足,通过Coinbase Onramp充值:
bash
npx awal@latest show
这将打开钱包配套UI,您可以通过Apple Pay、借记卡、银行转账或Coinbase账户进行充值。或者,直接在Base网络上将USDC发送至您的钱包地址:
bash
npx awal@latest address
详情请查看
fund
技能。

Summary

摘要

RequirementCheckSkill
Wallet authenticated
npx awal@latest status
authenticate-wallet
USDC balance
npx awal@latest balance
fund
要求检查命令对应技能
钱包已验证
npx awal@latest status
authenticate-wallet
USDC余额充足
npx awal@latest balance
fund

Usage

使用方法

All requests are made via
npx awal@latest x402 pay
, which handles USDC payment automatically.
所有请求均通过
npx awal@latest x402 pay
发送,该命令会自动处理USDC支付。

Finance — Get Realtime Quotes

金融领域 — 获取实时报价

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/finance/seeking-alpha/market/get-realtime-quotes?symbols=aapl,tsla"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/finance/seeking-alpha/market/get-realtime-quotes?symbols=aapl,tsla"

Finance — Yahoo Finance Quote

金融领域 — Yahoo Finance 报价

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/finance/yahoo-finance/v6/finance/quote?symbols=aapl"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/finance/yahoo-finance/v6/finance/quote?symbols=aapl"

Social TikTok — Search Users

社交领域TikTok — 搜索用户

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/social/tiktok/search/search-user?query=crypto"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/social/tiktok/search/search-user?query=crypto"

Social TikTok — Search Sounds

社交领域TikTok — 搜索音效

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/social/tiktok/search/search-sound?query=music"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/social/tiktok/search/search-sound?query=music"

Twitter — Get Followers

Twitter — 获取关注者

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/data/social/twitter/followers?id=44196397&count=20"
The
id
parameter is the Twitter user ID (numeric).
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/data/social/twitter/followers?id=44196397&count=20"
id
参数为Twitter用户ID(数字格式)。

Twitter — Get Timeline

Twitter — 获取时间线

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/data/social/twitter/timeline?id=44196397"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/data/social/twitter/timeline?id=44196397"

Twitter — Get Tweets

Twitter — 获取推文

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/data/social/twitter/tweets?id=44196397"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/data/social/twitter/tweets?id=44196397"

Google Search

Google搜索

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/search/google?query=bitcoin+price"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/search/google?query=bitcoin+price"

Real Estate — List Properties

房地产领域 — 列出房产

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/realty/properties/v3/list" -X POST -d '{"city": "San Francisco, CA"}'
Note: Real estate list endpoint uses POST with a JSON body. Use
-X POST -d '{...}'
to send the request body.
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/realty/properties/v3/list" -X POST -d '{"city": "San Francisco, CA"}'
注意:房产列表端点需使用POST方法并携带JSON请求体。请使用
-X POST -d '{...}'
来发送请求体。

Real Estate — Location Auto-Complete

房地产领域 — 地点自动补全

bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/realty/locations/v2/auto-complete?input=San+Francisco"
bash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/realty/locations/v2/auto-complete?input=San+Francisco"

Response Examples

响应示例

Finance Quote (
/finance/seeking-alpha/market/get-realtime-quotes
)

金融报价(
/finance/seeking-alpha/market/get-realtime-quotes

json
{
  "result": {
    "quotes": [
      {
        "symbol": "AAPL",
        "price": 178.52,
        "change": 2.34,
        "change_percent": 1.33
      }
    ]
  }
}
json
{
  "result": {
    "quotes": [
      {
        "symbol": "AAPL",
        "price": 178.52,
        "change": 2.34,
        "change_percent": 1.33
      }
    ]
  }
}

Twitter Followers (
/data/social/twitter/followers
)

Twitter关注者(
/data/social/twitter/followers

json
{
  "result": {
    "users": [
      {
        "id": "123456789",
        "name": "John Doe",
        "username": "johndoe",
        "followers_count": 1000,
        "profile_image_url": "https://..."
      }
    ]
  }
}
json
{
  "result": {
    "users": [
      {
        "id": "123456789",
        "name": "John Doe",
        "username": "johndoe",
        "followers_count": 1000,
        "profile_image_url": "https://..."
      }
    ]
  }
}

Google Search (
/search/google
)

Google搜索(
/search/google

json
{
  "result": {
    "results": [
      {
        "title": "Bitcoin Price",
        "link": "https://example.com/bitcoin",
        "snippet": "Bitcoin is trading at..."
      }
    ]
  }
}
json
{
  "result": {
    "results": [
      {
        "title": "Bitcoin Price",
        "link": "https://example.com/bitcoin",
        "snippet": "Bitcoin is trading at..."
      }
    ]
  }
}

Real Estate Property Detail (
/realty/properties/v3/detail
)

房地产房产详情(
/realty/properties/v3/detail

json
{
  "result": {
    "property_id": "12345",
    "listing_id": "67890",
    "price": 1250000,
    "address": {
      "street": "123 Main St",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "94102"
    },
    "beds": 3,
    "baths": 2,
    "sqft": 1800
  }
}
json
{
  "result": {
    "property_id": "12345",
    "listing_id": "67890",
    "price": 1250000,
    "address": {
      "street": "123 Main St",
      "city": "San Francisco",
      "state": "CA",
      "zip_code": "94102"
    },
    "beds": 3,
    "baths": 2,
    "sqft": 1800
  }
}

Service Catalog

服务目录

Retrieve the full list of available endpoints and their prices:
bash
curl https://agentapi-production.up.railway.app/catalog
Returns:
json
[
  { "path": "/finance/seeking-alpha/v2/auto-complete", "method": "GET", "price": "$0.001", "description": "Seeking Alpha auto-complete" },
  { "path": "/social/tiktok/search/search-user", "method": "GET", "price": "$0.001", "description": "Search TikTok users" },
  { "path": "/realty/properties/v3/list", "method": "POST", "price": "$0.001", "description": "List properties for sale/rent" },
  ...
]
Total: 337+ endpoints across Finance (269), Social (28), Real Estate (12), News (7).
获取所有可用端点及其价格的完整列表:
bash
curl https://agentapi-production.up.railway.app/catalog
返回结果:
json
[
  { "path": "/finance/seeking-alpha/v2/auto-complete", "method": "GET", "price": "$0.001", "description": "Seeking Alpha auto-complete" },
  { "path": "/social/tiktok/search/search-user", "method": "GET", "price": "$0.001", "description": "Search TikTok users" },
  { "path": "/realty/properties/v3/list", "method": "POST", "price": "$0.001", "description": "List properties for sale/rent" },
  ...
]
总计:337+个端点,涵盖金融(269个)、社交(28个)、房地产(12个)、新闻(7个)领域。

Health Check

健康检查

bash
curl https://agentapi-production.up.railway.app/health
Returns:
{"status": "ok"}
bash
curl https://agentapi-production.up.railway.app/health
返回:
{"status": "ok"}

Troubleshooting

故障排除

ErrorCauseFix
HTTP 402Payment requiredUse
npx awal@latest x402 pay
instead of plain
curl
to make the request
HTTP 502Upstream API errorThe backend service may be temporarily unavailable. Retry after a few seconds
"not signed in"
Wallet not authenticatedRun
npx awal@latest auth login <email>
to authenticate. See
authenticate-wallet
skill
"insufficient balance"
Not enough USDCRun
npx awal@latest show
to fund the wallet. See
fund
skill
Empty responseInvalid parametersCheck query parameters — e.g. Twitter endpoints require
?id=
(numeric user ID)
Real Estate 400Missing request bodyList properties endpoint requires POST with JSON body:
-X POST -d '{"city": "..."}'
错误原因解决方法
HTTP 402需要支付请使用
npx awal@latest x402 pay
而非普通
curl
来发送请求
HTTP 502上游API错误后端服务可能暂时不可用。请几秒后重试
"not signed in"
钱包未验证运行
npx awal@latest auth login <email>
进行验证。详情请查看
authenticate-wallet
技能
"insufficient balance"
USDC余额不足运行
npx awal@latest show
为钱包充值。详情请查看
fund
技能
空响应参数无效检查查询参数——例如Twitter端点需要
?id=
(数字用户ID)
房地产400错误缺少请求体房产列表端点需要携带JSON请求体的POST请求:
-X POST -d '{"city": "..."}'