05 / DEVELOPERS / VEHICLE HISTORY API

Add Vehicle History Reports To Your Workflow.

The BuyCarfax API returns record counts for a VIN and lets you request a report by VIN or report ID. Read the contract before you write code, then test with a VIN you already know.

WHAT THE API RETURNS

Check Availability First, Then Request The Report You Need.

The records endpoint returns the year, make, model, and the number of reports available from each source. The report endpoints return HTML for one VIN. Each report request uses one credit, and record checks should stay close to your report volume.

Read the API documentation
SECTION / 01

Authenticate Every Request

Send your API key in the x-api-key header. You can find the key in your dashboard profile, and you can contact support to whitelist a static IP address.

SECTION / 02

Check The VIN Before The Report

Use the records endpoint to see whether a report exists. A VIN with no records still uses a credit when you request a report.

SECTION / 03

Handle Errors And Limits

The API returns standard HTTP status codes with a JSON error body. Retry 5xx responses, respect 429 responses, and log the error code and message.

More Research

API documentation ↗Authentication ↗Record counts ↗

Before the test drive

Check The Records First.
Then Inspect The Car.

A vehicle history report gives you context. It does not replace a mechanical inspection.

Check a VIN