# Cloud VM Price Comparison: AWS vs Azure vs GCP (`cobalt_relay/cloud-vm-price-comparison`) Actor

Find the cheapest VM for your vCPU and memory needs across AWS, Azure and Google Cloud, side by side, from official on-demand prices refreshed daily.

- **URL**: https://apify.com/cobalt_relay/cloud-vm-price-comparison.md
- **Developed by:** [Cobalt Relay](https://apify.com/cobalt_relay) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 price comparisons

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Cloud VM Price Comparison: AWS vs Azure vs GCP

Find the cheapest virtual machine for your workload across **AWS, Microsoft Azure and Google Cloud**, side by side, in seconds. Tell it how many vCPUs and how much memory you need, pick a location, and get the cheapest matching instance on each cloud, ranked, with hourly and monthly prices.

Prices come from each provider's **official public price lists** (AWS Price List, Azure Retail Prices API, Google Cloud Billing Catalog) and are **refreshed daily**.

### What you get

For **4 vCPU / 16 GB, Linux, Canada** (real output, October 2026):

| Cloud | Instance | Arch | $/hour | $/month | vs cheapest |
|---|---|---|---|---|---|
| GCP | e2-standard-4 | x64 | 0.1475 | 107.71 | cheapest |
| Azure | Standard_D4ps_v6 | Arm | 0.1560 | 113.88 | +5.7% |
| AWS | m6g.xlarge | Arm | 0.1712 | 124.98 | +16.0% |

Intel pricing is nearly identical across the three clouds. The real savings usually come from AMD and Arm instances, and this Actor finds them for you.

### Why use it

- **Three clouds, one answer.** No more switching between three pricing calculators that each name instances differently.
- **Matches by spec, not by name.** You ask for vCPU and memory; it finds the cheapest instance on each cloud that meets them, and flags when the best option is larger than you asked for.
- **Includes Google Cloud.** GCP prices most machines per vCPU and per GB of RAM rather than per instance; this Actor does that math for you.
- **Batch mode.** Compare a whole server inventory in one run, for migration planning, FinOps reviews or client proposals.
- **Fair comparisons.** Burstable instances (AWS t-series, Azure B-series, GCP shared-core e2) are excluded by default, because their throttled CPUs aren't comparable to dedicated ones. Turn them on if you want them.

### Who it's for

- FinOps and cloud cost teams checking whether a workload would be cheaper elsewhere
- Consultants and MSPs preparing multi-cloud proposals and migration estimates
- Engineers choosing where to run a new service
- AI agents answering "which cloud is cheapest for X?" (callable through the Apify MCP server)

### How to use it

1. Enter the **vCPUs** and **memory (GB)** you need.
2. Choose **Linux or Windows** (Windows prices include the Windows Server license).
3. Pick a **location**. Presets compare the nearest region on each cloud:

| Preset | AWS | Azure | GCP |
|---|---|---|---|
| Canada Central | ca-central-1 | canadacentral | northamerica-northeast2 |
| Canada East | ca-central-1 | canadaeast | northamerica-northeast1 |
| US East | us-east-1 | eastus | us-east4 |
| US Central | us-east-2 | centralus | us-central1 |
| US West | us-west-2 | westus2 | us-west1 |

Or choose **Custom regions** and enter any region code per cloud, for example `{"aws": "eu-west-1", "azure": "northeurope", "gcp": "europe-west1"}`. Leave a cloud out to skip it.

4. Optionally restrict **CPU architecture** to x64 if your software can't run on Arm, or raise **options per cloud** to see the top few choices from each provider.

#### Batch mode

To compare many workloads in one run, fill in **Batch: multiple workloads**:

```json
[
  {"name": "web", "vcpu": 2, "memoryGb": 8},
  {"name": "api", "vcpu": 4, "memoryGb": 16},
  {"name": "db", "vcpu": 8, "memoryGb": 64, "os": "Windows"}
]
```

### Output

One row per recommended instance, in a table you can export as CSV, Excel or JSON.

| Field | Meaning |
|---|---|
| `workload` | Workload name (from batch mode, or `workload-1`) |
| `provider` | `aws`, `azure` or `gcp` |
| `instanceType` | Instance or VM size name |
| `vcpu`, `memoryGb` | Instance specs |
| `arch` | `x64` or `arm64` |
| `os` | `Linux` or `Windows` |
| `region` | Region code |
| `priceHourUsd`, `priceMonthUsd` | On-demand price (month = 730 hours) |
| `vsCheapestPct` | How much more it costs than the cheapest option, in % |
| `isCheapest` | `true` for the cheapest option for this workload |
| `exactMatch` | `false` when the instance is larger than requested |
| `pricesUpdatedAt` | When that cloud's prices were last refreshed |

### Pricing

**$0.02 per comparison.** One comparison is one workload compared across the clouds, however many options per cloud you ask for. A 100-server inventory costs $2. Workloads with no match on any cloud are not charged.

### Coverage

- **Pricing model:** on-demand (pay-as-you-go), USD, compute only. Disks, network and licenses other than Windows Server are not included.
- **AWS:** all EC2 instance families in every commercial and GovCloud region, plus Local Zones.
- **Azure:** D-series v5/v6 (general purpose, including AMD and Arm), E-series v5/v6 (memory optimized), Fs v2 (compute optimized) and B-series (burstable), in all public regions.
- **Google Cloud:** E2, N2, N2D, C3 and C4 families in all regions.

Specialized families (GPU, HPC, very large memory) and reserved, savings-plan and spot pricing are on the roadmap.

### FAQ

**How current are the prices?**
They are refreshed from the providers' official price lists every day. Each result includes `pricesUpdatedAt`.

**Why didn't I get an exact match?**
Not every cloud offers every vCPU/memory combination. The Actor picks the cheapest instance that meets or exceeds your request and sets `exactMatch` to `false`, so you can see when you'd be paying for extra capacity.

**Why is Arm often the cheapest?**
AWS Graviton, Azure Cobalt and Ampere instances are typically priced 10–20% below comparable Intel instances. If your software (or its container images) only runs on x86, set **CPU architecture** to x64.

**Are the vCPUs comparable across clouds?**
Close, but not identical. A vCPU is a hardware thread on most Intel and AMD instances, while Arm instances usually give a full physical core per vCPU. For performance-sensitive workloads, benchmark before committing.

**Do the prices include discounts?**
No. These are public list prices. Committed-use discounts, savings plans, enterprise agreements and GCP sustained-use discounts can lower your actual bill.

### Using it from code or AI agents

Call it through the Apify API or any Apify client, or connect it to Claude, ChatGPT, Cursor and other AI tools through the [Apify MCP server](https://mcp.apify.com). Ask "what's the cheapest 8 vCPU / 32 GB Linux VM in US East?" and let the agent run it.

### Feedback

Missing a region, instance family or feature you need? Open an issue on this Actor's **Issues** tab.

# Actor input Schema

## `vcpu` (type: `integer`):

Minimum number of vCPUs you need.

## `memoryGb` (type: `integer`):

Minimum memory you need, in GB.

## `os` (type: `string`):

Windows prices include the Windows Server license.

## `location` (type: `string`):

Compares the closest region on each cloud. Choose Custom to pick exact regions.

## `customRegions` (type: `object`):

Used when Location is Custom. Region codes per cloud, e.g. {"aws": "eu-west-1", "azure": "northeurope", "gcp": "europe-west1"}. Leave a cloud out to skip it.

## `architecture` (type: `string`):

Arm (AWS Graviton, Azure Cobalt/Ampere) is often cheapest but needs Arm-compatible software.

## `includeBurstable` (type: `boolean`):

AWS t-series, Azure B-series and GCP shared-core e2. Cheaper, but CPU is throttled under sustained load.

## `optionsPerCloud` (type: `integer`):

How many of the cheapest matches to return from each cloud.

## `workloads` (type: `array`):

Optional. Compare many VMs in one run; overrides the vCPU/memory fields above. Example: \[{"name": "web", "vcpu": 2, "memoryGb": 8}, {"name": "db", "vcpu": 8, "memoryGb": 64, "os": "Windows"}]

## Actor input object example

```json
{
  "vcpu": 4,
  "memoryGb": 16,
  "os": "Linux",
  "location": "canada-central",
  "customRegions": {
    "aws": "eu-west-1",
    "azure": "northeurope",
    "gcp": "europe-west1"
  },
  "architecture": "any",
  "includeBurstable": false,
  "optionsPerCloud": 1
}
```

# Actor output Schema

## `comparison` (type: `string`):

Cheapest matching VM on AWS, Azure and Google Cloud for each workload, with hourly and monthly on-demand prices and the % difference from the cheapest option.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "customRegions": {
        "aws": "eu-west-1",
        "azure": "northeurope",
        "gcp": "europe-west1"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("cobalt_relay/cloud-vm-price-comparison").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "customRegions": {
        "aws": "eu-west-1",
        "azure": "northeurope",
        "gcp": "europe-west1",
    } }

# Run the Actor and wait for it to finish
run = client.actor("cobalt_relay/cloud-vm-price-comparison").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "customRegions": {
    "aws": "eu-west-1",
    "azure": "northeurope",
    "gcp": "europe-west1"
  }
}' |
apify call cobalt_relay/cloud-vm-price-comparison --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cobalt_relay/cloud-vm-price-comparison"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HN8wBqz01QRMudDRd/builds/ib07xjCFPRKcoCbei/openapi.json
