Discover/Halfords API
live

Halfords APIhalfords.com

Look up compatible car batteries on Halfords by UK registration number. Returns vehicle details, battery listings, and current prices via a single endpoint.

This API takes change requests — .
Endpoint health
verified 2h ago
search_batteries_by_registration
1/1 passing latest checkself-healing
Endpoints
1
Updated
4h ago

What is the Halfords API?

The Halfords Car Battery API exposes 1 endpoint — search_batteries_by_registration — that accepts a UK vehicle registration number and returns a full catalog of compatible battery listings from halfords.com, including current prices, vehicle identification details, and a total result count. Optionally supply a UK postcode to add local store availability context to the results.

Try it
UK postcode for local store availability context (e.g. SW1A 1AA). Optional.
UK vehicle registration number (e.g. BD51SMR). Spaces are optional.
api.parse.bot/scraper/69d02754-79cb-430c-9b13-78d6341710fa/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/69d02754-79cb-430c-9b13-78d6341710fa/search_batteries_by_registration?postcode=SW1A+1AA&registration=BD51SMR' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace halfords-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: halfords_com_api SDK — bounded, re-runnable; every call capped."""
from parse_apis.halfords_com_api import Halfords, RegistrationRequired

client = Halfords()

# Search batteries by vehicle registration
for battery in client.battery_searches.search(registration="BD51SMR", limit=3):
    print(battery.title, battery.brand, battery.price, battery.sale_price)

# Get first result for detailed inspection
item = client.battery_searches.search(registration="BD51SMR", limit=1).first()
if item:
    print(item.product_id, item.title, item.url)

# Handle missing registration error
try:
    client.battery_searches.search(registration="BD51SMR", limit=1).first()
except RegistrationRequired as e:
    print("error:", e)

print("exercised: battery_searches.search")
All endpoints · 1 totalmissing one? ·

Looks up a vehicle by its UK registration number and returns car battery listings from Halfords with current prices. When the registration is recognized, vehicle details are included; the battery catalog is always returned regardless of VRN match. Results are a single page of up to 48 products ordered by relevance.

Input
ParamTypeDescription
postcodestringUK postcode for local store availability context (e.g. SW1A 1AA). Optional.
registrationrequiredstringUK vehicle registration number (e.g. BD51SMR). Spaces are optional.
Response
{
  "type": "object",
  "fields": {
    "vehicle": "object or null — vehicle details if registration was recognized",
    "batteries": "array of battery product listings",
    "registration": "string — the registration number queried",
    "total_results": "integer — total number of matching batteries"
  },
  "sample": {
    "data": {
      "vehicle": null,
      "batteries": [
        {
          "url": "https://www.halfords.com/motoring/batteries/car-batteries/halfords-efb096-start-stop-car-battery-5-year-guarantee-255862.html",
          "brand": "Halfords",
          "price": 201.99,
          "title": "Halfords EFB096 Start Stop Car Battery 5 Year Guarantee",
          "image_url": "https://cdn.media.halfords.com/i/washford/255862/Halfords-EFB096-Start-Stop-Car-Battery-5-Year-Guarantee",
          "product_id": "255862",
          "sale_price": 129
        },
        {
          "url": "https://www.halfords.com/motoring/batteries/car-batteries/halfords-efb027-start-stop-efb-12v-car-battery-257730.html",
          "brand": "Halfords Advanced",
          "price": 138,
          "title": "Halfords EFB027 Start/Stop EFB 12V Car Battery 5 Year Guarantee",
          "image_url": "https://cdn.media.halfords.com/i/washford/257730/Halfords-EFB027-Start/Stop-EFB-12V-Car-Battery-5-Year-Guarantee",
          "product_id": "257730",
          "sale_price": 109.5
        }
      ],
      "registration": "BD51SMR",
      "total_results": 80
    },
    "status": "success"
  }
}

About the Halfords API

What the API Returns

The search_batteries_by_registration endpoint takes a required registration string (UK VRN, spaces optional) and returns three top-level fields: vehicle (an object with details about the recognized vehicle, or null if the registration is not matched), batteries (an array of product listings with current prices), and total_results (an integer count of matching batteries). The battery catalog is always returned regardless of whether the VRN is recognized.

Input Parameters

Only one parameter is required: registration, a UK vehicle registration number such as BD51SMR. The optional postcode parameter accepts a UK postcode (e.g. SW1A 1AA) and adds local store availability context to the response. No other filters — such as brand, cold-cranking amps, or battery group size — are accepted as inputs; filtering must be done client-side on the returned batteries array.

Response Shape and Coverage

Each object in the batteries array represents a single product listing from Halfords' car battery range. The vehicle object, when present, reflects Halfords' own vehicle lookup data tied to the submitted registration. Results are returned as a single page; the total_results field tells you the full count of matching products returned in that page.

Reliability & maintenanceVerified

The Halfords API is a managed, monitored endpoint for halfords.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when halfords.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official halfords.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
2h ago
Latest check
1/1 endpoint passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a vehicle-aware battery finder tool that pre-fills compatible options from a user's number plate
  • Track Halfords car battery prices over time by polling the endpoint for specific registrations
  • Compare battery availability and pricing for a fleet of vehicles identified by their UK VRNs
  • Populate a garage management app with battery product options matched to stored vehicle registrations
  • Cross-reference total_results counts across different vehicle types to identify coverage gaps in Halfords' battery range
  • Surface store-local battery availability by passing a postcode alongside each registration lookup
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Halfords have an official developer API?+
Halfords does not publish a public developer API or API documentation for third-party use. This Parse API provides structured access to battery search data from halfords.com.
What does the vehicle field contain, and when is it null?+
When the submitted registration is recognized by Halfords' vehicle lookup, the vehicle field returns an object containing details about that vehicle. If the registration is not matched — for example, if it is invalid or not found in the lookup — vehicle returns null. The batteries array is always populated regardless of that outcome.
Does the API return results across multiple pages?+
The endpoint returns a single page of results. The total_results field indicates how many battery listings were returned. There are no pagination parameters such as page or offset. You can fork this API on Parse and revise it to add paginated browsing if your use case requires it.
Can I filter batteries by specifications like brand, voltage, or cold-cranking amps?+
The endpoint does not accept specification filters as input parameters. Battery listings are returned based on the vehicle registration match, and any attribute-based filtering needs to be applied client-side on the returned batteries array. You can fork this API on Parse and revise it to add server-side filtering endpoints against those fields.
Does the API cover other Halfords product categories beyond car batteries?+
No. The API currently covers only the car battery catalog accessible via the UK VRN lookup on halfords.com. Categories such as motorcycle batteries, chargers, or other motoring products are not included. You can fork this API on Parse and revise it to add endpoints for those additional product ranges.
Page content last updated . Spec covers 1 endpoint from halfords.com.
Halfords Car Battery API | halfords · Parse