Skip to main content

A local, keyless drop-in alternative for AI search engines.

Project description

websearch-lib

A performant, keyless, and local drop-in alternative to commercial AI search tools. Built specifically for AI Agent loops, and background RAG scrapers.

Features

  • 🎯 AI-Optimized JSON Schema: Returns cleaned, structured markdown matching standard LLM search expectations.
  • 🚀 Dual-Path Extraction Architecture: Uses ultra-fast C-accelerated trafilatura[all] for raw speed, falling back to an evasion-hardened playwright-stealth engine for heavy JavaScript walls.
  • 🛡️ Built-in Content Cleaning: Automatically scrubs out cookie banners, privacy policy walls, login portals, and legal spam.
  • ⚙️ Zero Configuration Setup: No API keys, no monthly fees, and handles its own automated browser binary downloads on first run.

Installation

Install the package via pip:

pip install websearch-lib==0.1.0b1

Install Chromium using playwright

playwright install chromium

Quick Start

The library exposes a highly natural, asynchronous .query() method perfect for AI framework integrations.

import asyncio
import websearch

async def main():
    # Execute a web query
    data = await websearch.query("Latest open-source LLM benchmarks 2026", max_results=3)
    
    print(f"Query: {data['query']}")
    print(f"Fetch Time: {data['response_time']}s\n")
    
    for result in data['results']:
        print(f"Title: {result['title']}")
        print(f"URL: {result['url']}")
        print(f"Content Summary:\n{result['content']}\n" + "-"*40)

if __name__ == "__main__":
    asyncio.run(main())

License

MIT License

Copyright (c) 2026 solnsumei

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

websearch_lib-0.1.0b1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

websearch_lib-0.1.0b1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file websearch_lib-0.1.0b1.tar.gz.

File metadata

  • Download URL: websearch_lib-0.1.0b1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for websearch_lib-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 26807ab20c55c1cd758ad13fa701a87be1ee9c86ef97af9df525dfa73e6bfdd8
MD5 4f1889cf0c6c389ee1f4049b1775e0e3
BLAKE2b-256 7bee570b9fe597f661e775b023e790e874a7668c205613ddb334611aa352e5f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for websearch_lib-0.1.0b1.tar.gz:

Publisher: publish.yml on solnsumei/websearch-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file websearch_lib-0.1.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for websearch_lib-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 560be96747fee8e86c4137931f77f26e2ea4063c422ff53d792b623c0c76e1a2
MD5 7b11862a1c42849e528da4354b701475
BLAKE2b-256 54ec11caa73c78ee686746d21add29415ca37c0dbf2e39fa3740df109d62c407

See more details on using hashes here.

Provenance

The following attestation bundles were made for websearch_lib-0.1.0b1-py3-none-any.whl:

Publisher: publish.yml on solnsumei/websearch-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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