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

# Get NFT rarity



## OpenAPI

````yaml get /v1/nft/rarity
openapi: 3.0.2
info:
  title: 🖼 NFT API
  version: v1.0.0
servers:
  - url: https://api.chainbase.online
    description: production server
security: []
paths:
  /v1/nft/rarity:
    get:
      tags:
        - NFT Metadata
      summary: Get NFT rarity
      operationId: GetNFTRarity
      parameters:
        - description: >-
            chain network id, see [list of
            details](/platform/features/api/web3-api)
          required: true
          schema:
            title: Chain Id
            type: string
            description: >-
              chain network id, see [list of
              details](/platform/features/api/web3-api)
          example: '1'
          name: chain_id
          in: query
        - description: The address of the NFT contract
          required: true
          schema:
            title: Contract Address
            pattern: ^0[xX]{1}[a-fA-F0-9]{40}$
            type: string
            description: The address of the NFT contract
          example: '0xed5af388653567af2f388e6224dc7c4b3241c544'
          name: contract_address
          in: query
        - description: NFT token id in hex or num string
          required: false
          schema:
            title: Token Id
            type: string
            description: NFT token id in hex or num string
          example: '1'
          name: token_id
          in: query
        - required: false
          schema:
            title: Rank Min
            type: integer
            default: 0
          name: rank_min
          in: query
        - required: false
          schema:
            title: Rank Max
            type: integer
            default: 0
          name: rank_max
          in: query
        - description: The page offset
          required: false
          schema:
            title: Page
            minimum: 1
            type: integer
            description: The page offset
            default: 1
          name: page
          in: query
        - required: false
          schema:
            title: Limit
            maximum: 10000
            minimum: 1
            type: integer
            default: 20
          name: limit
          in: query
        - required: true
          schema:
            title: X-Api-Key
            type: string
            example: demo
          example: demo
          name: x-api-key
          in: header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseNFTRarity'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    ResponseNFTRarity:
      title: ResponseNFTRarity
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 0
        message:
          title: Message
          type: string
          default: ok
        data:
          title: Data
          type: array
          items:
            $ref: '#/components/schemas/NFTRarity'
        next_page:
          title: Next Page
          type: integer
        count:
          title: Count
          type: integer
    ErrorMessage:
      title: ErrorMessage
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: integer
        message:
          title: Message
          type: string
    NFTRarity:
      title: NFTRarity
      required:
        - token_id
        - rank
        - rank_share
        - score
        - total_supply
      type: object
      properties:
        token_id:
          title: Token Id
          type: string
        rank:
          title: Rank
          type: integer
        rank_share:
          title: Rank Share
          type: integer
        score:
          title: Score
          type: number
        total_supply:
          title: Total Supply
          type: integer
        properties:
          title: Properties
          type: array
          items:
            $ref: '#/components/schemas/NFTRarityProperties'
    NFTRarityProperties:
      title: NFTRarityProperties
      required:
        - trait_type
        - value
        - rate
        - total
      type: object
      properties:
        trait_type:
          title: Trait Type
          type: string
        value:
          title: Value
          type: string
        rate:
          title: Rate
          type: number
        total:
          title: Total
          type: integer

````