Skip to main content

Jooyar Python SDK

Official Python client for the Jooyar (جویار) agentic search API — compare flights, lodging, bus, train, retail, and internet plans across Iranian providers from one call.

pip install jouyaar

Quickstart

from jouyaar import Jooyaar

client = Jooyaar(api_key="sk_live_…")   # or set JOUYAAR_API_KEY

# Structured search — deterministic, LLM-free, cheapest:
res = client.search(
    category="flight",
    params={"origin": "THR", "destination": "MHD", "departure_date": "1404-06-10", "passengers": 1},
    sort="price",
)
for q in res.quotes:
    print(q.provider, f"{q.price_toman:,} تومان", q.plan_name)

# Natural-language search — the API extracts the parameters for you:
res = client.search(category="flight", prompt="ارزان‌ترین پرواز تهران به مشهد فردا صبح")

Get a key at developers.jouyaar.ir.

Two ways to search

Mode How When
params= structured fields (see client.categories()) you already know the fields — deterministic, no LLM, cheapest
prompt= free-text intent let the API parse a natural-language request

Pass exactly one. client.categories() lists every category and its required/optional fields.

Async

import asyncio
from jouyaar import AsyncJooyaar

async def main():
    async with AsyncJooyaar() as client:
        res = await client.search(category="lodging",
                                  params={"city": "تهران", "checkin": "1404-06-10", "checkout": "1404-06-12"})
        print(len(res.quotes), "results")

asyncio.run(main())

Errors

All failures raise a JooyaarError subclass carrying the server code and request_id:

import time
from jouyaar import Jooyaar, RateLimitError, QuotaExceededError, AuthenticationError

client = Jooyaar()
try:
    res = client.search(category="flight", prompt="…")
except RateLimitError as e:
    time.sleep(e.retry_after or 1)      # per-minute limit — back off and retry
except QuotaExceededError:
    ...                                  # monthly quota spent — upgrade the plan
except AuthenticationError:
    ...                                  # bad/revoked key

RateLimitError (429, per-minute) and 5xx responses are retried automatically with backoff (honoring Retry-After); 4xx are not. Tune with Jooyaar(max_retries=..., timeout=...).

Configuration

Argument Env var Default
api_key JOUYAAR_API_KEY — (required)
base_url JOUYAAR_BASE_URL https://api.jouyaar.ir
timeout — 30.0
max_retries — 2

Development

uv sync --extra dev
uv run pytest
uv run ruff check src tests

MIT licensed.

Metadata

Release files for jouyaar 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 jouyaar 0.1.0
File Size Uploaded Provenance Actions
jouyaar-0.1.0.tar.gz 36.0 kB With provenance Details for jouyaar-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 45.6 kB

Release files / jouyaar-0.1.0.tar.gz

Download URL jouyaar-0.1.0.tar.gz
Size 36.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a25e9cd525c1a44033cf1935a769ee919a19fc28f20e0391036b600c100df873
BLAKE2b-256 checksum
How to use checksums
19b1843d0dd08561d63efa2c10194e47b00f3e85ed4797c7bb83d7acf28e5481
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

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

Download URL jouyaar-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7b33de8bc99659e0eb6fda98c54518b020f0c255c84f1f2fe108a1c66443da3
BLAKE2b-256 checksum
How to use checksums
a1db4ba4a9aa27efa3fd1788bd4580642f5272e5692467bd7900f4adee61bd9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Security for jouyaar 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jouyaar-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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