Skip to main content

Python API for various search engines

Project description

seekit

seekit wraps multiple search providers behind a common SerpItem model and can search live using curl_cffi request templates derived from captured HAR files.

Supported providers:

  • Baidu
  • Bilibili
  • Bing
  • Brave
  • Douyin
  • DuckDuckGo
  • Google
  • Reddit
  • So.com
  • Sogou
  • Threads
  • TikTok
  • Toutiao
  • Weibo
  • Yandex
  • YouTube
  • Zhihu

Install

uv add seekit

For the CLI:

uv tool install seekit

Usage

Search live:

import seekit

results = seekit.search("latest OpenAI reasoning model", provider="google")
for item in results[:3]:
    print(item.provider, item.title, item.url)

CLI:

seekit OpenAI
seekit latest OpenAI reasoning model --engine google --limit 5
seekit OpenAI --engine tiktok --format json
seekit OpenAI --engine google --format csv
seekit OpenAI --engine google --debug

Each parsed item uses the shared pydantic model:

class SerpItem(BaseModel):
    provider: str
    title: str | None
    excerpt: str | None
    url: str | None
    author: str | None
    cover_url: str | None
    time: str | None

Fixture parsing is still available for tests and parser debugging:

from pathlib import Path
from har import parse_har

results = parse_har("google", Path("data/pages/google.har"))

Development

uv run pytest

Tests read the HAR fixtures under data/pages, verify the normalized item shape, and validate that live request templates substitute the search keyword correctly.

Server

uv run uvicorn seekit.server:app --reload

Then open http://127.0.0.1:8000/ or call:

curl 'http://127.0.0.1:8000/api/search?q=OpenAI&provider=google'

Docs

Read the Docs config lives in .readthedocs.yaml and Sphinx sources live in docs/.

Release

make publish-testpypi
make publish-pypi

These targets build with uv build and publish with uvx uv-publish.

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

seekit-0.0.2.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

seekit-0.0.2-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file seekit-0.0.2.tar.gz.

File metadata

  • Download URL: seekit-0.0.2.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seekit-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9418e2cb4d9bd028210533f1f09eae1c1f0ba4f46429267e90b72db54eddddfc
MD5 b719105271e2ec27bca30ab530b7c2fb
BLAKE2b-256 a176902ff9c78815096e1c779d056f35844ac37a07fabd97a1369085cee36621

See more details on using hashes here.

File details

Details for the file seekit-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: seekit-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seekit-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f867309c5d76649f29969e770372f67babe62e0754c8835695ec82403fdc8e4a
MD5 d1fe995ff29cf12007a13e1d6e472306
BLAKE2b-256 db8e1913b7e6c10521818cd1dcd7737994512807d373faf97d3c230d477f84fd

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