O'Reilly Auto Parts Filtering API
Our O'Reilly Auto Parts Filtering API filters the results (e.g. by brand or availability) with facet. To get the filters of a search and the values to use, set include_filters to true.
The API endpoint is https://serpapi.com/search?engine=oreilly_auto_parts
Head to the playground for a live and interactive demo.
API parameters
facet
Optional
Parameter defines the filters to apply (e.g., brands, categories, availability, or the attributes of the parts). It's a list of filters separated by || (e.g., Brands:Bosch||Availability:STORE_PICKUP). Filters are available in filters[].options[].facet of the results when include_filters is set to true.
API examples
Example results for q: brake pads and include_filters: true
Each option of the filters has the facet to pass to facet, and the serpapi_link that adds it to the applied filters.
Searches matching a category (e.g. brake pads) also have the filters of the attributes of the parts in the category, whose facet starts with /attributes/.
{
...
"filters": [
{
"name": "Availability",
"options": [
{
"name": "Ship to Home",
"facet": "Availability:HOME_DELIVERY",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=Availability%3AHOME_DELIVERY&include_filters=true&q=brake+pads&store_id=135"
},
{
"name": "Pick Up in Store",
"facet": "Availability:STORE_PICKUP",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=Availability%3ASTORE_PICKUP&include_filters=true&q=brake+pads&store_id=135"
}
]
},
{
"name": "Brands",
"options": [
{
"name": "ACDelco",
"facet": "Brands:ACDelco",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=Brands%3AACDelco&include_filters=true&q=brake+pads&store_id=135"
},
{
"name": "ACDelco Gold (Professional)",
"facet": "Brands:ACDelco_Gold (Professional)",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=Brands%3AACDelco_Gold+%28Professional%29&include_filters=true&q=brake+pads&store_id=135"
},
...
]
},
{
"name": "Brake Pad Material",
"options": [
{
"name": "Carbon Fiber Ceramic",
"facet": "/attributes/prodAttr_32769:1379322",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=%2Fattributes%2FprodAttr_32769%3A1379322&include_filters=true&q=brake+pads&store_id=135"
},
{
"name": "Ceramic",
"facet": "/attributes/prodAttr_32769:104088",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=%2Fattributes%2FprodAttr_32769%3A104088&include_filters=true&q=brake+pads&store_id=135"
},
...
]
},
...
]
...
}
Example results for q: brake pads, facet: /attributes/prodAttr_32769:104088||Brands:Wagner_ThermoQuiet, and include_filters: true
This example gets the ceramic brake pads (/attributes/prodAttr_32769:104088) of the Wagner ThermoQuiet brand (Brands:Wagner_ThermoQuiet).
The applied filters are in applied_filters, each with the serpapi_link that removes it. Searches whose filters no part matches have no results.
{
...
"search_parameters": {
"engine": "oreilly_auto_parts",
"q": "brake pads",
"store_id": "135",
"facet": "/attributes/prodAttr_32769:104088||Brands:Wagner_ThermoQuiet",
"include_filters": true
},
"applied_filters": [
{
"name": "Brands",
"value": "Wagner ThermoQuiet",
"facet": "Brands:Wagner_ThermoQuiet",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=%2Fattributes%2FprodAttr_32769%3A104088&include_filters=true&q=brake+pads&store_id=135"
},
{
"name": "Brake Pad Material",
"value": "Ceramic",
"facet": "/attributes/prodAttr_32769:104088",
"serpapi_link": "https://serpapi.com/search.json?engine=oreilly_auto_parts&facet=Brands%3AWagner_ThermoQuiet&include_filters=true&q=brake+pads&store_id=135"
}
]
...
}