npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ticketsdata-client-node

v1.0.0

Published

Async Node.js SDK for TicketsData API

Readme

🧩 ticketsdata-client (Node.js)

Async Node.js SDK for TicketsData.com Supports all marketplaces: Ticketmaster, StubHub, Gametime, SeatGeek, TickPick, and VividSeats with one unified interface.

Every SDK response is automatically tagged with:

  • platform
  • event_url
  • optional mode / qty
  • http_status
  • started_at
  • response_ms
  • and the untouched API payload under result

🚀 Features

  • Async + concurrent — powered by Node.js Promises, optimized for high throughput
  • Multi-platform support — fetch from all major ticketing marketplaces
  • Automatic metadata tagging — platform + timing info added to each result
  • Configurable concurrency — control how many requests run in parallel
  • Retry & timeout logic built in
  • Flexible job loading — JSON, DB, queues, CSV

⚙️ Installation

npm install ticketsdata-client

Or with yarn:

yarn add ticketsdata-client

🧠 Quick Usage (ESM / TypeScript style)

import { TicketsDataClient } from "ticketsdata-client";

async function main() {
  const client = new TicketsDataClient({
    username: "YOUR_EMAIL",
    password: "YOUR_PASSWORD",
    concurrency: 10,
    timeout: 30,          // seconds
    include_metadata: true
  });

  const 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" }
  ];

  const results = await client.fetch_many(jobs);

  for (const r of results) {
    console.log(JSON.stringify(r, null, 2));
  }
}

main().catch(console.error);

Note: timeout is in seconds (same semantics as the Python SDK). Internally converted to milliseconds.


🧠 Quick Usage (CommonJS)

const { TicketsDataClient } = require("ticketsdata-client");

async function main() {
  const client = new TicketsDataClient({
    username: "YOUR_EMAIL",
    password: "YOUR_PASSWORD",
    concurrency: 10,
    timeout: 30,
    include_metadata: true,
  });

  const 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" }
  ];

  const results = await client.fetch_many(jobs);
  console.log(JSON.stringify(results, null, 2));
}

main().catch(console.error);

🧾 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-carppenter-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 in Node:

import fs from "node:fs";
import { TicketsDataClient } from "ticketsdata-client";

async function main() {
  const raw = fs.readFileSync("jobs.json", "utf8");
  const jobs = JSON.parse(raw);

  const client = new TicketsDataClient({
    username: "YOUR_EMAIL",
    password: "YOUR_PASSWORD",
    include_metadata: true,
  });

  const results = await client.fetch_many(jobs);
  console.log(JSON.stringify(results, null, 2));
}

main().catch(console.error);

💡 Understanding concurrency

Concurrency controls how many API requests run simultaneously.

const client = new TicketsDataClient({
  username: "YOUR_EMAIL",
  password: "YOUR_PASSWORD",
  concurrency: 10,
});

This allows 10 requests in parallel, greatly improving throughput.

Recommended settings

  • 3–5 → safe, low quota usage
  • 10–20 → optimal speed
  • 30+ → only on dedicated plans

Shared plans (Starter/Pro) include soft concurrency limits to ensure stable performance. Dedicated environments remove these limits entirely.


⚙️ Constructor Parameters

new TicketsDataClient({
  username: string;        // required
  password: string;        // required
  base_url?: string;       // default: "https://ticketsdata.com/fetch"
  concurrency?: number;    // default: 5
  timeout?: number;        // default: 25 (seconds)
  max_retries?: number;    // default: 2
  include_metadata?: boolean; // default: true
});

| Parameter | Type | Default | Description | | ------------------ | ------- | --------------------------------- | -------------------------------------------- | | username | string | required | TicketsData username | | password | string | required | TicketsData password | | base_url | string | "https://ticketsdata.com/fetch" | API endpoint | | concurrency | number | 5 | Number of parallel requests | | timeout | number | 25 | Timeout per request (in seconds) | | max_retries | number | 2 | Retry count for network/timeout errors | | include_metadata | boolean | true | Attach platform + timing metadata to results |


📚 Result Format (metadata envelope)

Each call returns a stable envelope (when include_metadata=true):

{
  "platform": "ticketmaster",
  "event_url": "https://www.ticketmaster.com/...",
  "mode": "all",
  "qty": 4,
  "http_status": 200,
  "started_at": "2025-11-21T22:11:03.123456+00:00",
  "response_ms": 1388,
  "result": {
    "status": 200,
    "body": {
      "status_code": 200,
      "event_id": "18006342AD8BE4D8",
      "items": { "totalListings": 1432, "offers": [] },
      "response_s": 0.92,
      "quota_remaining": 9924
    },
    "response_s": 0.923
  }
}

On errors (timeout, network issues, etc.), you get a non-throwing error envelope:

{
  "platform": "ticketmaster",
  "event_url": "https://www.ticketmaster.com/...",
  "http_status": 0,
  "started_at": "2025-11-21T22:11:03.123456+00:00",
  "response_ms": 25034,
  "error": {
    "code": "timeout",
    "message": "request timed out after 25s"
  }
}

If include_metadata is set to false, the client returns the raw API payload (or a basic { error: { ... } } object on failure), for backwards compatibility.


🧩 License

MIT © TicketsData.com


🧠 Support