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

# Fetch a set by ID or abbreviation.

> Accepts the canonical ID (`st-...`) or the set abbreviation (e.g. `BS1`,
`SD01`). Abbreviations are expected to be unique; the Worker returns 500
if more than one set shares an abbreviation (data integrity issue).




## OpenAPI

````yaml /openapi.yaml get /v1/sets/{id}
openapi: 3.1.0
info:
  title: Elestrals TCG API
  summary: Public read-only API for Elestrals TCG card data.
  description: >
    Semi-public REST API exposing Elestrals TCG card data to approved
    developers.

    Access is gated by application and controlled by per-key rate limits.


    This file is the source of truth for the API's public contract. Code and
    spec

    stay in sync via the CI consistency check (see `scripts/check-openapi.mjs`).
  version: 1.0.0
  contact:
    name: Elestrals Developer Support
    url: https://docs.elestrals.com
  license:
    name: Proprietary
    identifier: LicenseRef-Elestrals-Developer-Agreement
servers:
  - url: https://api.elestrals.com
    description: Production
  - url: http://127.0.0.1:8787
    description: Local wrangler dev
security:
  - bearerAuth: []
tags:
  - name: Meta
    description: Service metadata endpoints.
  - name: Series
    description: Groupings of sets (First Edition, Kickstarter, Organized Play, etc.).
  - name: Sets
    description: Product sets (booster, starter deck, specialty).
  - name: Creatures
    description: The master creature lineage for Elestrals cards.
  - name: Cards
    description: Game entities — the cards as gameplay pieces (stats, effects, legality).
  - name: Printings
    description: Physical printings — a specific printed card in a set.
paths:
  /v1/sets/{id}:
    get:
      tags:
        - Sets
      summary: Fetch a set by ID or abbreviation.
      description: |
        Accepts the canonical ID (`st-...`) or the set abbreviation (e.g. `BS1`,
        `SD01`). Abbreviations are expected to be unique; the Worker returns 500
        if more than one set shares an abbreviation (data integrity issue).
      operationId: getSet
      parameters:
        - $ref: '#/components/parameters/SetIdOrAbbrPath'
      responses:
        '200':
          description: The requested set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    SetIdOrAbbrPath:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Set ID (`st-...`) or abbreviation (e.g. `BS1`, `SD01`).
  schemas:
    SetResponse:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          $ref: '#/components/schemas/Set'
        meta:
          $ref: '#/components/schemas/Meta'
    Set:
      type: object
      required:
        - id
        - abbr
        - name
        - type
        - series
        - release_date
        - prerelease_date
        - card_count
        - images
        - updated_at
      properties:
        id:
          type: string
          example: st-53
        abbr:
          type: string
          example: BS1
        name:
          type: string
          example: Base
        type:
          $ref: '#/components/schemas/SetType'
        series:
          $ref: '#/components/schemas/SeriesRef'
        release_date:
          type:
            - string
            - 'null'
          format: date
        prerelease_date:
          type:
            - string
            - 'null'
          format: date
        card_count:
          type: integer
          minimum: 0
        images:
          $ref: '#/components/schemas/SetImages'
        updated_at:
          type: string
          format: date-time
    Meta:
      type: object
      required:
        - request_id
        - cached
        - attribution_required
      properties:
        request_id:
          type: string
          example: req_0123456789abcdef
        cached:
          type: boolean
        attribution_required:
          type: boolean
          const: true
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - not_found
                - bad_request
                - invalid_cursor
                - unauthorized
                - forbidden
                - rate_limit_exceeded
                - quota_exceeded
                - internal_error
                - service_unavailable
            message:
              type: string
            request_id:
              type: string
            docs_url:
              type: string
              format: uri
    SetType:
      type: string
      enum:
        - main
        - promo
        - starter_deck
        - specialty
    SeriesRef:
      type: object
      required:
        - id
        - name
        - code
      properties:
        id:
          type: string
          example: sr-3
        code:
          type: string
          example: KS01
        name:
          type: string
          example: Kickstarter
    SetImages:
      type: object
      required:
        - banner_url
        - icon_url
        - logo_url
        - stamp_url
      properties:
        banner_url:
          type: string
          format: uri
        icon_url:
          type: string
          format: uri
        logo_url:
          type:
            - string
            - 'null'
          format: uri
        stamp_url:
          type: string
          format: uri
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: elestrals_live_<32char>
      description: >
        API key supplied as `Authorization: Bearer <key>`. Keys are minted in
        the

        developer portal. Rejected in query strings. See the Authentication
        guide.

````