How do I make my first Cartroute API call?
Create a free account, create an API key in the dashboard, and call GET https://cart-route.com/api/v1/search with the key in the Authorization header. The whole path takes about a minute and the first 200 searches are free.
Step 1: How do I get an account and credits?
Sign up with your name, email and a password. 100 credits are added immediately. Click the link in the confirmation email and 100 more are added, once. An agent can also register on a person's behalf with POST /api/v1/accounts.
Step 2: How do I create an API key?
Open the dashboard, name the key (for example "production agent") and press Create key. The key starts with cr_live_ and is shown exactly once, because Cartroute stores only its hash. Put it in an environment variable:
export CARTROUTE_API_KEY="cr_live_..."
Step 3: How do I run the first search?
curl "https://cart-route.com/api/v1/search?q=noise+cancelling+headphones+under+%24400&in_stock=true" \ -H "Authorization: Bearer $CARTROUTE_API_KEY"
import os
import requests
resp = requests.get(
"https://cart-route.com/api/v1/search",
params={"q": "noise cancelling headphones under $400", "in_stock": "true"},
headers={"Authorization": f"Bearer {os.environ['CARTROUTE_API_KEY']}"},
timeout=15,
)
resp.raise_for_status()
for product in resp.json()["results"]:
s = product["price_summary"]
print(product["title"], "-", s["best_retailer"], s["best_effective_price_usd"])
const url = new URL("https://cart-route.com/api/v1/search");
url.searchParams.set("q", "noise cancelling headphones under $400");
url.searchParams.set("in_stock", "true");
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.CARTROUTE_API_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).detail);
const body = await res.json();
for (const p of body.results) {
console.log(p.title, p.price_summary.best_retailer, p.price_summary.best_effective_price_usd);
}
What comes back?
A search_result with the products that matched, each carrying price_summary, price_insight and an offers array. This is a trimmed real response from the catalog:
{
"object": "search_result",
"data_source": "sandbox",
"query": "sony wh-1000xm6",
"total_results": 1,
"results": [
{
"id": "prd_0dophw3",
"title": "Sony WH-1000XM6 Wireless Noise Cancelling Headphones",
"price_summary": {
"best_offer_id": "off_1piefxe",
"best_retailer": "Newegg",
"best_effective_price_usd": 343.99,
"lowest_price_usd": 343.99,
"highest_price_usd": 454.99,
"spread_usd": 111,
"offers_count": 7,
"in_stock_count": 6,
"coupons_count": 4
},
"price_insight": {
"verdict": "good_time_to_buy",
"reason": "Current lowest price is at or within 1% of the 90-day low of $342.99."
},
"offers": [
{
"retailer": "Newegg",
"price_usd": 343.99,
"shipping_usd": 0,
"effective_price_usd": 343.99,
"availability": {
"in_stock": true
}
}
]
}
],
"credits": {
"charged": 1,
"remaining": 199
}
}
Compare offers on effective_price_usd. Every field is described in response objects.
What should I read next?
- Search reference: filters, sorting, budgets and pagination.
- MCP server: skip the HTTP code and give an agent the tools directly.
- Errors and retries: what to do when a call fails.