Skip to main content

anysearch-py

Typed Python clients for AnySearch.

The package has two first-class clients.

Client calls the REST Web API.

MCPClient calls the remote MCP tools/call API.

Both clients share the same Pydantic models, enums, validation, and serialization logic.

The API key is optional when the AnySearch endpoint permits anonymous access.

Install

uv add anysearch-py

REST Search

from anysearch_py import Client, SearchTag

with Client(api_key="YOUR_ANYSEARCH_API_KEY") as client:
    response = client.search(
        "Python 3.15 new features",
        tag=SearchTag.CODE_DOC,
        params={"library": "python"},
    )

print(response.data.results[0].url)

Async REST Search

import asyncio

from anysearch_py import AsyncClient


async def main() -> None:
    async with AsyncClient(api_key="YOUR_ANYSEARCH_API_KEY") as client:
        response = await client.search("Python 3.15 new features")

    print(response.data.results[0].url)


asyncio.run(main())

MCP Tools

from anysearch_py import Domain, MCPClient

with MCPClient(api_key="YOUR_ANYSEARCH_API_KEY") as client:
    markdown = client.get_sub_domains(domains=[Domain.FINANCE, Domain.HEALTH])

print(markdown)

MCP Search

from anysearch_py import MCPClient

with MCPClient(api_key="YOUR_ANYSEARCH_API_KEY") as client:
    markdown = client.search("Python 3.15 new features", max_results=5)

print(markdown)

Live Tests

Live tests read ANYSEARCH_API_KEY from the environment first, then .env.

If neither source provides a non-empty value, those tests skip automatically.

Package code never reads .env.

Metadata

Release files for anysearch-py 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anysearch-py 0.2.0
File Size Uploaded
anysearch_py-0.2.0.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anysearch-py 0.2.0
File Interpreter ABI Platform
anysearch_py-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / anysearch_py-0.2.0.tar.gz

Download URL anysearch_py-0.2.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3c79e327dc518809a71bb72a49d17b961d380536ccf4d71e2c5f30464e5c7b49
BLAKE2b-256 checksum
How to use checksums
8c7dea96e0861c2bd06730fa470bf1da9597b3c785f762172fbf8ba1173fc31c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / anysearch_py-0.2.0-py3-none-any.whl

Download URL anysearch_py-0.2.0-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d504f9be8ba052f70496ad2a6e8ba3a144f24b039432b01871ee9ee5fdc374e
BLAKE2b-256 checksum
How to use checksums
c372972207805e074cd9a03806da1278e45a07678a1e395c02c5a968640376ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page