MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Azure-Pricing

Azure-Pricing是一款data方向的AI技能,核心价值是Fetches real-time Azure retail pricing using the Azure Retail Prices API (prices,可用于解决开发者在data领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Fetches real-time Azure retail pricing using the Azure Retail Prices API (prices.azure.com) and estimates Copilot Studio agent credit consumption. Use when the user asks about the cost of any Azure se

Last verified on: 2026-05-30
mkdir -p ./skills/azure-pricing && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/azure-pricing/SKILL.md -o ./skills/azure-pricing/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Azure Pricing Skill


Use this skill to retrieve real-time Azure retail pricing data from the public Azure Retail Prices API. No authentication is required.


When to Use This Skill


- User asks about the cost of an Azure service (e.g., "How much does a D4s v5 VM cost?")

- User wants to compare pricing across regions or SKUs

- User needs a cost estimate for a workload or architecture

- User mentions Azure pricing, Azure costs, or Azure billing

- User asks about reserved instance vs. pay-as-you-go pricing

- User wants to know about savings plans or spot pricing


API Endpoint


text
GET https://prices.azure.com/api/retail/prices?api-version=2023-01-01-preview

Append `$filter` as a query parameter using OData filter syntax. Always use `api-version=2023-01-01-preview` to ensure savings plan data is included.


Step-by-step Instructions


If anything is unclear about the user's request, ask clarifying questions to identify the correct filter fields and values before calling the API.


1. **Identify filter fields** from the user's request (service name, region, SKU, price type).

2. **Resolve the region**: the API requires `armRegionName` values in lowercase with no spaces (e.g. "East US" → `eastus`, "West Europe" → `westeurope`, "Southeast Asia" → `southeastasia`). See [references/REGIONS.md](references/REGIONS.md) for a complete list.

3. **Build the filter string** using the fields below and fetch the URL.

4. **Parse the `Items` array** from the JSON response. Each item contains price and metadata.

5. **Follow pagination** via `NextPageLink` if you need more than the first 1000 results (rarely needed).

6. **Calculate cost estimates** using the formulas in [references/COST-ESTIMATOR.md](references/COST-ESTIMATOR.md) to produce monthly/annual estimates.

7. **Present results** in a clear summary table with service, SKU, region, unit price, and monthly/annual estimates.


Filterable Fields


| Field | Type | Example |

|---|---|---|

| `serviceName` | string (exact, case-sensitive) | `'Functions'`, `'Virtual Machines'`, `'Storage'` |

| `serviceFamily` | string (exact, case-sensitive) | `'Compute'`, `'Storage'`, `'Databases'`, `'AI + Machine Learning'` |

| `armRegionName` | string (exact, lowercase) | `'eastus'`, `'westeurope'`, `'southeastasia'` |

| `armSkuName` | string (exact) | `'Standard_D4s_v5'`, `'Standard_LRS'` |

| `skuName` | string (contains supported) | `'D4s v5'` |

| `priceType` | string | `'Consumption'`, `'Reservation'`, `'DevTestConsumption'` |

| `meterName` | string (contains supported) | `'Spot'` |


Use `eq` for equality, `and` to combine, and `contains(field, 'value')` for partial matches.


Example Filter Strings


text
# All consumption prices for Functions in East US
serviceName eq 'Functions' and armRegionName eq 'eastus' and priceType eq 'Consumption'

# D4s v5 VMs in West Europe (consumption only)
armSkuName eq 'Standard_D4s_v5' and armRegionName eq 'westeurope' and priceType eq 'Consumption'

# All storage prices in a region
serviceName eq 'Storage' and armRegionName eq 'eastus'

# Spot pricing for a specific SKU
armSkuName eq 'Standard_D4s_v5' and contains(meterName, 'Spot') and armRegionName eq 'eastus'

# 1-year reservation pricing
serviceName eq 'Virtual Machines' and priceType eq 'Reservation' and armRegionName eq 'eastus'

# Azure AI / OpenAI pricing (now under Foundry Models)
serviceName eq 'Foundry Models' and armRegionName eq 'eastus' and priceType eq 'Consumption'

# Azure Cosmos DB pricing
serviceName eq 'Azure Cosmos DB' and armRegionName eq 'eastus' and priceType eq 'Consumption'

Full Example Fetch URL


text
https://prices.azure.com/api/retail/prices?api-version=2023-01-01-preview&$filter=serviceName eq 'Functions' and armRegionName eq 'eastus' and priceType eq 'Consumption'

URL-encode spaces as `%20` and quotes as `%27` when constructing the URL.


Key Response Fields


json
{
  "Items": [
    {
      "retailPrice": 0.000016,
      "unitPrice": 0.000016,
      "currencyCode"

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Data professionals
  • Analytics teams
  • Researchers

💡 Use Cases

  • Data pipeline auditing
  • Query optimization

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Azure-Pricing to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

How do I install Azure-Pricing?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/azure-pricing/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Ignoring data quality

AI analysis inherits all data quality issues — profile your data first.

🔗 Related Skills