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

# Get NFT tokens by collection

> Returns all NFT tokens within a specific collection. You can optionally filter by token ID.



## OpenAPI

````yaml /api-reference/rollup-indexer/openapi.yaml get /indexer/nft/v1/tokens/by_collection/{collection_addr}
openapi: 3.1.0
info:
  title: Indexer API
  description: >-
    Query indexed data including transactions, blocks, NFTs, and token holders
    across Initia Stack chains.
  version: 1.0.0
servers:
  - url: https://rollytics-api-evm-1.anvil.asia-southeast.initia.xyz
    description: evm-1 (testnet)
  - url: https://rollytics-api-move-1.anvil.asia-southeast.initia.xyz
    description: move-1 (testnet)
  - url: https://rollytics-api-wasm-1.anvil.asia-southeast.initia.xyz
    description: wasm-1 (testnet)
security: []
paths:
  /indexer/nft/v1/tokens/by_collection/{collection_addr}:
    get:
      tags:
        - NFTs
      summary: Get NFT tokens by collection
      description: >-
        Returns all NFT tokens within a specific collection. You can optionally
        filter by token ID.
      operationId: getNftTokensByCollection
      parameters:
        - name: collection_addr
          in: path
          description: The collection address.
          required: true
          schema:
            type: string
        - name: token_id
          in: query
          description: Filter by token ID.
          required: false
          schema:
            type: string
        - name: order_by
          in: query
          description: 'Field to order results by. Options: `token_id`, `height`.'
          required: false
          schema:
            type: string
            enum:
              - token_id
              - height
            default: token_id
        - $ref: '#/components/parameters/paginationKey'
        - $ref: '#/components/parameters/paginationOffset'
        - $ref: '#/components/parameters/paginationLimit'
        - $ref: '#/components/parameters/paginationCountTotal'
        - $ref: '#/components/parameters/paginationReverse'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  tokens:
                    type: array
                    items:
                      $ref: '#/components/schemas/NftToken'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
components:
  parameters:
    paginationKey:
      name: pagination.key
      in: query
      description: Cursor key for pagination.
      required: false
      schema:
        type: string
    paginationOffset:
      name: pagination.offset
      in: query
      description: Number of records to skip.
      required: false
      schema:
        type: integer
    paginationLimit:
      name: pagination.limit
      in: query
      description: Maximum number of records to return. Defaults to 100.
      required: false
      schema:
        type: integer
        default: 100
    paginationCountTotal:
      name: pagination.count_total
      in: query
      description: Whether to return the total count. Defaults to `true`.
      required: false
      schema:
        type: boolean
        default: true
    paginationReverse:
      name: pagination.reverse
      in: query
      description: When `true`, returns results in descending order. Defaults to `true`.
      required: false
      schema:
        type: boolean
        default: true
  schemas:
    NftToken:
      type: object
      properties:
        collection_addr:
          type: string
          description: Collection contract address.
        collection_name:
          type: string
          description: Collection name.
        collection_origin_name:
          type: string
          description: Original collection name.
        object_addr:
          type: string
          description: Token object address (Move chains only).
        owner:
          type: string
          description: Current owner address.
        nft:
          type: object
          description: Token details.
          properties:
            token_id:
              type: string
              description: Token ID within the collection.
            uri:
              type: string
              description: Token metadata URI.
        height:
          type: integer
          description: Block height of the last update.
        timestamp:
          type: string
          description: Timestamp of the last update in RFC 3339 format.
    Pagination:
      type: object
      description: Pagination metadata for list responses.
      properties:
        previous_key:
          type: string
          nullable: true
          description: Cursor key for the previous page.
        next_key:
          type: string
          nullable: true
          description: Cursor key for the next page. Null when there are no more results.
        total:
          type: string
          description: Total number of records matching the query.

````