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

# platform.getSubnets

> Returns information about the specified Subnets. The response will include the primary network.



## OpenAPI

````yaml post /P#platform.getSubnets
openapi: 3.0.0
info:
  title: Avalanche Platform Chain API
  description: >-
    JSON-RPC 2.0 API for interacting with Avalanche's Platform Chain (P-Chain).
    All methods use POST to the same endpoint with the method specified in the
    request body.
  version: 1.0.0
servers:
  - url: https://api.avax.network/ext/bc
    description: Mainnet
  - url: https://api-test.avax.network/ext/bc
    description: Testnet
  - url: http://127.0.0.1:9650/ext/bc
    description: Testnet
security: []
paths:
  /P#platform.getSubnets:
    post:
      tags:
        - platform
      summary: platform.getSubnets
      description: >-
        Returns information about the specified Subnets. The response will
        include the primary network.
      operationId: platform_getSubnets
      requestBody:
        required: true
        description: JSON-RPC request
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  example: '2.0'
                  default: '2.0'
                method:
                  type: string
                  example: platform.getSubnets
                  default: platform.getSubnets
                params:
                  $ref: '#/components/schemas/GetSubnetsArgs'
                  description: Method parameters
                id:
                  type: integer
                  example: 1
                  default: 1
              required:
                - jsonrpc
                - method
                - params
                - id
            examples:
              default:
                summary: Example request
                value:
                  jsonrpc: '2.0'
                  method: platform.getSubnets
                  params: {}
                  id: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  result:
                    $ref: '#/components/schemas/GetSubnetsResponse'
                    description: Method result
                  id:
                    type: integer
                    example: 1
                required:
                  - jsonrpc
                  - result
                  - id
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JSONRPCError'
components:
  schemas:
    GetSubnetsArgs:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
            description: Avalanche ID in cb58 format
            example: 2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM
      required:
        - ids
    GetSubnetsResponse:
      type: object
      properties:
        subnets:
          type: array
          items:
            $ref: '#/components/schemas/APISubnet'
      required:
        - subnets
    JSONRPCError:
      type: object
      description: JSON-RPC 2.0 Error Response
      properties:
        jsonrpc:
          type: string
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Error code
            message:
              type: string
              description: Error message
            data:
              type: object
              description: Additional error data
          required:
            - code
            - message
        id:
          type: integer
          example: 1
      required:
        - jsonrpc
        - error
        - id
    APISubnet:
      type: object
      properties:
        id:
          type: string
          description: Avalanche ID in cb58 format
          example: 2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM
        controlKeys:
          type: array
          items:
            type: string
        threshold:
          type: string
          description: Unsigned 32-bit integer as string
          example: '100000'
      required:
        - id
        - controlKeys
        - threshold

````