ticketsdata-client-node
v1.0.0
Published
Async Node.js SDK for TicketsData API
Maintainers
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:
platformevent_url- optional
mode/qty http_statusstarted_atresponse_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-clientOr 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:
timeoutis 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
- Website: https://ticketsdata.com
- Email: [email protected]
