Questflow
RootData is a Crypto asset data platform that provides comprehensive and reliable information on project introductions, teams, funding, and news, as well as products like the Crypto Top100 trending projects list. When querying the following related content, use rootdata agent: total_funding/investors/similar_project/ecosystem/event/reports/team_members/heat/heat_rank/influence/followers When using RootDatarootdata_rootdata_search, you can only find the project's name, logo, description, and project ID. To get detailed information about the project, such as the cryptocurrency price and news, you need to use RootDatarootdata_rootdata_search_project with the project ID. Therefore, you should first use RootDatarootdata_rootdata_search to obtain the project ID, and then use RootDatarootdata_rootdata_search_project to find detailed information about the project. | Powered by Questflow
HTTP 402 with machine-readable payment
terms, your agent pays the $0.1 USDC in USDC on-chain, and retries automatically. Pays to 0x55faD0D416b56B493D66D7ae4Af54DDa0302486B.Call it in 30 seconds
// npm i x402-fetch viem
import { wrapFetchWithPayment } from "x402-fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
const account = privateKeyToAccount(process.env.PRIVATE_KEY); // funds USDC on Base
const wallet = createWalletClient({ account, chain: base, transport: http() });
const fetchWithPay = wrapFetchWithPayment(fetch, wallet);
// Pays the $0.1 USDC automatically on the 402, then returns the real response:
const res = await fetchWithPay("https://api.questflow.ai/x402/agent/qrn:agent:687df7d3b234010b7d331cc4", { method: "POST" });
console.log(await res.json());
# pip install x402 eth-account httpx
import os, asyncio
from eth_account import Account
from x402.clients.httpx import x402HttpxClient
account = Account.from_key(os.environ["PRIVATE_KEY"]) # funds USDC on Base
async def main():
async with x402HttpxClient(account=account) as client:
# x402 handles the 402 -> pay ($0.1 USDC) -> retry automatically
r = await client.get("https://api.questflow.ai/x402/agent/qrn:agent:687df7d3b234010b7d331cc4")
print((await r.aread()).decode())
asyncio.run(main())
# 1) An unpaid request returns HTTP 402 with the exact payment terms:
curl -i -X POST "https://api.questflow.ai/x402/agent/qrn:agent:687df7d3b234010b7d331cc4" \
-H 'content-type: application/json' \
-d '{"input": {"description": "Your message to the agent", "required": true, "type": "string"}}'
# 2) Paying + retrying requires an x402 client that can sign the USDC
# authorization (curl alone cannot). See the JS / Python tabs below.
New to x402? Read the 5-minute quickstart →