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.1.tar.gz (4.4 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.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x402search_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 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.1.tar.gz
Algorithm Hash digest
SHA256 2c2af3a2277838efff4f2a5810a82d32bbf5a38b4deebb9985cd70cf0fac1a8e
MD5 46dabd27f399bef8fffd89c51bbb6b0a
BLAKE2b-256 0c4a597c9de445810f797f6816529d7bd9ec7f3187c0604873f7db1b1b5bc216

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x402search_mcp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7d4951a0bcbf7b3fc67de7caad11a1018d16dcc0a9b4c002f74cf30722a943f
MD5 369b40ff0a8af96deb2d81e6523cdc8c
BLAKE2b-256 669d6d156fd2161508f004fa1ef2ed2ea87f10cf6edea407678dffe3790b1141

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