# Oreillyauto — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search O'Reilly Auto Parts inventory by product or vehicle compatibility to find parts, check real-time pricing and availability, and locate nearby stores. Discover the right parts for your specific vehicle year, make, and model with detailed product information and pricing.

**Category:** Automotive | **Website:** [oreillyauto.com/](https://oreillyauto.com/) | **Docs:** [parse.bot/marketplace/94c55707-b8db-442a-80cc-95a2ebc844e1/oreillyauto-com-api](https://parse.bot/marketplace/94c55707-b8db-442a-80cc-95a2ebc844e1/oreillyauto-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### find_stores

Find O'Reilly Auto Parts store locations by city and state. Returns store IDs and their location page URLs. Store IDs can be used with get_product_price_availability.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `city` | string | Yes | City name (e.g. 'Atlanta') |
| `state` | string | Yes | Two-letter state code (e.g. 'GA') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/find_stores \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"city":"<string>","state":"<string>"}'
```

### get_product_details

Retrieve full product detail for a specific product page. Returns name, brand, SKU, images, pricing, and availability. The URL must be a product detail path as found in search result pages (format: /detail/c/<brand-line>/<product-slug>/<line-code-suffix>/<item-number>).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Product detail URL path from search results (e.g. '/detail/c/performance-gold/k-n-engineering-performance-gold-oil-filter/kan1/hp1008') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_product_price_availability

Get price and availability for specific parts at a store. Returns pricing map keyed by lineCode-itemNumber and availability maps keyed by broadleaf product ID. Use lineCodeItemNumber values from search_products or get_product_details results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `parts` | string | Yes | JSON array of parts, each with itemNumber and lineCode keys (e.g. '[{"itemNumber":"HP1008","lineCode":"KAN"}]') |
| `store_id` | string | No | Store ID to check availability at. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/get_product_price_availability \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"parts":"<string>","store_id":"<string>"}'
```

### get_vehicle_makes

Retrieve list of vehicle makes for a given model year. Returns an array of objects with id and name. Use the id value as the make_id input to get_vehicle_models.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `year` | string | Yes | Model year from get_vehicle_years (e.g. '2020') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/get_vehicle_makes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"year":"<string>"}'
```

### get_vehicle_models

Retrieve list of vehicle models for a given year and make. Returns an array of objects with id and name. Use make_id from get_vehicle_makes results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make_id` | string | Yes | Make ID from get_vehicle_makes (e.g. '23076' for Ford) |
| `year` | string | Yes | Model year (e.g. '2020') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/get_vehicle_models \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"make_id":"<string>","year":"<string>"}'
```

### get_vehicle_years

Retrieve list of supported vehicle model years. Returns an array of integers from newest to oldest, used as input to get_vehicle_makes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/get_vehicle_years \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Search for products by keyword. Returns up to 24 product listings per page with names, images, pricing, and store availability at a default store. Results include lineCodeItemNumber for use with the get_product_price_availability endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'alternator', 'brake pads', 'oil filter') |
| `zip_code` | string | No | ZIP code for pricing/availability context. Currently uses a default store regardless of value. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oreillyauto-com-api-94c55707/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","zip_code":"<string>"}'
```
