agentapi
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgentAPI — 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
可用端点
| Path | Price | Description |
|---|---|---|
| $0.001 | Seeking Alpha auto-complete |
| $0.001 | Get realtime quotes |
| $0.001 | Yahoo Finance quote |
| $0.001 | Search TikTok users |
| $0.001 | Search TikTok sounds |
| $0.001 | Get Twitter followers |
| $0.001 | Get Twitter timeline |
| $0.001 | Get Twitter tweets |
| $0.001 | List properties for sale/rent |
| $0.001 | Location auto-complete |
| $0.001 | Google search results |
| $0.001 | Latest crypto news |
Server URL:
https://agentapi-production.up.railway.app| 路径 | 价格 | 描述 |
|---|---|---|
| $0.001 | Seeking Alpha 自动补全 |
| $0.001 | 获取实时报价 |
| $0.001 | Yahoo Finance 报价 |
| $0.001 | 搜索TikTok用户 |
| $0.001 | 搜索TikTok音效 |
| $0.001 | 获取Twitter关注者 |
| $0.001 | 获取Twitter时间线 |
| $0.001 | 获取Twitter推文 |
| $0.001 | 列出待售/待租房产 |
| $0.001 | 地点自动补全 |
| $0.001 | Google搜索结果 |
| $0.001 | 最新加密货币新闻 |
服务器地址:
https://agentapi-production.up.railway.appPrerequisites & Setup
前提条件与设置
1. awal CLI Authentication
1. awal CLI 身份验证
The awal CLI () handles wallet operations and x402 payments. You must authenticate before making paid API calls.
npx awal@latestCheck status:
bash
npx awal@latest statusIf not authenticated, use the email OTP flow:
bash
undefinedawal CLI()负责处理钱包操作和x402支付。在进行付费API调用前,您必须完成身份验证。
npx awal@latest检查状态:
bash
npx awal@latest status若未验证,使用邮箱OTP流程:
bash
undefinedStep 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 balanceIf insufficient, fund via Coinbase Onramp:
bash
npx awal@latest showThis 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 addressSee the skill for details.
fund检查您的USDC余额:
bash
npx awal@latest balance若余额不足,通过Coinbase Onramp充值:
bash
npx awal@latest show这将打开钱包配套UI,您可以通过Apple Pay、借记卡、银行转账或Coinbase账户进行充值。或者,直接在Base网络上将USDC发送至您的钱包地址:
bash
npx awal@latest address详情请查看技能。
fundSummary
摘要
| Requirement | Check | Skill |
|---|---|---|
| Wallet authenticated | | |
| USDC balance | | |
| 要求 | 检查命令 | 对应技能 |
|---|---|---|
| 钱包已验证 | | |
| USDC余额充足 | | |
Usage
使用方法
All requests are made via , which handles USDC payment automatically.
npx awal@latest x402 pay所有请求均通过发送,该命令会自动处理USDC支付。
npx awal@latest x402 payFinance — 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 parameter is the Twitter user ID (numeric).
idbash
npx awal@latest x402 pay "https://agentapi-production.up.railway.app/data/social/twitter/followers?id=44196397&count=20"idTwitter — 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 to send the request body.
-X POST -d '{...}'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金融报价(/finance/seeking-alpha/market/get-realtime-quotes
)
/finance/seeking-alpha/market/get-realtime-quotesjson
{
"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
)
/data/social/twitter/followersTwitter关注者(/data/social/twitter/followers
)
/data/social/twitter/followersjson
{
"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
)
/search/googleGoogle搜索(/search/google
)
/search/googlejson
{
"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房地产房产详情(/realty/properties/v3/detail
)
/realty/properties/v3/detailjson
{
"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/catalogReturns:
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/healthReturns:
{"status": "ok"}bash
curl https://agentapi-production.up.railway.app/health返回:
{"status": "ok"}Troubleshooting
故障排除
| Error | Cause | Fix |
|---|---|---|
| HTTP 402 | Payment required | Use |
| HTTP 502 | Upstream API error | The backend service may be temporarily unavailable. Retry after a few seconds |
| Wallet not authenticated | Run |
| Not enough USDC | Run |
| Empty response | Invalid parameters | Check query parameters — e.g. Twitter endpoints require |
| Real Estate 400 | Missing request body | List properties endpoint requires POST with JSON body: |
| 错误 | 原因 | 解决方法 |
|---|---|---|
| HTTP 402 | 需要支付 | 请使用 |
| HTTP 502 | 上游API错误 | 后端服务可能暂时不可用。请几秒后重试 |
| 钱包未验证 | 运行 |
| USDC余额不足 | 运行 |
| 空响应 | 参数无效 | 检查查询参数——例如Twitter端点需要 |
| 房地产400错误 | 缺少请求体 | 房产列表端点需要携带JSON请求体的POST请求: |