{
  "openapi": "3.0.1",
  "info": {
    "title": "Halfords Scraper: UK Car Parts, Tyres, Bikes & Prices",
    "description": "Scrape halfords.com: car parts, tyres by size, bikes and services with GBP price, sale and member price, stock, click and collect, EAN, part number, rating and category. Search or lookup, price monitoring. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "ZzEc9Cs3aPstkfH7W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~halfords-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-halfords-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/recordsdata~halfords-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-halfords-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/recordsdata~halfords-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-halfords-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What do you want to do?",
            "enum": [
              "search",
              "lookup"
            ],
            "type": "string",
            "description": "Search scans the Halfords catalog (about 65,000 pages) and keeps what passes your filters. Lookup reads exactly the product pages and product ids you list in Addresses and Product ids.",
            "default": "search"
          },
          "recordTypes": {
            "title": "What to collect",
            "type": "array",
            "description": "Products (one row per part, tyre size, bike or service) or categories (one row per catalog folder with its product count). Categories need Search mode.",
            "items": {
              "type": "string",
              "enum": [
                "products",
                "categories"
              ],
              "enumTitles": [
                "Products: parts, accessories, tyres, bikes and services",
                "Categories: catalog folders with product counts"
              ]
            },
            "default": [
              "products"
            ]
          },
          "searchQueries": {
            "title": "Search words",
            "type": "array",
            "description": "Words that must appear in the product name, brand or category. Example: brake discs, wiper blade, Shimano pedals. Part numbers and EANs are not searched: use Lookup mode with the product ID.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Catalog folder paths or category links. Example: motoring/car-parts/brakes, cycling/bike-parts. Everything below the folder is included.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Example: Bosch, Michelin, Shimano.",
            "items": {
              "type": "string"
            }
          },
          "vehicleType": {
            "title": "Product type",
            "enum": [
              "all",
              "part",
              "tire",
              "bicycle",
              "service"
            ],
            "type": "string",
            "description": "Optional. Parts and accessories, tyres (one row per size), bicycles or services such as MOT, servicing and fitting.",
            "default": "all"
          },
          "tyreSize": {
            "title": "Tyre size",
            "type": "string",
            "description": "Example: 205/55 R16, 205/55 or R16. Adds two requests per tyre row. Leave empty for all sizes."
          },
          "minPrice": {
            "title": "Min price (GBP)",
            "minimum": 0,
            "type": "number",
            "description": "Lowest price in pounds. Example: 10."
          },
          "maxPrice": {
            "title": "Max price (GBP)",
            "minimum": 0,
            "type": "number",
            "description": "Highest price in pounds. Example: 50."
          },
          "inStockOnly": {
            "title": "Only products in stock online",
            "type": "boolean",
            "description": "Skips products Halfords shows as not orderable online.",
            "default": false
          },
          "onSaleOnly": {
            "title": "Only products on sale",
            "type": "boolean",
            "description": "Keeps products with a reduced price.",
            "default": false
          },
          "minRating": {
            "title": "Min customer rating (0-5)",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Example: 4. Products without reviews are left out when set."
          },
          "modifiedSince": {
            "title": "Updated since (date)",
            "type": "string",
            "description": "Example: 2026-10-01. Keeps pages changed on or after that day."
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "sitemap",
              "recentlyUpdated"
            ],
            "type": "string",
            "description": "Sitemap order starts returning rows right away. Recently updated reads the whole sitemap first, so it starts later.",
            "default": "sitemap"
          },
          "startUrls": {
            "title": "Product page links",
            "type": "array",
            "description": "Example: https://www.halfords.com/cycling/pedals-pegs/shimano-xt-pd-t8000-mtb-spd-trekking-pedals-344457.html",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "title": "Product IDs",
            "type": "array",
            "description": "The number at the end of a product link. Example: 344457. An unknown ID returns a free error row.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items to return",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stops after this many rows (all record types together). Free plan capped at 10. Example: 100.",
            "default": 10
          },
          "includeDescription": {
            "title": "Include product description",
            "type": "boolean",
            "description": "Adds the description as plain text. Turn off for smaller rows.",
            "default": true
          },
          "includeVariants": {
            "title": "Include tyre sizes list",
            "type": "boolean",
            "description": "For a tyre pattern, adds the list of every size with id, name and price. Off by default.",
            "default": false
          },
          "onlyNew": {
            "title": "Only items not seen before",
            "type": "boolean",
            "description": "Skips every item seen in an earlier run with the same monitor name, so scheduled runs return only what is new and you pay only for those.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Also return price and stock changes",
            "type": "boolean",
            "description": "With Only items not seen before on, a known product comes back when its price or stock changed, labelled price-drop, price-increase, out-of-stock or back-in-stock.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "One name per saved search. Example: brake-discs-weekly. Empty derives a name from your filters.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset monitor memory before this run",
            "type": "boolean",
            "description": "Clears the memory of this monitor before the run, so everything counts as new again.",
            "default": false
          },
          "concurrency": {
            "title": "Parallel requests (1-4)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many pages are read at the same time. The actor also paces every request to at most 5 per second.",
            "default": 4
          },
          "maxScanSeconds": {
            "title": "Max scan time",
            "minimum": 30,
            "maximum": 3300,
            "type": "integer",
            "description": "Stops reading after this time and keeps the rows found so far. A product page is about 1.3 MB, and the actor reads up to 5 pages per second, so a narrow filter over the whole catalog can take the full time.",
            "default": 900
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Direct requests work; add a proxy only if your own setup requires one."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}