{"description":"Searches Auto Trader, the UK's largest car marketplace, like its search results: make and model, version, price in GBP with Auto Trader's price rating, mileage, year, location and distance from a postcode, trade or private seller, a photo and the link. Filters by price, year, mileage, fuel, gearbox and distance; sort by relevance, price, newest, nearest, mileage or age. Promoted listings are dropped by default.","effect":"read","id":"autotrader.co.uk/search-cars","keywords":["auto trader","autotrader","used cars","car for sale","second hand car","buy a car","car search","uk","london","dealer","private seller","price rating"],"output":{"schema":{"properties":{"cars":{"items":{"properties":{"distance_miles":{"type":["number","null"]},"highlight":{"description":"The seller's short attention line","type":["string","null"]},"id":{"type":"string"},"image":{"type":["string","null"]},"location":{"type":["string","null"]},"make_model":{"type":["string","null"]},"mileage":{"type":["integer","null"]},"price_gbp":{"type":["number","null"]},"price_rating":{"description":"Auto Trader's rating, e.g. 'Great price', 'Good price', 'Fair price'","type":["string","null"]},"seller_type":{"enum":["trade","private"],"type":"string"},"sponsored":{"type":"boolean"},"title":{"type":"string"},"url":{"type":"string"},"version":{"type":["string","null"]},"year":{"type":["integer","null"]}},"type":"object"},"type":"array"},"page":{"type":"integer"},"pages":{"type":["integer","null"]},"total":{"type":["integer","null"]}},"required":["total","cars"],"type":"object"},"value":"let $ads = params.include_ads == `true`, $r = steps.search[0] in {total: $r.total || `0`, pages: $r.pages || `null`, page: params.page || `1`, cars: map(&(let $c = @ in let $b = $c.badges || `[]` in let $mi = ($b[?type == 'MILEAGE'] | [0].displayText), $yr = ($b[?type == 'REGISTERED_YEAR'] | [0].displayText), $loc = $c.vehicleLocation || '' in {id: $c.advertId, title: join(' ', [$c.title || '', $c.subTitle || '']), make_model: $c.title || `null`, version: $c.subTitle || `null`, price_gbp: $c.price && to_number(replace(replace($c.price, '£', ''), ',', '')) || `null`, price_rating: ($b[?starts_with(type, 'PI_')] | [0].displayText) || `null`, mileage: $mi && to_number(replace(split($mi, ' ')[0], ',', '')) || `null`, year: $yr && to_number(split($yr, ' ')[0]) || `null`, location: $loc != '' && split($loc, ' (')[0] || `null`, distance_miles: contains($loc, ' mile') && to_number(split(split($loc, '(')[-1], ' ')[0]) || `null`, seller_type: ($c.sellerType == 'PRIVATE' && 'private') || 'trade', highlight: $c.attentionGrabber || `null`, sponsored: $c.type != 'NATURAL_LISTING', image: $c.images[0] && replace($c.images[0], '{resize}', 'w800') || `null`, url: join('', ['https://www.autotrader.co.uk/car-details/', $c.advertId])}), $r.listings[?advertId] || `[]`)[?$ads || !sponsored]}"},"params":{"additionalProperties":false,"properties":{"distance_miles":{"description":"Only with postcode; leave out for national. Auto Trader's radius is approximate (it may include cars a mile further)","enum":[1,5,10,15,20,25,30,35,40,45,50,55,60,70,80,90,100,200],"type":"integer"},"fuel":{"enum":["Petrol","Diesel","Electric","Hybrid – Petrol/Electric","Hybrid – Petrol/Electric Plug-in","Hybrid – Diesel/Electric"],"type":"string"},"include_ads":{"default":false,"description":"Keep promoted and featured listings, marked sponsored","type":"boolean"},"make":{"description":"As Auto Trader names it, e.g. 'Volkswagen', 'Ford', 'BMW', 'Mercedes-Benz'","maxLength":40,"minLength":2,"type":"string"},"max_mileage":{"minimum":1,"type":"integer"},"max_price":{"description":"GBP","minimum":0,"type":"integer"},"min_price":{"minimum":0,"type":"integer"},"model":{"description":"e.g. 'Golf', 'Fiesta', '3 Series'","maxLength":40,"type":"string"},"page":{"default":1,"maximum":50,"minimum":1,"type":"integer"},"postcode":{"description":"UK postcode, e.g. 'SW1A 1AA' (Auto Trader needs one for price filters and distances; with no distance_miles the search is national)","pattern":"^[A-Za-z]{1,2}[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}$","type":"string"},"sort":{"default":"relevance","description":"nearest needs a postcode","enum":["relevance","price_low","price_high","newest","nearest","mileage","year_new"],"type":"string"},"transmission":{"enum":["Manual","Automatic"],"type":"string"},"year_from":{"maximum":2030,"minimum":1950,"type":"integer"}},"required":["make","postcode"],"type":"object"},"provenance":{"method":"browser-inspect","notes":"autotrader.co.uk/car-search is a client-rendered app (/search-results-app). Its bundle sends GraphQL to /at-gateway?opname=<operation> with x-sauron-app-name sauron-search-results-app (from window.AT_SPA_JS_CONFIG; the version header is optional). SearchResultsListingsGridQuery takes filters [{filter, selected}] built from the URL (make, model, postcode, distance, min_price/max_price, min_year_manufactured, max_mileage, fuel_type, transmission, price_search_type total), channel cars, page, sortBy (relevance, price_asc, price_desc, most_recent, distance, mileage, year_dsc) and a searchId string. Listings: type (NATURAL_LISTING; promoted/featured types are paid), advertId, title, subTitle, price text, vehicleLocation 'Place (N miles)', sellerType, badges (PI_* price rating, MILEAGE, REGISTERED_YEAR), images with a {resize} token; page.results.count is the total. robots.txt has no rules for Claude-User or anthropic agents; it disallows search URLs with ?postcode=, ?sort= and similar query parameters for crawlers, which this recipe does not request (it posts to the gateway). A price filter without a postcode answers BAD_REQUEST ('A required filter of type Postcode was not present'), so postcode is required, as on the site. Answers servers. v2 (2026-11-07 22:53): keywords only (bmw, volkswagen, ford removed: they steered unrelated searches here, C1 ranking note).","recorded_at":"2026-11-07T22:31:00+01:00","recorded_by":"C4"},"requires_login":false,"schema":"https://wield.run/schema/recipe/v1.json","site":{"country":"GB","id":"autotrader.co.uk","language":"en","name":"Auto Trader UK","origin":"https://www.autotrader.co.uk","origins":["https://www.autotrader.co.uk"]},"steps":[{"description":"Read-only POST: Auto Trader's own GraphQL gateway (/at-gateway?opname=SearchResultsListingsGridQuery), the search query the results page sends, with a smaller field selection. The one-item foreach turns the params into the page's filter list (sorted by name, as the page sends it) and sort.","expect":{"assert":"body.data.searchResults != `null`","content_type":"json","status":[200]},"extract":{"json":{"listings":"data.searchResults.listings","pages":"data.searchResults.page.count","total":"data.searchResults.page.results.count"}},"foreach":{"as":"f","in":"[{filters: sort_by([{filter: 'make', selected: [params.make]}, params.model && {filter: 'model', selected: [params.model]}, params.postcode && {filter: 'postcode', selected: [upper(trim(params.postcode))]}, params.postcode && params.distance_miles && {filter: 'distance', selected: [to_string(params.distance_miles)]}, params.min_price && {filter: 'min_price', selected: [to_string(params.min_price)]}, params.max_price && {filter: 'max_price', selected: [to_string(params.max_price)]}, params.year_from && {filter: 'min_year_manufactured', selected: [to_string(params.year_from)]}, params.max_mileage && {filter: 'max_mileage', selected: [to_string(params.max_mileage)]}, params.fuel && {filter: 'fuel_type', selected: [params.fuel]}, params.transmission && {filter: 'transmission', selected: [params.transmission]}, {filter: 'price_search_type', selected: ['total']}][?@], &filter), sort: (params.sort == 'price_low' && 'price_asc') || (params.sort == 'price_high' && 'price_desc') || (params.sort == 'newest' && 'most_recent') || (params.sort == 'nearest' && 'distance') || (params.sort == 'mileage' && 'mileage') || (params.sort == 'year_new' && 'year_dsc') || 'relevance'}]","max":1},"id":"search","read_only_post":true,"request":{"body":{"type":"json","value":{"operationName":"SearchResultsListingsGridQuery","query":"query SearchResultsListingsGridQuery($filters: [FilterInput!]!, $channel: Channel!, $page: Int, $sortBy: SearchResultsSort, $listingType: [ListingType!], $searchId: String!) { searchResults(input: {facets: [], filters: $filters, channel: $channel, page: $page, sortBy: $sortBy, listingType: $listingType, searchId: $searchId}) { listings { ... on SearchListing { type advertId title subTitle attentionGrabber price vehicleLocation images sellerType badges { type displayText } } } page { number count results { count } } } }","variables":{"channel":"cars","filters":"{{f.filters}}","listingType":null,"page":"{{params.page}}","searchId":"wield","sortBy":"{{f.sort}}"}}},"headers":{"Accept":"application/json","Content-Type":"application/json","x-sauron-app-name":"sauron-search-results-app"},"method":"POST","query":{"opname":"SearchResultsListingsGridQuery"},"url":"/at-gateway"}}],"task":"Search used cars in the UK on Auto Trader","tos":{"notes":"robots.txt has no AI-agent rules (no Claude-User, ClaudeBot or anthropic-ai group, no Content-Signal), checked 2026-11-07. Terms not reviewed yet for automated access. One person's search: 1 read-only GraphQL request, the one the results page sends. Contacting sellers stays on autotrader.co.uk.","reviewed":false},"verify":{"checks":["length(output.cars) > `10`","output.total > `20`","length(output.cars[?price_gbp > `15000`]) == `0`","length(output.cars[?mileage > `60000`]) == `0`","length(output.cars[?distance_miles > `11`]) == `0`","length(output.cars[?starts_with(url, 'https://www.autotrader.co.uk/car-details/') && make_model == 'Volkswagen Golf']) == length(output.cars)","output.cars[0].price_gbp <= output.cars[-1].price_gbp"],"example_params":{"distance_miles":10,"make":"Volkswagen","max_mileage":60000,"max_price":15000,"model":"Golf","postcode":"SW1A 1AA","sort":"price_low"},"max_ms":5000},"version":2}