Skip to main content

Async Python client for TicketsData API

Project description

🧩 ticketsdata-client

Async Python SDK for TicketsData.com Supports all marketplaces: Ticketmaster, StubHub, Gametime, SeatGeek, TickPick, and VividSeats.


🚀 Features

  • Async + concurrent — powered by aiohttp, scales cleanly.
  • Multi-platform — one client for all supported marketplaces.
  • Configurable concurrency — control how many requests run at once.
  • Retry & timeout handling built in.
  • Easy job loading — feed event URLs from JSON, CSV, or a database.

⚙️ Installation

pip install ticketsdata-client

🧠 Quick usage

import asyncio
from ticketsdata_client import TicketsDataClient

async def main():
    client = TicketsDataClient(
        username="YOUR_EMAIL",
        password="YOUR_PASSWORD",
        concurrency=10,   # how many requests run in parallel
        timeout=30        # seconds per request
    )

    jobs = [
        {"platform": "ticketmaster", "event_url": "https://www.ticketmaster.com/lady-gaga-the-mayhem-ball-boston-massachusetts-03-29-2026/event/01006323DE0B7BE1"},
        {"platform": "stubhub", "event_url": "https://www.stubhub.com/sabrina-carpenter-los-angeles-tickets-11-23-2025/event/157413810/"},
        {"platform": "seatgeek", "event_url": "https://seatgeek.com/sabrina-carpenter-tickets/los-angeles-california-crypto-com-arena-2025-11-23-7-pm/concert/17400739"},
        {"platform": "vividseats", "event_url": "https://www.vividseats.com/sabrina-carpenter-tickets-los-angeles-cryptocom-arena-11-23-2025--concerts-pop/production/5599667"},
        {"platform": "tickpick", "event_url": "https://www.tickpick.com/buy-playboi-carti-tickets-state-farm-arena-ga-12-1-25-7pm/7364698/"},
        {"platform": "gametime", "event_url": "6908d769dfe85fe8ad73cd62", "mode": "all"}
    ]

    results = await client.fetch_many(jobs)
    for r in results:
        print(r)

    await client.close()

asyncio.run(main())

🧾 Example jobs.json

[
  {"platform": "ticketmaster", "event_url": "https://www.ticketmaster.com/lady-gaga-the-mayhem-ball-boston-massachusetts-03-29-2026/event/01006323DE0B7BE1"},
  {"platform": "stubhub", "event_url": "https://www.stubhub.com/sabrina-carpenter-los-angeles-tickets-11-23-2025/event/157413810/"},
  {"platform": "seatgeek", "event_url": "https://seatgeek.com/sabrina-carpenter-tickets/los-angeles-california-crypto-com-arena-2025-11-23-7-pm/concert/17400739"},
  {"platform": "vividseats", "event_url": "https://www.vividseats.com/sabrina-carpenter-tickets-los-angeles-cryptocom-arena-11-23-2025--concerts-pop/production/5599667"},
  {"platform": "tickpick", "event_url": "https://www.tickpick.com/buy-playboi-carti-tickets-state-farm-arena-ga-12-1-25-7pm/7364698/"},
  {"platform": "gametime", "event_url": "6908d769dfe85fe8ad73cd62", "mode": "all"}
]

Load from file:

import json, asyncio
from ticketsdata_client import TicketsDataClient

async def main():
    with open("jobs.json") as f:
        jobs = json.load(f)

    client = TicketsDataClient(username="YOUR_EMAIL", password="YOUR_PASSWORD")
    results = await client.fetch_many(jobs)
    print(results)
    await client.close()

asyncio.run(main())

💡 Understanding concurrency

Concurrency controls how many API requests run in parallel.

Example:

client = TicketsDataClient(concurrency=10)

→ The client can send up to 10 requests at the same time.

  • Lower values (3–5): safer, uses less quota.
  • Medium (10–20): balanced for speed.
  • High (30+): faster but consumes quota quickly and may overload slower networks.

Allowed concurrency also depends on your TicketsData subscription plan or any custom usage allowance configured for your account.


⚙️ Parameters

Parameter Type Default Description
username str required TicketsData account username
password str required TicketsData account password
base_url str "https://ticketsdata.com/fetch" API endpoint
concurrency int 5 How many requests to run in parallel
timeout int 25 Max seconds per request
max_retries int 2 How many times to retry a failed request

📚 API output format

Each result is a JSON object returned by the TicketsData API:

{
  "status": 200,
  "body": {
    "status_code": 200,
    "event_id": "18006342AD8BE4D8",
    "items": { "totalListings": 1432, "offers": [...] },
    "response_s": 0.92,
    "quota_remaining": 9924
  },
  "response_s": 0.923
}

🧩 License

MIT © TicketsData.com


🧠 Support

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

ticketsdata_client-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

ticketsdata_client-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file ticketsdata_client-1.0.0.tar.gz.

File metadata

  • Download URL: ticketsdata_client-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ticketsdata_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 68f15afbb95fd1fb3848f3d546bd3dad13588dc2b32c99e6ed1cd86fd27b12de
MD5 d5e5a628b801d0f80d07af2525bef929
BLAKE2b-256 baa7d88c8cd9e2b6522168748b73dad38b3fb0e1c6a848c0c3aba61803333d34

See more details on using hashes here.

File details

Details for the file ticketsdata_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ticketsdata_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 750a0e3e5f7a2a204eaf63d6dbe3bc393b00ec4d3d2356e94dbdb8161871fee4
MD5 a9c35f5f65cb0855c63ba9b4ac143b09
BLAKE2b-256 45783aad13666faf4c1ce2f5b924341e7f2731b438e35b9722c0655c65047e1c

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