dots.v2.sizes.get()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.sizes.get(requestConfiguration?: RequestConfiguration<SizesRequestBuilderGetQueryParameters>): Promise<undefined | SizesGetResponse>

Description

To list all of available Droplet sizes, send a GET request to /v2/sizes. The response will be a JSON object with a key called sizes. The value of this will be an array of size objects each of which contain the standard size attributes.

Parameters

perPage integer optional

Example: 2

Number of items returned per page

Default: 20

Min: 1

Max: 200

page integer optional

Example: 1

Which 'page' of paginated results to return.

Default: 1

Min: 1

cpuMinimum integer optional

Example: 4

Filter sizes with an inclusive minimum CPU count

Min: 1

cpuMaximum integer optional

Example: 4

Filter sizes with an inclusive maximum CPU count

Min: 1

gpuMinimum integer optional

Example: 1

Filter sizes with an inclusive minimum GPU count

Min: 1

gpuMaximum integer optional

Example: 8

Filter sizes with an inclusive maximum GPU count. Zero is allowed to filter to sizes without GPUs.

Min: 0

gpuFabric boolean optional

Example: true

Filter sizes to those with a given GPU fabric setting

memoryMinimum integer optional

Example: 1024

Filter sizes with an inclusive minimum memory amount (in megabytes)

Min: 8

memoryMaximum integer optional

Example: 1024

Filter sizes with an inclusive maximum memory amount (in megabytes)

Min: 8

priceHourlyMinimum string optional

Example: 0.50

Filter sizes with an inclusive minimum hourly price (in USD)

priceHourlyMaximum string optional

Example: 1.00

Filter sizes with an inclusive maximum hourly price (in USD)

priceMonthlyMinimum string optional

Example: 5.00

Filter sizes with an inclusive minimum monthly price (in USD)

priceMonthlyMaximum string optional

Example: 10.00

Filter sizes with an inclusive maximum monthly price (in USD)

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.sizes.get();

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page query parameter:

let response = await client.v2.sizes.get();
let pages = response?.links?.pages;

while (pages && "next" in pages && typeof pages.next === "string") {
    const page = Number(new URL(pages.next).searchParams.get("page"));
    response = await client.v2.sizes.get({
        queryParameters: {
            page,
        },
    });
    pages = response?.links?.pages;
}

Response Example

Show Response Example
{
  "sizes": [
    {
      "slug": "s-1vcpu-1gb",
      "memory": 1024,
      "vcpus": 1,
      "disk": 25,
      "transfer": 1,
      "price_monthly": 5,
      "price_hourly": 0.00743999984115362,
      "regions": [
        "ams2",
        "ams3",
        "blr1",
        "fra1",
        "lon1",
        "nyc1",
        "nyc2",
        "nyc3",
        "sfo1",
        "sfo2",
        "sfo3",
        "sgp1",
        "tor1"
      ],
      "available": true,
      "description": "Basic",
      "disk_info": [
        {
          "type": "local",
          "size": {
            "amount": 25,
            "unit": "gib"
          }
        }
      ]
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digitalocean.com/v2/sizes?page=64&per_page=1",
      "next": "https://api.digitalocean.com/v2/sizes?page=2&per_page=1"
    }
  },
  "meta": {
    "total": 64
  }
}

More Information

See /v2/sizes in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.