CheapCarfax API

Get full vehicle history reports by VIN and add them to your own website or app.

Quick start

  1. 1. Get your API key from CheapCarfax. It starts with cfc_.
  2. 2. Store it on your server (for example as an environment variable CHEAPCARFAX_API_KEY).
  3. 3. Request a report with a 17-character VIN:
curl "https://cheapcarfax.co/api/v1/report?vin=1HGCM82633A004352" \
  -H "X-API-Key: YOUR_API_KEY"

Authentication

Send your API key in the X-API-Key header with every request.

X-API-Key: cfc_your_api_key
Keep your key secret. Call the API only from your server, never from browser JavaScript or a mobile app, where visitors could see the key. Anyone with your key can use your monthly reports. If you think it has been exposed, contact us and we will replace it.

Get a report

GET/api/v1/report?vin={VIN}

Returns the full vehicle history report for a VIN. You can also send a POST to the same URL with the JSON body {"vin": "..."}.

Generating a new report usually takes 10–60 seconds. Set your HTTP client timeout to at least 120 seconds.

Parameters

vinrequired17-character VIN (letters I, O and Q are not allowed)

Example request

curl "https://cheapcarfax.co/api/v1/report?vin=1HGCM82633A004352" \
  -H "X-API-Key: YOUR_API_KEY"

# or with POST
curl -X POST "https://cheapcarfax.co/api/v1/report" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vin": "1HGCM82633A004352"}'

Example response (200 OK)

{
  "success": true,
  "data": {
    "report_id": "4f2c9a1e-8b7d-4c3a-9e21-0d5f6a7b8c9d",
    "vin": "1HGCM82633A004352",
    "year": 2003,
    "make": "Honda",
    "model": "Accord",
    "generated_at": "2026-10-09T17:43:18.748Z",
    "html_content": "<!DOCTYPE html><html>... full report ...</html>"
  },
  "meta": {
    "cached": false,
    "monthly_limit": 200
  }
}

Response fields

FieldDescription
data.report_idUnique ID of the report.
data.vinThe VIN of the vehicle.
data.year / make / modelBasic vehicle details.
data.generated_atWhen the report was generated (ISO 8601, UTC).
data.html_contentThe complete report as a standalone HTML page. Show it in an iframe (srcdoc) or save it as an .html file.
meta.cachedtrue if this VIN was already requested with your key before, so the saved report was returned instantly.
meta.monthly_limitYour number of reports per month.

Display & save as PDF

The report is delivered in data.html_content as one complete, styled HTML page. Show it on your website as it is:

<iframe id="report" style="width:100%; height:90vh; border:0;"></iframe>

<script>
  // reportHtml = data.html_content, passed from your server
  document.getElementById("report").srcdoc = reportHtml;
</script>

Saving as PDF

  • For your visitors: add a "Download PDF" button that calls iframe.contentWindow.print(). The browser then offers "Save as PDF".
  • On your server: convert html_content with any HTML-to-PDF tool (for example Puppeteer, Playwright, wkhtmltopdf or a PDF API).
<button onclick="document.getElementById('report').contentWindow.print()">
  Download PDF
</button>

Usage & monthly limit

Your plan runs in monthly periods that start on the day your plan begins, for example October 14 to November 14. Each period includes a fixed number of reports, and the count starts again from 0 when your plan renews. There is no per-hour or per-minute limit. If a period ends without renewal, requests return 402 until the plan is renewed.

Check your exact period dates and remaining reports at any time. This call is free and never counts:

GET/api/v1/usage
curl "https://cheapcarfax.co/api/v1/usage" -H "X-API-Key: YOUR_API_KEY"

{
  "success": true,
  "data": {
    "plan": {
      "status": "active",
      "period_start": "2026-10-14T00:00:00.000Z",
      "period_end": "2026-11-14T00:00:00.000Z",
      "days_left": 31
    },
    "usage": { "limit": 200, "used": 3, "remaining": 197 }
  }
}

status is active, ending_soon (5 days or less left) or expired. You can also see the same information in your CheapCarfax dashboard after signing in with your account email.

RequestCounts toward your limit?
Successful report (200 OK)Yes, 1 report
Same VIN requested againYes, 1 report (returned instantly)
Invalid or unknown VIN (400)No
Missing or wrong API key (401 / 403)No
Plan period ended (402)No
Checking your usage (/api/v1/usage)No, free
Report could not be generated (502 / 503)No
Request after the limit is reached (429)No
In short: you only use a report when you receive a report. Anything that fails is free. When the limit is reached, report requests return 429 until your plan renews.

Errors

Errors return an HTTP status code and a JSON body with error and usually a message. No failed request counts toward your limit.

{
  "error": "Invalid VIN format",
  "message": "VIN must be 17 characters and cannot contain I, O, or Q."
}
StatusMeaningWhat to do
200Success.—
400VIN missing, wrong format, or no vehicle found for the VIN.Check the VIN and try again.
401API key missing or invalid.Send the correct key in the X-API-Key header.
402Your plan period has ended.Renew your plan to continue.
403API key deactivated or not allowed for this endpoint.Contact support.
429Report limit for this period reached.Wait until your plan renews, or contact us to raise your limit.
502The report could not be generated right now.Retry after a few minutes.
503Temporary error.Retry after a few seconds.

Code examples

// Keep the key on your server, e.g. in an environment variable.
const API_KEY = process.env.CHEAPCARFAX_API_KEY;
const BASE_URL = "https://cheapcarfax.co/api/v1";

async function getReport(vin) {
  const res = await fetch(`${BASE_URL}/report?vin=${encodeURIComponent(vin)}`, {
    headers: { "X-API-Key": API_KEY },
  });
  const body = await res.json();
  if (!res.ok) {
    // body.error / body.message explain what went wrong (see "Errors")
    throw new Error(`${res.status}: ${body.message || body.error}`);
  }
  return body.data; // { report_id, vin, year, make, model, html_content, ... }
}
}

Best practices

  • Save reports on your side. Store html_content after the first request. Requesting the same VIN again counts as another report.
  • Validate the VIN before calling: 17 characters, no I, O or Q.
  • Use a timeout of at least 120 seconds. New reports can take up to a minute.
  • Retry on 502 / 503 after a short wait. These are never counted.
  • Handle 429 by showing your users a friendly message. Do not retry in a loop.
  • Never expose your API key in front-end code.

Questions or need a higher limit? Contact support.