Skip to main content

answerline

Python client for the AnswerLine API — structured JSON answers from AI assistants (ChatGPT, Perplexity, Gemini, Copilot, Grok) and Google surfaces (Search, News, AI Overview, AI Mode), on httpx.

pip install answerline
from answerline import Client

with Client("sk_...") as client:
    # Synchronous monitor calls: one method per engine (chatgpt, perplexity, gemini,
    # copilot, grok, aimode, google, google_news), or client.monitor(engine, **body).
    answer = client.monitor.chatgpt(prompt="Best CRM for a 5-person team?", country="US")

    # Async tasks: create, poll, or run to a terminal status.
    task = client.async_tasks.run(
        "CHATGPT",
        {"prompt": "Best CRM for a 5-person team?", "country": "US"},
        idempotency_key="crm-1",
    )

    client.credits()  # {"remaining", "perCycle", "cycleResetsAt"}

AsyncClient has the same methods, awaitable. async_tasks.create_batch submits up to 500 tasks in one call; async_tasks.wait polls a task to COMPLETED or FAILED; async_tasks.status and async_tasks.clear_queue manage the queue. Prefer a webhook (webhook_url= on the task) over polling for many tasks — verify deliveries with verify_webhook(body, header, secret) against the Webhook-Signature header.

Calls raise ApiError (status, stable code, parsed body, and meta with the rate-limit, concurrency, credit and request-id headers); transport failures raise TimeoutError or ConnectionError. 429s and safely replayable failures are retried with jittered backoff; timeout, sync_timeout, max_retries and http_client are constructor options.

Metadata

Release files for answerline 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for answerline 0.1.0
File Size Uploaded
answerline-0.1.0.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for answerline 0.1.0
File Interpreter ABI Platform
answerline-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 kB

Release files / answerline-0.1.0.tar.gz

Download URL answerline-0.1.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4cd98992fec7313d627edb794a261b21cf5416a0c815c641916cb5348cf1b0cd
BLAKE2b-256 checksum
How to use checksums
b863d8ce83bf5c4261d27ba54d5c4094d12813fb66f968cf99436e741e541610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / answerline-0.1.0-py3-none-any.whl

Download URL answerline-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4494bd0e846ea4e8520cd6fd1e11c9e6328e98a9024519d3f974188b48bf1df8
BLAKE2b-256 checksum
How to use checksums
b9473b97b3b7531cdbcd8345cb20693f1d4e77cc55d7ab07459a153606469706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page