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.2.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.2.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ihyee-1.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 de8ea9b3b3aeff73d08ebc93c4e2798ec8506277f7d388538a1ce3870a3e5c3b
MD5 165f9b3ed30e2ae7ee838e6396dee837
BLAKE2b-256 63b171e9adb80cad308cf9ed41216e97e79baa31f7840c2ed36f85347d1ece3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ihyee-1.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0f23dd34e86f673f6b62ed9840a7f48336012792e1859c46dac5394278ec131
MD5 3efe1f1d3149d0bacfdc63099819e4c5
BLAKE2b-256 0b6a69986ab272c700f50e00d43f9baf5a1e616f594cb3f7fb45a71118ea6808

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