Skip to main content

Python SDK for the ihyee web intelligence API — search, fetch, and render any web page

Project description

ihyee

PyPI Python License

Python SDK for the ihyee web intelligence API — search, fetch, and understand any web page in one API call.

Install

pip install ihyee

Quick Start

from ihyee import Ihyee

client = Ihyee(api_key="your_api_key")
results = client.search("transformer architecture", max_results=3)

for item in results.content:
    if item.type == "text" and item.text:
        print(item.text.summary)

Search

Search the web via Google and return extracted, summarized content from top results.

results = client.search(
    "latest AI research",
    max_results=5,
    content_mode="both",      # "both", "full_text", or "summary"
    before="2026-01-01",       # date filters
    must_have="transformer",   # exact phrase required
)

for item in results.content:
    if item.type == "text":
        print(f"URL: {item.url}")
        print(f"Summary: {item.text.summary}")
        print(f"Links: {len(item.text.links)}")
    elif item.type == "image_url":
        print(f"Image: {item.image_url.url}")

Fetch

Fetch and extract content from specific URLs. Automatically uses headless browser rendering for JavaScript-heavy pages.

results = client.fetch(
    ["https://example.com/article", "https://spa-app.com/page"],
    content_mode="full_text",
)

Render

Force full browser rendering with Playwright. Use for SPAs and pages that require JavaScript.

results = client.render(
    "https://spa-app.com/dashboard",
    wait_for="networkidle",
    wait_selector="#content",
    timeout_ms=30000,
)

Async Usage

from ihyee import AsyncIhyee

async with AsyncIhyee(api_key="your_key") as client:
    results = await client.search("transformer architecture")
    print(results.content[0].text.summary)

Error Handling

from ihyee import Ihyee, AuthError, RateLimitError, IhyeeError

try:
    results = client.search("query")
except AuthError:
    print("Invalid API key")
except RateLimitError as e:
    print(f"Rate limited — retry after {e.retry_after}s")
except IhyeeError as e:
    print(f"API error {e.code}: {e.message}")

Environment Variable

# Set IHYEE_API_KEY in your environment
export IHYEE_API_KEY=your_api_key
# Then omit api_key parameter
client = Ihyee()

Documentation

Full API docs: ihyee.delta-telematics.ca/api-docs

License

MIT

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

ihyee-1.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

ihyee-1.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file ihyee-1.1.0.tar.gz.

File metadata

  • Download URL: ihyee-1.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ihyee-1.1.0.tar.gz
Algorithm Hash digest
SHA256 011ec77eea0906a59169e343f7fae03ecba78474fd0207c222470a879619d59d
MD5 b448567a9bc87154ad1a3ad9e919f82d
BLAKE2b-256 9759efc82db77c36904dfe152110e721bef990b5ee06146636d2b72b73366b53

See more details on using hashes here.

File details

Details for the file ihyee-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: ihyee-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for ihyee-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aae1c161149dd9a2bbdbbf32096f53c3427e59838e861f208af0ea09565b048b
MD5 baa45f38e571fd32b4da71bf696e85d2
BLAKE2b-256 93b5e0f746f434ae9e8281b7841bb12098b443a0dd18e3323e9d6d46109f75b0

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