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.2.tar.gz (5.0 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.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x402search_mcp-1.0.2.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

Hashes for x402search_mcp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 dc8ce7fd56817512985c84d11a47c04e5f5dca5f7a11b2be9dd5cdf0d5fc339d
MD5 041bea245fe8e481d0b6f77430444f22
BLAKE2b-256 9508baeb41e6909d7806071cad52eceef3189166e1d64da3aaa53e05e40d75d1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x402search_mcp-1.0.2-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

Hashes for x402search_mcp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e61ea9205bb304d55eca97b7372fd5338d122998f0487219f0a1902777b11ed
MD5 de91e7afdc3bce6efe1fb3d229ac9ff0
BLAKE2b-256 893a768e7abec4703e911b42ad330edbab31dff9505e08ebc9a6304de3e35b3b

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