Rateplane SDKs
Official TypeScript and Python clients for the Rateplane API. Access live multi-cloud pricing for AWS, Azure, GCP, OCI, Linode, and Vultr programmatically — in your CI pipeline, cost scripts, dashboards, and internal tools.
Both SDKs use only stdlib / native fetch. No bloat.
Complete TypeScript types. Python type hints throughout.
Browser-session catalog reads are available on Starter. API keys start on Team.
API access by plan
All plans include browser-session access to the public pricing catalog. Create an API key on Team or higher at Dashboard → API Keys. Browser-session catalog reads are available on Starter; API keys start on Team.
| Plan | API keys | Requests / min | Bulk endpoint |
|---|---|---|---|
| Starter (free) | 0 | 60 | Catalog |
| Team | 5 | 300 | ✓ |
| Business | 25 | 600 | ✓ |
| Enterprise | 100 | 1000 | ✓ |
rateplane-sdk
npmWorks in Node.js 18+ and all modern browsers. Uses native fetch — no dependencies.
Installation
npm install rateplane-sdk
pnpm add rateplane-sdk
yarn add rateplane-sdk
Quick start
import { Rateplane } from "rateplane-sdk";
const rp = new Rateplane({ apiKey: "rp_live_..." });
// List AWS instances with 8+ vCPUs under $0.50/hr
const result = await rp.instances.list({
provider: "AWS",
minVcpus: 8,
maxHourly: 0.50,
pageSize: 100,
});
console.log(`Found ${result.total} instances`);
for (const inst of result.data) {
console.log(
inst.name,
inst.vcpus, "vCPUs",
inst.memoryGb, "GiB",
`$${inst.pricing.onDemand}/hr`,
);
}Common patterns
const inst = await rp.instances.get("aws-m7i.large-us-east-1");
console.log(inst.vcpus, inst.memoryGb, inst.pricing.onDemand);const { data, total, truncated } = await rp.instances.getAll({ provider: "AWS" });
if (truncated) {
console.warn(`Only ${data.length} of ${total} rows returned — add filters`);
}const instances = await rp.instances.compare([
"aws-m7i.large-us-east-1",
"azure-Standard_D4s_v5-eastus",
"gcp-n2-standard-4-us-central1",
]);
instances.forEach((i) => {
console.log(i.provider.name, i.name, i.pricing.onDemand);
});import { writeFileSync } from "fs";
const csv = await rp.instances.exportCsv({
provider: "AWS",
minVcpus: 16,
priceType: "SPOT",
});
writeFileSync("spot-instances.csv", csv);// GPU instances on AWS with at least 4 GPUs under $3/hr
const result = await rp.instances.list({
expr: "gpu>=4 price<3",
provider: "AWS",
});import { Rateplane, RateplaneError } from "rateplane-sdk";
try {
const inst = await rp.instances.get("invalid-id");
} catch (err) {
if (err instanceof RateplaneError) {
console.error(`API error ${err.status}: ${err.message}`);
}
}Method reference
.list(params?)List instances from the catalog with filtering and pagination. Returns up to 200 rows per page.
Promise<ListInstancesResponse>.get(id)Get a single instance by catalog ID (e.g. aws-m7i.large-us-east-1).
Promise<Instance>.getAll(params?)Download all matching instances in one request (up to 5,000 rows). Check the truncated field.
Promise<GetAllInstancesResponse>.compare(ids[])Fetch multiple instances side-by-side by catalog ID. Pass up to 4 IDs.
Promise<Instance[]>.exportCsv(params?)Export the filtered catalog as a CSV string. Same params as list().
Promise<string>rateplane-python
PyPIPure Python 3.8+ with no dependencies. Uses only urllib from the standard library.
Installation
pip install rateplane-python
Quick start
from rateplane import Rateplane
rp = Rateplane(api_key="rp_live_...")
# List AWS instances with 8+ vCPUs under $0.50/hr
result = rp.instances.list(
provider="AWS",
min_vcpus=8,
max_hourly=0.50,
page_size=100,
)
print(f"Found {result['total']} instances")
for inst in result["data"]:
print(
inst["name"],
inst["vcpus"], "vCPUs",
inst["memoryGb"], "GiB",
f"$" + str(inst['pricing']['onDemand']) + "/hr",
)Common patterns
inst = rp.instances.get("aws-m7i.large-us-east-1")
print(inst["vcpus"], inst["memoryGb"], inst["pricing"]["onDemand"])result = rp.instances.get_all(provider="GCP")
if result["truncated"]:
print(f"Warning: only {result['returned']} of {result['total']} rows returned")
instances = result["data"]import pandas as pd
from rateplane import Rateplane
rp = Rateplane(api_key="rp_live_...")
result = rp.instances.get_all(provider="AWS", price_type="SPOT", min_vcpus=4)
df = pd.DataFrame(result["data"])
# Expand nested pricing dict
df["spot_price"] = df["pricing"].apply(lambda p: p.get("spot"))
df = df.dropna(subset=["spot_price"])
print(df[["name", "vcpus", "memoryGb", "spot_price"]]
.sort_values("spot_price")
.head(10))csv_data = rp.instances.export_csv(provider="AWS", price_type="SPOT")
with open("spot-instances.csv", "w") as f:
f.write(csv_data)from rateplane import Rateplane, RateplaneError
try:
inst = rp.instances.get("invalid-id")
except RateplaneError as err:
print(f"API error {err.status}: {err}")Method reference
.list(**kwargs)List instances with filtering and pagination. All params are keyword-only with snake_case names.
dict (data, total, page, pageSize, totalPages).get(instance_id)Get a single instance dict by catalog ID.
dict.get_all(**kwargs)Download all matching instances in one request (up to 5,000 rows).
dict (data, total, returned, truncated).compare(instance_ids)Fetch multiple instances side-by-side. Pass a list of catalog IDs.
list[dict].export_csv(**kwargs)Export the filtered catalog as a CSV string.
strDirect HTTP access
All SDK methods are thin wrappers around public HTTP endpoints. You can use curl, wget, or any HTTP client directly.
https://rateplane.comPass your API key as Authorization: Bearer rp_live_.... Omit the header for unauthenticated access (global rate limits apply).
curl "https://rateplane.com/api/instances?provider=AWS&minVcpus=8&maxHourly=0.5" \ -H "Authorization: Bearer rp_live_..."
curl "https://rateplane.com/api/instances/aws-m7i.large-us-east-1" \ -H "Authorization: Bearer rp_live_..."
curl "https://rateplane.com/api/instances/all?provider=GCP" \ -H "Authorization: Bearer rp_live_..." \ | jq '.data | length'
curl "https://rateplane.com/api/export?provider=AWS&minVcpus=16&priceType=SPOT" \ -H "Authorization: Bearer rp_live_..." \ -o spot-instances.csv
Query parameters
| Parameter | Type | Description |
|---|---|---|
| q | string | Full-text search across name, family, description |
| provider | AWS | AZURE | GCP | OCI | Filter to one cloud provider |
| region | string | Region name (e.g. us-east-1, eastus, us-central1) |
| priceType | ON_DEMAND | SPOT | RESERVED_1YR | RESERVED_3YR | Default: ON_DEMAND |
| familyCategory | GENERAL | COMPUTE | MEMORY | STORAGE | GPU | HPC | Instance family category |
| minVcpus | number | Minimum vCPU count |
| maxVcpus | number | Maximum vCPU count |
| minMemoryGb | number | Minimum memory in GiB |
| maxMemoryGb | number | Maximum memory in GiB |
| maxHourly | number | Maximum on-demand hourly price (USD) |
| expr | string | Expression filter, e.g. vcpu>=8 memory<=32 |
| currency | string | ISO 4217 currency code (default: USD) |
| page | number | Page number, 1-based (list only) |
| pageSize | number | Results per page, max 200 (list only) |