DEV Community

John Yesh
John Yesh

Posted on

I Built a Trade Pricing API That Covers 5 Countries — So AI Agents Stop Hallucinating Contractor Costs

Ask ChatGPT "how much does a plumber cost in California?" and you'll get a vague range from 2021 wrapped in disclaimers. Ask Claude the same thing and it'll tell you to "check local listings."

That's the problem. LLMs don't have access to structured, current pricing data. So they guess. And when your AI agent guesses the cost of a $15,000 roof replacement, someone loses money.

I built an API to fix that.

What it does

The Trade Pricing API returns verified contractor and tradesperson pricing across 5 countries — Australia, United States, United Kingdom, Canada, and New Zealand.

10 trades. 30+ services. 700+ price records. 30+ states/regions. All with source attribution.

Trades covered: Plumber, Electrician, Carpenter, Painter, Roofer, HVAC, Landscaper, Cleaner, Locksmith, Pest Control.

Real responses, not guesses

Here's what you get when you ask "how much does a plumber cost in California?"

curl -H "X-API-Key: YOUR_KEY" \
  "https://api.aristocles.com.au/v1/trades/plumber/prices?country=US&state=CA"
Enter fullscreen mode Exit fullscreen mode
{
  "data": [
    {
      "service_name": "Fix Leaking Tap",
      "state": "CA",
      "region": "Los Angeles Metro",
      "country_code": "US",
      "price_low": "175.00",
      "price_high": "350.00",
      "price_avg": "262.50",
      "currency": "USD",
      "unit": "per_job",
      "source_url": "https://www.homeadvisor.com/cost/plumbing/fix-a-faucet/",
      "effective_date": "2026-03-02"
    },
    {
      "service_name": "Hourly Rate",
      "state": "CA",
      "region": "Los Angeles Metro",
      "price_low": "95.00",
      "price_high": "160.00",
      "price_avg": "127.50",
      "currency": "USD",
      "unit": "per_hour"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Every response includes low/high/average ranges, the pricing unit, source URL, and verification date. No hallucinations.

6 endpoints for different use cases

1. Get prices by location

GET /v1/trades/plumber/prices?country=UK&state=England
Enter fullscreen mode Exit fullscreen mode

Returns GBP pricing for all plumber services in England.

2. Compare across states

GET /v1/trades/compare?trade=plumber&service=fix-leaking-tap&locations=NSW,VIC,QLD&country=AU
Enter fullscreen mode Exit fullscreen mode

Side-by-side pricing: NSW ($130–$290 AUD) vs VIC vs QLD.

3. Estimate total job cost

GET /v1/trades/estimate?trade=painter&service=interior-painting&quantity=50&state=CA&country=US
Enter fullscreen mode Exit fullscreen mode

Returns: estimated total $1,100–$2,250 USD for 50 sqm of interior painting in California.

4. Find the cheapest location

GET /v1/trades/plumber/cheapest-location?service=hourly-rate&country=US
Enter fullscreen mode Exit fullscreen mode

Ranks all 10 US states by plumber hourly rate. Ohio is cheapest ($55–$110), New York is priciest ($100–$180).

5. Search trades and services

GET /v1/trades/search?q=leak
Enter fullscreen mode Exit fullscreen mode

Fuzzy search across all trades and services.

6. List all trades

GET /v1/trades
Enter fullscreen mode Exit fullscreen mode

Returns all 10 trades with service counts.

Countries and coverage

Country Currency States/Regions
Australia AUD NSW, VIC, QLD, WA, SA, TAS, ACT, NT
United States USD CA, NY, TX, FL, IL, WA, PA, OH, GA, NC
United Kingdom GBP England, Scotland, Wales, Northern Ireland
Canada CAD ON, BC, AB, QC, MB, SK, NS, NB
New Zealand NZD Auckland, Wellington, Canterbury, Waikato

Built for AI agents (MCP server included)

This isn't just a REST API. It's also an MCP server — meaning Claude, GPT, Gemini, or any MCP-compatible AI agent can call it directly as a tool.

Add it to Claude Desktop in 30 seconds:

{
  "mcpServers": {
    "aristocles": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.aristocles.com.au/mcp/mcp/"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Then just ask Claude: "How much does a plumber cost in Texas?" — it calls the API and gives you a real answer with source attribution.

Who's using this?

  • AI agent builders — ground your agent in real pricing data instead of GPT guesses
  • Home renovation apps — show users what a bathroom reno actually costs in their area
  • Insurance platforms — benchmark repair costs by location for claim estimation
  • Property managers — budget maintenance costs across different regions
  • Comparison sites — "cheapest state for electricians" type content, powered by real data

Quick start

1. Get a free API key (100 requests/day):

curl -X POST https://api.aristocles.com.au/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "name": "Your Name"}'
Enter fullscreen mode Exit fullscreen mode

2. Query any trade:

curl -H "X-API-Key: YOUR_KEY" \
  "https://api.aristocles.com.au/v1/trades/electrician/prices?country=UK&state=Scotland"
Enter fullscreen mode Exit fullscreen mode

3. That's it. JSON response with verified pricing data.

Pricing

Plan Price Requests
Free $0/mo 100/day
Pro $9/mo 10,000/day
Enterprise $49/mo Unlimited

The stack

FastAPI + SQLAlchemy (async) + PostgreSQL + Redis. Deployed on Render. MCP server uses Streamable HTTP transport. Pricing data is sourced from HomeAdvisor, Checkatrade, HomeStars, Hipages, and local trade associations — verified and updated regularly.

API Docs · MCP Server on Smithery · Aristocles


Built by Aristocles — data intelligence that powers LLMs and fast-tracks Agentic AI solutions.

Top comments (0)