Real-time cloud cost estimation API for AWS infrastructure. Integrate pricing intelligence directly into your CI/CD pipeline, IaC tools, and applications.
curl -X POST https://api.costhog.com/graphql \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"query": "{ products(filter: {...}) { prices { usd } } }"}'
# Response: Real-time AWS pricing data
{
"data": {
"products": [{
"prices": [{ "usd": "0.0416" }]
}]
}
}
Powerful APIs and tools to help you understand, predict, and optimize your cloud spending.
Always up-to-date AWS pricing data. No more outdated spreadsheets or manual lookups. Query 100+ AWS services instantly.
Upload your CloudFormation templates and get instant cost estimates. Perfect for pre-deployment validation.
Flexible GraphQL interface for complex queries. Request exactly the data you need, nothing more.
Track your API usage, monitor trends, and stay within your quotas. Detailed dashboards and reporting.
Manage multiple API keys per organization. Track usage by key, revoke anytime, and keep your workflows secure.
SAML 2.0 authentication with Okta, Azure AD, and more. Your infosec team will finally stop bothering you about password policies.
Simple integration. Powerful results. Start estimating costs today.
Create your free account in seconds. No credit card required. Start with 1,000 API calls per month.
Generate your API keys from the dashboard. Name them, track usage, and manage access with ease.
Integrate with your CI/CD, IaC tools, or applications. Use our GraphQL API or REST endpoints.
Drop-in replacement for Infracost Cloud. Use the battle-tested Infracost CLI with Costhog's pricing API.
If you haven't already, install the Infracost CLI:
# macOS
brew install infracost
# Linux/WSL
curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh
Set your Costhog API key and endpoint:
export INFRACOST_API_KEY="your_costhog_api_key"
export INFRACOST_PRICING_API_ENDPOINT="https://costhog.com/graphql"
Tip: Add to your ~/.bashrc or ~/.zshrc
Make these environment variables permanent by adding them to your shell profile.
Use Infracost normally - it will now use Costhog for pricing data:
# Generate cost estimate for Terraform
infracost breakdown --path .
# Compare cost difference between branches
infracost diff --path .
# Post comment to GitHub PR
infracost comment github --path infracost.json \
--github-token $GITHUB_TOKEN \
--pull-request 123 \
--repo owner/repo
Project: main
Name Monthly Qty Unit Monthly Cost
aws_instance.web
├─ Instance usage (Linux/UNIX, on-demand, t3.micro) 730 hours $7.59
└─ root_block_device
└─ Storage (general purpose SSD, gp2) 8 GB $0.80
aws_db_instance.postgres
└─ Database instance (on-demand, db.t3.micro) 730 hours $12.41
OVERALL TOTAL $20.80
Self-Hosted
Keep your infrastructure private. No data sent to third parties.
Drop-in Replacement
Works with existing Infracost workflows. No changes needed.
Real-Time Pricing
Always up-to-date AWS pricing. No stale data.
Flexible Deployment
Use our hosted API or self-host your own instance.
From CI/CD pipelines to internal tools, Costhog fits your workflow.
Validate infrastructure costs before merging PRs. Catch expensive changes early in your CI/CD pipeline.
Build internal dashboards and tools to help teams understand and optimize their cloud spending.
Project future costs based on planned infrastructure changes. Stay within budget and avoid surprises.
Integrate with Terraform, CloudFormation, and other IaC tools to add cost awareness to your workflows.
Start free. Scale as you grow. No hidden fees.
Join teams who are already saving time and money with Costhog.
Start Your Free TrialNo credit card required • 1,000 free API calls/month