# Extract specifications from car listings

How to pull engine, drivetrain and fuel figures from car ads, normalize units and fields across listings, and build a shortlist you can compare side by side.

Extracting specifications from car listings means copying the stated engine, transmission, drivetrain and fuel figures out of each ad and into one set of fields. The work has two halves: capture the listing details accurately, then normalize them so every car is described the same way. Done in that order, the specs of several cars sit side by side and a shortlist becomes easy to read. 

- Read the listing once for the specification fields, then again for the wording that qualifies them.
- Normalize units and field names before comparing, or two identical cars will look different.
- Keep the source wording for any figure you convert, so the original claim stays traceable.
- Mark a field empty when the ad does not state it, rather than filling it from another source.
- Compare a shortlist only on fields that every car in it fills in.
 

## What spec extraction from listings involves 

Vehicle spec extraction is a data capture task, not a reading task. You take the car specifications an ad states and move each one into a named field, such as engine displacement, transmission type, drivetrain or fuel economy. 

An ad mixes firm figures with loose description. A listing might state engine displacement in liters and power in horsepower, then add that the car drives smoothly. Only the figures belong in spec fields, so the extraction step separates measurable claims from sales wording. 

The output is a row of fields for each car, not a paragraph. Once the specs sit in rows, a comparison shortlist can hold several listings side by side and you can read across instead of re-reading each ad. 

- Engine: displacement, cylinders, fuel type
- Power and torque as stated in the ad
- Transmission type and number of gears
- Drivetrain layout
- Fuel economy and the cycle it is quoted on
- Body style, doors and seating
- Model year and trim name
 

## Define the spec fields before you start 

A fixed list of spec fields is what makes listing extraction repeatable across many ads. Write the field names down first and keep the same names for every car in the shortlist. 

Engine and transmission details deserve separate fields rather than one free-text box. A single notes column hides the difference between a car with a larger engine and one with a different gearbox, and it cannot be sorted or compared. 

Decide which fields are required and which are optional for your shortlist. Trim name and model year anchor a listing, while figures such as fuel economy may be missing from some ads and belong in optional fields. 
| Field | What it holds | Example of a stated value | 
| Engine displacement | Swept volume as stated | 2.0 liters | 
| Transmission | Type and gear count | Automatic, 8 gears | 
| Drivetrain | Which wheels are driven | All-wheel drive | 
| Fuel economy | Consumption with its test cycle | 7.1 liters per 100 km combined |  

## Capture listing details without altering them 

Copy specs from ads exactly as written before you change anything. The first pass records the raw value, the unit and any qualifier next to it, such as a combined or city figure for fuel economy. 

A qualifier changes what a number means, so it belongs with the value. Fuel economy quoted on one test cycle is not the same claim as the same number quoted on another, and the cycle name must travel with the figure. 

Leave a field empty when the ad stays silent. Filling a gap from a brochure or a different listing breaks the link between the shortlist and the ads it came from, and the missing value is itself useful information. 

- Record the number as printed, including decimals
- Record the unit next to the number
- Record the test cycle or condition the ad names
- Keep the original phrase when a value is vague
- Leave unstated fields empty
 

## Normalize units across every listing 

Spec data harmonization means converting stated figures into one unit per field, so a mixed set of ads becomes comparable. Unit conversion is arithmetic, and the conversion factor used should be written down next to the field. 

Power, torque and fuel economy are the fields most often stated in different units. Convert each one to the unit your shortlist uses, keep the original value in a neighboring column and round the converted figure to a sensible precision. 

Displacement may appear in liters or in cubic centimeters, and distance may appear in miles or kilometers. A conversion table shared by everyone reading the shortlist prevents two people from producing two different normalized specifications for the same car. 
| Field | Units you may meet | What to store | 
| Power | Horsepower, kilowatts | One unit plus the stated value | 
| Torque | Newton meters, pound-feet | One unit plus the stated value | 
| Displacement | Liters, cubic centimeters | Liters to two decimals | 
| Fuel economy | Liters per 100 km, miles per gallon | One unit plus the test cycle |  

## Harmonize field names and values 

Normalized specifications need one spelling per value, not just one unit. Drivetrain is a clear case, because front-wheel drive, all-wheel drive and four-wheel drive appear under many abbreviations in ads. 

Build a small controlled vocabulary for each field where the ad text varies. Transmission type is another field worth a fixed set of values, since the same gearbox may be described as automatic, auto or a specific technology name. 

Apply the vocabulary by mapping each raw value to a list entry and keeping the raw text beside it. Anyone reviewing the shortlist can then see what the ad said and how the extraction classified it, which is spec extraction you can audit. 

- Front-wheel drive
- Rear-wheel drive
- All-wheel drive
- Four-wheel drive
- Automatic transmission
- Manual transmission
 

## Handling missing and conflicting values 

Missing values are normal in vehicle specifications taken from listings, and a shortlist should show the gap rather than hide it. An empty fuel economy cell tells you the ad did not state one, which affects how far you can compare that car. 

Conflicting values inside one ad need a rule decided in advance. If the headline and the specification table give different power figures, record both, note which one the ad emphasizes and flag the row for a check with the seller. 

Never average two conflicting figures to produce a single number. The average is a value the ad never stated, and it will be read later as if the seller had claimed it. 

- Show empty fields as empty, not as zero
- Record both figures when an ad contradicts itself
- Flag the row for a question to the seller
- Do not merge values from two different cars
 

## Build the comparison shortlist 

A comparison shortlist works when every column is filled for every car in it. Choose the spec fields that matter for your decision, such as drivetrain and engine displacement, and drop fields that are empty across the group. 

Sorting a normalized table changes the question from which ad reads well to which car meets a condition. You can group cars by drivetrain, filter by transmission type or line up fuel economy figures now that they share a unit. 

Keep the listing identity with each row, even in a working draft. A row of specifications without its source ad cannot be checked, and a shortlist you cannot check is a list of claims rather than a record of listings. 

## Questions about extracting car specifications 

### How do I extract specs from car ads quickly? 

You extract specs from car ads quickly by fixing the field list first, then reading each ad once for values and units and once for qualifiers. A repeated template keeps the capture step short. Speed comes from the template, not from skipping the check on units. 

### How do I normalize car specs across listings? 

You normalize car specs across listings by converting each figure to one unit per field and mapping each value to a controlled vocabulary. Keep the original value and unit in a neighboring column so the conversion can be checked. Shared conversion rules matter more than the choice of unit. 

### What should I do when a listing does not state a spec? 

Leave the field empty when a listing does not state a spec, and treat the gap as information. Filling it from another source breaks the link to the ad. Ask the seller for the figure if the field matters for your shortlist. 

### Which vehicle specs belong in a comparison shortlist? 

The specs that belong are the ones your decision depends on and that the ads actually state, such as engine displacement, transmission, drivetrain and fuel economy. Fields left empty for every car in the group add noise. Keep model year and trim in the row so each car stays identifiable. 

### Can specs from listings be trusted as stated? 

Specs from listings are seller statements, so treat them as claims to verify rather than measured facts. Conflicting figures in one ad are a signal to check with the seller. A figure that affects a safety or repair decision needs a trained inspection, not a reading of the ad.
