Skip to main content

Cost Optimizer

GET /v1/apis/cost-optimize finds cheaper API alternatives ranked by a composite value score that balances price with reliability.

Parameters

  • category (query) — filter by category (e.g., "ai", "financial")
  • max_price (query) — maximum price per call in credits
  • limit (query, default 10, max 30)

Value Score

value_score = (1/price) × (100 - errorRate) / 100
Higher score = better value. A free API with 0% errors scores highest.

Example

GET /api/v1/apis/cost-optimize?category=data&max_price=0.01

{
  "category": "data",
  "alternatives": [
    { "slug": "open-meteo-weather", "price_per_call": "0", "error_rate": 0.5, "value_score": 995 },
    { "slug": "rest-countries", "price_per_call": "0", "error_rate": 1.2, "value_score": 988 },
    ...
  ],
  "count": 10,
  "tip": "value_score = (1/price) × (100-errorRate)/100. Higher = better value."
}

Use Cases

  • • Find free alternatives to expensive APIs
  • • Compare reliability within a budget constraint
  • • Agents auto-select cheapest reliable option before calling
apitree · AI-Native API Marketplace