0

List network transfer prices

by
Published Oct 17, 2025

Returns collection of network transfer prices, including any region-specific rates. > --- - __CLI__. ``` linode-cli network-transfer prices ``` [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)

Script linode Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Linode = {
3
  token: string;
4
};
5
/**
6
 * List network transfer prices
7
 * Returns collection of network transfer prices, including any region-specific rates.
8

9

10
>
11

12
---
13

14

15
- __CLI__.
16

17
    ```
18
    linode-cli network-transfer prices
19
    ```
20

21
    [Learn more...](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)
22
 */
23
export async function main(auth: Linode, apiVersion: "v4" | "v4beta") {
24
  const url = new URL(
25
    `https://api.linode.com/${apiVersion}/network-transfer/prices`,
26
  );
27

28
  const response = await fetch(url, {
29
    method: "GET",
30
    headers: {
31
      Authorization: "Bearer " + auth.token,
32
    },
33
    body: undefined,
34
  });
35
  if (!response.ok) {
36
    const text = await response.text();
37
    throw new Error(`${response.status} ${text}`);
38
  }
39
  return await response.json();
40
}
41