# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/oreillyauto/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/oreillyauto/find-stores \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/oreillyauto/get-product-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/oreillyauto/get-product-price-availability \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/oreillyauto/get-vehicle-makes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/oreillyauto/get-vehicle-models \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/oreillyauto/get-vehicle-years \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/oreillyauto/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","zip_code":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.