> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eventory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Verify your key, add an event to your watchlist, and pull live availability in five minutes.

Everything below runs against production. Replace `$EVENTORY_API_KEY` with your key
or export it in your shell first.

<Steps>
  <Step title="Check your key and credits">
    `GET /usage` is free and works for every valid key, so it is the safest first call.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s https://api.eventory.ai/usage \
        -H "apikey: $EVENTORY_API_KEY"
      ```

      ```python Python theme={null}
      import httpx, os

      r = httpx.get(
          "https://api.eventory.ai/usage",
          headers={"apikey": os.environ["EVENTORY_API_KEY"]},
      )
      print(r.json()["credits"])
      ```

      ```javascript Node.js theme={null}
      const r = await fetch("https://api.eventory.ai/usage", {
        headers: { apikey: process.env.EVENTORY_API_KEY },
      });
      console.log((await r.json()).credits);
      ```
    </CodeGroup>

    A `401` here means the key was not sent or is wrong. If you used a shell variable,
    check it is actually set: an empty variable sends the request with no key at all.
  </Step>

  <Step title="Find the platform key and event id">
    Live Availability needs a `platform` key and the event's id on that platform.
    `GET /events/platforms` lists every platform with the regions it accepts and an
    example id. Cache the result, it costs 5 credits like every call on this API.

    ```bash theme={null}
    curl -s https://api.eventory.ai/events/platforms \
      -H "apikey: $EVENTORY_API_KEY" | jq '.platforms.tm'
    ```

    ```json theme={null}
    {
      "description": "Ticketmaster — monitors primary and resale ticket availability for events worldwide.",
      "sections_type": "SeatMapSections",
      "regions": ["us", "ca", "uk", "ie", "au", "nz", "mx", "de", "es", "nl", "at", "dk", "be", "no", "ch", "se", "fi", "pl", "ae", "cz", "fr", "it", "za"],
      "event_id_example": "0200642CF18CAA24"
    }
    ```

    The id is normally in the event URL. For Ticketmaster it is the 16-character
    string at the end of `…/event/0200642CF18CAA24`; several other platforms take
    the full event URL instead. See
    [Supported platforms](/guides/platforms).
  </Step>

  <Step title="Pull live availability">
    A scrape runs synchronously and can take up to 60 seconds. Give your client a
    65-second timeout.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -s -X POST https://api.eventory.ai/events/scrape \
        -H "apikey: $EVENTORY_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"platform": "tm", "event_id": "0200642CF18CAA24", "region": "us"}'
      ```

      ```python Python theme={null}
      r = httpx.post(
          "https://api.eventory.ai/events/scrape",
          headers={"apikey": os.environ["EVENTORY_API_KEY"]},
          json={"platform": "tm", "event_id": "0200642CF18CAA24", "region": "us"},
          timeout=65,
      )
      data = r.json()
      print(data["total_stock"], data["sections_type"])
      ```

      ```javascript Node.js theme={null}
      const r = await fetch("https://api.eventory.ai/events/scrape", {
        method: "POST",
        headers: {
          apikey: process.env.EVENTORY_API_KEY,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ platform: "tm", event_id: "0200642CF18CAA24", region: "us" }),
        signal: AbortSignal.timeout(65_000),
      });
      const data = await r.json();
      console.log(data.total_stock, data.sections_type);
      ```
    </CodeGroup>

    `sections_type` tells you how to read `sections`. Ticketmaster and AXS return a
    seat map; most other platforms return flat ticket tiers.
    See [Section types](/guides/section-types).
  </Step>

  <Step title="Watch the event instead of polling">
    If you want to be told when something changes rather than asking, add the event to
    your watchlist. Watchlist calls are free.

    ```bash theme={null}
    curl -s -X POST https://api.eventory.ai/watchlist \
      -H "apikey: $EVENTORY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"website": "ticketmaster", "event": "0200642CF18CAA24", "region": "US", "seat_quantity": 2}'
    ```

    The response is the created item. Keep its `id` to update or delete it later.
    Then open the stream; it picks up watchlist changes within 60 seconds.
    See [Connecting to the stream](/stream/connecting).
  </Step>

  <Step title="Look at the history">
    Market Data answers "how has this been selling?" rather than "what is on sale now?".
    One credit per call.

    ```bash theme={null}
    curl -s "https://api.eventory.ai/eventory/data/search" \
      -H "apikey: $EVENTORY_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query": "drake", "sortBy": "tickets_sold.desc", "filterExpression": "venue_country_code:US"}'
    ```

    Each hit carries the identifiers you need for the detail endpoints, for example
    `GET /eventory/data/viagogo/E-160973997` for daily statistics and a price histogram.
  </Step>
</Steps>

## Next

<CardGroup cols={2}>
  <Card title="Credits & access" href="/credits-and-access" icon="coins">
    What each call costs and how to tell which APIs your key can use.
  </Card>

  <Card title="Errors" href="/errors" icon="triangle-exclamation">
    Every error code, what it actually means, and what to do about it.
  </Card>
</CardGroup>
