Skip to main content

Searchly

PyPI License Package status Monthly downloads Distribution format Wheel availability Python version Implementation Releases Github Contributors Github Forks Github Issues Github Issues Github Watchers Github Stars Github Repository size Github last commit Github release date Github language count Github commits this month Package status PyUp

Read the documentation!

Searchly gives AI agents (and anyone else) one async interface to many web and news search APIs. Every provider returns the same pydantic result models, so switching from Serper to Tavily or Brave is a one-line change.

Installation

pip install searchly
# optional SDK-based providers
pip install "searchly[exa]"                         # Exa
pip install "searchly[brave_search_python_client]"  # Brave
pip install "searchly[all]"

Requires Python 3.13+.

Quickstart

import asyncio

from searchly import AsyncSerperClient


async def main() -> None:
    client = AsyncSerperClient()  # reads SERPER_API_KEY, or pass api_key="..."
    response = await client.web_search("python asyncio tutorial", max_results=5, country="US")
    for result in response.results:
        print(result.title, result.url)

    news = await client.news_search("open source AI", max_results=3)
    for item in news.results:
        print(item.published, item.source, item.title)


asyncio.run(main())

Configuration-driven providers

searchly_config holds lightweight pydantic configs (a discriminated union on type) that create providers lazily, which makes search backends easy to put into YAML/JSON settings:

from pydantic import TypeAdapter

from searchly import WebSearchProviderConfig

config = TypeAdapter(WebSearchProviderConfig).validate_python({"type": "tavily"})
if config.is_configured():  # api_key field or TAVILY_API_KEY env var
    provider = config.get_provider()

Providers

Provider Client Web News API key env var
Brave AsyncBraveSearch yes yes BRAVE_API_KEY
DataForSEO AsyncDataForSEOClient yes yes DATAFORSEO_LOGIN, DATAFORSEO_PASSWORD
Exa AsyncExaClient yes EXA_API_KEY
JigsawStack AsyncJigsawStackClient yes JIGSAWSTACK_API_KEY
Kagi AsyncKagiClient yes KAGI_API_KEY
LinkUp AsyncLinkUpClient yes LINKUP_API_KEY
Search1API AsyncSearch1API yes SEARCH1API_KEY
SerpAPI AsyncSerpAPIClient yes yes SERPAPI_KEY
Serper AsyncSerperClient yes yes SERPER_API_KEY
Tavily AsyncTavilyClient yes yes TAVILY_API_KEY
You.com AsyncYouClient yes yes YOU_API_KEY

Features

  • Common protocols: WebSearchProvider.web_search() and NewsSearchProvider.news_search() with shared query, max_results, country and language arguments; provider-specific options are extra keyword arguments.
  • Unified results: WebSearchResponse / NewsSearchResponse with WebSearchResult (title, url, snippet) and NewsSearchResult (adds source, published).
  • Typed: CountryCode and LanguageCode literals, full type hints, py.typed.
  • Config models: WebSearchProviderConfig, NewsSearchProviderConfig, get_config_class() for building providers from settings, with secrets stored as SecretStr.

Metadata

Release files for searchly 2.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 searchly 2.2.0
File Size Uploaded Provenance Actions
searchly-2.2.0.tar.gz 21.8 kB With provenance Details for searchly-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for searchly 2.2.0
File Interpreter ABI Platform Actions
searchly-2.2.0-py3-none-any.whl Python 3 none any Details for searchly-2.2.0-py3-none-any.whl

Total release size: 55.9 kB

Release files / searchly-2.2.0.tar.gz

Download URL searchly-2.2.0.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fe4819753ff36e6ae647716687dea9a59c7d7884fe0711d8e58d0b0be8a94e31
BLAKE2b-256 checksum
How to use checksums
4892f3869f2ebdb66aa255c22553624eff86cc11c352e86910cfc0eab0fee881
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

Release files / searchly-2.2.0-py3-none-any.whl

Download URL searchly-2.2.0-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddd68bebe84b9fc9428ea2f35427ada713c4b8da9907277b9df3c7a8c5aa68ee
BLAKE2b-256 checksum
How to use checksums
5c72c005ec41c654ec4edf2d88c8090655ca746b2780ff421e54b0bb1c7f6339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 23, 2026.

Transparency log

Security for searchly 2.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for searchly-2.2.0.tar.gz

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 Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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