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:

  • Bilibili
  • Bing
  • Brave
  • DuckDuckGo
  • Reddit
  • So.com
  • Sogou
  • Threads
  • Toutiao
  • Weibo
  • YouTube

Install

pip 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.1.0.tar.gz (27.5 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.1.0-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: seekit-0.1.0.tar.gz
  • Upload date:
  • Size: 27.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 852f56c4617a9c5b393b3020eea7bb95651da100074b3acd0295eb99239fbd6b
MD5 1ecdd8e60383d9a7cf26be6f53164f1c
BLAKE2b-256 95e1a7dc9ff9da42b9f92a5ede1e30b46f45822cf0571b069f303baa90145003

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seekit-0.1.0-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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55770abcdd55b7e7fc484c84723f8b9cbe5bdde062fad336cd9e66575c994848
MD5 a62e179c459583ac587abe7d4d2ad7d5
BLAKE2b-256 a6794652bc0cf81f49cdb78b129d0db07d0e81f25ca06f63ba6ff79f5f537728

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