Search 13,000+ x402-enabled HTTP APIs from Python AI agents. Powered by x402search.xyz
Project description
x402search-mcp (Python)
Search 13,000+ x402-enabled HTTP APIs from Python AI agents.
Cost: $0.01 USDC per search. Base mainnet. No account needed. npm: https://www.npmjs.com/package/x402search-mcp API: https://x402search.xyz
Install
pip install x402search-mcp
Requirements
- Node.js v18+ (https://nodejs.org)
- A wallet private key (EVM)
- USDC on Base mainnet (eip155:8453)
- Get USDC: https://www.coinbase.com/how-to-buy/usdc
Quick Start
import os
from x402search import search_x402_apis
os.environ["EVM_PRIVATE_KEY"] = "0xYOUR_PRIVATE_KEY_HERE"
results = search_x402_apis("token price API ethereum")
for r in results["results"]:
print(r["url"], "-", r["description"])
LangChain
from langchain.tools import tool
from x402search import search_x402_apis
@tool
def search_apis(query: str) -> str:
results = search_x402_apis(query)
return str(results["results"])
CrewAI
from crewai.tools import BaseTool
from x402search import search_x402_apis
class X402SearchTool(BaseTool):
name: str = "x402_api_search"
description: str = "Search 13,000+ x402-enabled HTTP APIs."
def _run(self, query: str) -> str:
return str(search_x402_apis(query)["results"])
Virtuals GAME SDK
from game_sdk.game.custom_types import Function, Argument, FunctionResultStatus
from x402search import search_x402_apis
def search_apis_fn(query: str) -> tuple:
try:
results = search_x402_apis(query)
return FunctionResultStatus.DONE, str(results["results"]), {}
except Exception as e:
return FunctionResultStatus.FAILED, str(e), {}
search_tool = Function(
fn_name="search_x402_apis",
fn_description="Search 13,000+ x402-enabled HTTP APIs.",
args=[Argument(name="query", type="string", description="Search query")],
executable=search_apis_fn,
)
Parameters
- query (str, required): e.g. "weather data", "crypto prices"
- private_key (str, optional): EVM private key. Defaults to EVM_PRIVATE_KEY env var
- network (str, optional): e.g. "eip155:8453" for Base mainnet
- max_price_usdc (float, optional): max price filter in USDC
- limit (int, optional): max results, default 10, max 50
Links
- PyPI: https://pypi.org/project/x402search-mcp
- npm: https://www.npmjs.com/package/x402search-mcp
- API: https://x402search.xyz
- GitHub: https://github.com/x402-index/x402search-mcp
- x402 protocol: https://x402.org
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
x402search_mcp-1.0.3.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file x402search_mcp-1.0.3.tar.gz.
File metadata
- Download URL: x402search_mcp-1.0.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5230944c231caeee5ae05c315839653982898c4120df71ae0ec24c7960d7f4c5
|
|
| MD5 |
3fa20f4db8e081a2eb3aa31729dc8004
|
|
| BLAKE2b-256 |
beb2607c761196e11268246ac88800d1f4790162ac668011c081c5b96580bf39
|
File details
Details for the file x402search_mcp-1.0.3-py3-none-any.whl.
File metadata
- Download URL: x402search_mcp-1.0.3-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c00d26319da4b7e049b449101472f37089a629858425236306da84c8398caabf
|
|
| MD5 |
d0ac4cb96a6fe7694220f90e70bf7f7c
|
|
| BLAKE2b-256 |
e73d80d516a5737b0968365a8377e409c88acaaeb08621b9a8b613042c086336
|