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
  • 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.1.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.1-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: seekit-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 cf7c1a306661c1173cff9fe0a262e05c2fb3d365f5b498c6768153d165f789ad
MD5 7dfee76412eed062d21038512bf267f6
BLAKE2b-256 e6a9ec7c67a477a751d649188aa9635370fb27c77d38a267793f3375f842139c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seekit-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 40974d731f151f1416412a72a531f54ccd52248ec0298ba85cf0e38e94cf5146
MD5 48a9ee730505de6e43360c90285a9e6a
BLAKE2b-256 4aec954f694649ca9c3416bf4431126a37ea5d1d667cfe3d9e5866a551bb8be7

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