Skip to main content

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

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

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.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

x402search_mcp-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file x402search_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: x402search_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for x402search_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6e5f1be192c2deddfe76ba6fd7bc66f3733c39cc3b1bded873944d12b75486ac
MD5 543e95d5f21c47ab8bffc14ed5bc7625
BLAKE2b-256 16d4e9eb5a00f902997e719084b3c42eda29c1639719f5af8a4957362dc95c49

See more details on using hashes here.

File details

Details for the file x402search_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: x402search_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for x402search_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f25b97900330f5fc6f478e02aef903541c7e0eac9f46601eb8e904735d7e913
MD5 975fd6697d75e919d297daf099c5d66e
BLAKE2b-256 956f5fd91f9412730f4a151121f3186a5c710ca211ab8eea839d3ce1039efbd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page