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

Uploaded Python 3

File details

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

File metadata

  • Download URL: websearch_lib-0.1.0b2.tar.gz
  • Upload date:
  • Size: 5.3 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.0b2.tar.gz
Algorithm Hash digest
SHA256 318819ebb09c4e55bd741e87b400b3d39d14f871ca76948dfec6076885468f56
MD5 0d891fe23b1e1123d8ac0a3cec481fa9
BLAKE2b-256 6432451564b514d8ef7544a63280016722f41dfccb59e13f477ea0acf8d12449

See more details on using hashes here.

Provenance

The following attestation bundles were made for websearch_lib-0.1.0b2.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.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for websearch_lib-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad826a90a75ea143384d4f7295267c756d969872c31ca3161d2da65f9b65e9e8
MD5 17a574dfa617f5599c0adc58ed163d4e
BLAKE2b-256 4455f5ce830c6ca52317ac8cd02f40cee37feef5a17d849ebefe8dd70aa580ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for websearch_lib-0.1.0b2-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