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

# List expansions

> Every expansion, or one series at a time.

A couple of hundred expansions, paged by cursor. Pass `series_id` to narrow the list to one
series: `?series_id=sv` for everything under Scarlet & Violet.

Pass `q` to search by name. Rows then come back best-match first, each carrying a `score`, and
the cursor keeps working exactly as it does without it. The two compose:
`?q=set&series_id=base` searches inside one series. Ranking and ties behave as they do on
[List cards](/cards/list).

Rows omit the series id, the official count and the legality flags. Fetch
[the expansion](/expansions/get) for those.


## OpenAPI

````yaml openapi.json GET /v1/expansions
openapi: 3.0.0
info:
  title: Cromos API
  version: 1.0.0
servers:
  - url: https://api.cromos.so
security:
  - bearerAuth: []
paths:
  /v1/expansions:
    get:
      tags:
        - Expansions
      summary: List expansions
      description: >-
        Every expansion, ordered by id. Pass `series_id` to narrow the list to
        one series, and `q` to search by name: rows then come back best-match
        first, each carrying a `score`, and the cursor keeps working exactly as
        it does without it. The two filters compose: `?q=set&series_id=base`
        searches inside one series.
      operationId: listExpansions
      parameters:
        - schema:
            type: integer
            description: >-
              How many rows to return. Defaults to 50 and stops at 200; a larger
              value is clamped, not rejected.
            minimum: 1
            maximum: 200
            default: 50
          required: false
          description: >-
            How many rows to return. Defaults to 50 and stops at 200; a larger
            value is clamped, not rejected.
          name: limit
          in: query
        - schema:
            type: string
            description: >-
              The `next_cursor` from the previous page. Omit it for the first
              page. A cursor this endpoint did not issue is ignored, and you get
              the first page back.
          required: false
          description: >-
            The `next_cursor` from the previous page. Omit it for the first
            page. A cursor this endpoint did not issue is ignored, and you get
            the first page back.
          name: cursor
          in: query
        - schema:
            type: string
            description: >-
              Narrow the list to one series. An id that matches nothing is an
              empty page, not a 404.
          required: false
          description: >-
            Narrow the list to one series. An id that matches nothing is an
            empty page, not a 404.
          name: series_id
          in: query
        - schema:
            type: string
            minLength: 1
            description: >-
              Search expansions by name. Ranked best-match first, every row
              carrying its `score`, and the cursor keeps working. Composes with
              `series_id`.
          required: false
          description: >-
            Search expansions by name. Ranked best-match first, every row
            carrying its `score`, and the cursor keeps working. Composes with
            `series_id`.
          name: q
          in: query
      responses:
        '200':
          description: Expansion list
          headers:
            ETag:
              description: >-
                A strong validator over the response body. Send it back as
                `If-None-Match` to get a `304 Not Modified` when nothing has
                changed.
              schema:
                type: string
            RateLimit:
              description: >-
                Remaining budget in the current window, RFC 9239 draft-7 form:
                `limit=300, remaining=284, reset=41`. `reset` is seconds until
                the window rolls.
              schema:
                type: string
            RateLimit-Policy:
              description: >-
                The policy the budget above is drawn from. `300;w=60` is 300
                requests a minute.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      items:
                        type: array
                        items:
                          allOf:
                            - $ref: '#/components/schemas/ExpansionSummary'
                            - type: object
                              properties:
                                score:
                                  type: number
                                  description: >-
                                    How closely this row matched `q`, from 0 to
                                    1. Present only when `q` is set; the key is
                                    absent otherwise. Ties at the top score are
                                    common, and the tie-break is `id` order
                                    rather than relevance.
                      next_cursor:
                        type: string
                        nullable: true
                        description: >-
                          Pass this back as `cursor` for the next page. `null`
                          means this was the last.
                    required:
                      - items
                      - next_cursor
                  error:
                    type: object
                    nullable: true
                required:
                  - data
                  - error
              example:
                data:
                  items:
                    - id: mfb
                      name: My First Battle
                      logo: null
                      symbol: null
                      palette: null
                      release_date: '2023-09-29'
                      card_count_total: 48
                    - id: sv01
                      name: Scarlet & Violet
                      logo:
                        low: https://assets.cromos.so/series/sv/logo/low.webp
                        high: https://assets.cromos.so/series/sv/logo/high.webp
                      symbol: >-
                        https://assets.cromos.so/expansions/sv01/symbol/image.webp
                      palette:
                        - '#745a7d'
                        - '#c2b2c4'
                        - '#630414'
                        - '#49235e'
                      release_date: '2023-03-31'
                      card_count_total: 258
                    - id: sv02
                      name: Paldea Evolved
                      logo:
                        low: https://assets.cromos.so/expansions/sv02/logo/low.webp
                        high: >-
                          https://assets.cromos.so/expansions/sv02/logo/high.webp
                      symbol: >-
                        https://assets.cromos.so/expansions/sv02/symbol/image.webp
                      palette:
                        - '#7a2d15'
                        - '#dda382'
                        - '#a55b3c'
                        - '#6b1e5c'
                      release_date: '2023-06-09'
                      card_count_total: 279
                  next_cursor: InN2MDIi
                error: null
        '304':
          description: >-
            Not modified. The `If-None-Match` you sent still matches, and there
            is no body.
          headers:
            ETag:
              description: >-
                A strong validator over the response body. Send it back as
                `If-None-Match` to get a `304 Not Modified` when nothing has
                changed.
              schema:
                type: string
            RateLimit:
              description: >-
                Remaining budget in the current window, RFC 9239 draft-7 form:
                `limit=300, remaining=284, reset=41`. `reset` is seconds until
                the window rolls.
              schema:
                type: string
            RateLimit-Policy:
              description: >-
                The policy the budget above is drawn from. `300;w=60` is 300
                requests a minute.
              schema:
                type: string
        '400':
          description: Bad request
          headers:
            ETag:
              description: >-
                A strong validator over the response body. Send it back as
                `If-None-Match` to get a `304 Not Modified` when nothing has
                changed.
              schema:
                type: string
            RateLimit:
              description: >-
                Remaining budget in the current window, RFC 9239 draft-7 form:
                `limit=300, remaining=284, reset=41`. `reset` is seconds until
                the window rolls.
              schema:
                type: string
            RateLimit-Policy:
              description: >-
                The policy the budget above is drawn from. `300;w=60` is 300
                requests a minute.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          headers:
            ETag:
              description: >-
                A strong validator over the response body. Send it back as
                `If-None-Match` to get a `304 Not Modified` when nothing has
                changed.
              schema:
                type: string
            RateLimit:
              description: >-
                Remaining budget in the current window, RFC 9239 draft-7 form:
                `limit=300, remaining=284, reset=41`. `reset` is seconds until
                the window rolls.
              schema:
                type: string
            RateLimit-Policy:
              description: >-
                The policy the budget above is drawn from. `300;w=60` is 300
                requests a minute.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited
          headers:
            ETag:
              description: >-
                A strong validator over the response body. Send it back as
                `If-None-Match` to get a `304 Not Modified` when nothing has
                changed.
              schema:
                type: string
            RateLimit:
              description: >-
                Remaining budget in the current window, RFC 9239 draft-7 form:
                `limit=300, remaining=284, reset=41`. `reset` is seconds until
                the window rolls.
              schema:
                type: string
            RateLimit-Policy:
              description: >-
                The policy the budget above is drawn from. `300;w=60` is 300
                requests a minute.
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal error
          headers:
            ETag:
              description: >-
                A strong validator over the response body. Send it back as
                `If-None-Match` to get a `304 Not Modified` when nothing has
                changed.
              schema:
                type: string
            RateLimit:
              description: >-
                Remaining budget in the current window, RFC 9239 draft-7 form:
                `limit=300, remaining=284, reset=41`. `reset` is seconds until
                the window rolls.
              schema:
                type: string
            RateLimit-Policy:
              description: >-
                The policy the budget above is drawn from. `300;w=60` is 300
                requests a minute.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ExpansionSummary:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        logo:
          $ref: '#/components/schemas/ImageUrls'
        symbol:
          type: string
          nullable: true
          description: The expansion symbol, as a single rendition.
        palette:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            Up to four dominant colours from the logo, most prominent first, as
            `#rrggbb`. Null when no logo is available or it yields no colour.
            May contain fewer than four: a two-tone logo has two, and the list
            is never padded with colours the image does not contain.
        release_date:
          type: string
          nullable: true
        card_count_total:
          type: number
          nullable: true
          description: Every card the expansion contains, secret rares included.
      required:
        - id
        - name
        - logo
        - symbol
        - palette
        - release_date
        - card_count_total
    ErrorResponse:
      type: object
      properties:
        data:
          type: object
          nullable: true
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
    ImageUrls:
      type: object
      nullable: true
      properties:
        low:
          type: string
          format: uri
          description: Thumbnail-sized rendition. May be the same URL as `high`.
        high:
          type: string
          format: uri
          description: Full-sized rendition. May be the same URL as `low`.
      required:
        - low
        - high
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: A stable machine-readable token. Switch on this, not on `message`.
        message:
          type: string
          description: A human-readable sentence. Always present, never empty.
      required:
        - code
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````