# Toyota EPC (`making-data-meaningful/toyota-epc`) Actor

Toyota EPC - electronic parts catalog. Find Toyota parts, diagrams, VIN decoder & more.

- **URL**: https://apify.com/making-data-meaningful/toyota-epc.md
- **Developed by:** [Scrape Hub](https://apify.com/making-data-meaningful) (community)
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $79.00 / monthly pass

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Toyota Parts Catalogue API

Query a factory Toyota parts catalogue covering four markets (EU, GR, US, JP) and get the results as an Apify dataset: JSON, CSV, Excel or through the Apify API.

### What you can look up

- **VIN / frame decoding**: which catalogues cover a vehicle (`vin`), build month (`vehicle_build`), serial runs (`vehicle_serials`)
- **Part numbers**: every application across markets (`part_number`), supersession chains and substitutes (`part_number_history`), suffixes, and list prices for Japan (`part_number_price`)
- **Catalogues**: sections, part groups (PNC), exploded drawings with their callouts, variants, frames, notes, new parts, spec codes
- **Search**: unified search (`search`), part names, fitment codes, abbreviations
- **Accessories**: campaigns, items, accessories for a model code

### Endpoints

Set `operation` to the endpoint and put its parameters in `params`. **Required** parameters must be present or the call is rejected with `invalid_input`. `region` is one of `EU`, `GR`, `US`, `JP`; `(q)` means the endpoint takes a free-text `q` query.

#### VIN & vehicle

| Endpoint | Returns | Required params |
|---|---|---|
| `vin` | VIN or frame prefix → catalogues covering the vehicle | `vin` |
| `vehicle_build` | Build month for one chassis + frame number | `chassis`, `frame` |
| `vehicle_serials` | Serial runs recorded for a chassis | `chassis` |
| `vehicle_accessories` | Accessories offered for a model code | `modelCode` |

#### Part numbers

| Endpoint | Returns | Required params |
|---|---|---|
| `part_number` | Everything known about a part number, all markets | `number` |
| `part_number_history` | Supersessions, full replacement chain, substitutes | `number` |
| `part_number_suffixes` | What the two-character suffix selects | `number` |
| `part_number_price` | List price (JP dataset only) | `number` |
| `part` | One catalogue part line with fitment and remarks | `id` |
| `fitment` | Every part carrying a fitment code | `code` |

#### Catalogues

| Endpoint | Returns | Required params |
|---|---|---|
| `catalogs` | Search catalogues by model, chassis or catalogue code | — (q) |
| `catalog` | One vehicle catalogue | `region`, `code` |
| `catalog_sections` | Sections of a catalogue, with cover figures | `region`, `code` |
| `catalog_section` | One section: its part groups and drawings | `region`, `code`, `section` |
| `catalog_group` | Every part line under one part group (PNC) | `region`, `code`, `pnc` |
| `catalog_figures` | Every figure key used by a catalogue | `region`, `code` |
| `catalog_figure` | A drawing with its callouts and the parts they point at | `region`, `code`, `figureKey` |
| `catalog_variants` | Model variants and VIN prefixes covered | `region`, `code` |
| `catalog_frames` | Frame-number ranges covered | `region`, `code` |
| `catalog_group_members` | Catalogue group → model-variant mapping | `region`, `code` |
| `catalog_characteristics` | Attribute legend used by fitment codes | `region`, `code` |
| `catalog_specs` | Raw spec/option codes | `region`, `code` |
| `catalog_notes` | Illustration notes | `region`, `code` |
| `catalog_new_parts` | Most recently introduced parts | `region`, `code` |

#### Models

| Endpoint | Returns | Required params |
|---|---|---|
| `models` | Model families in one market, A–Z | `region` |
| `model` | One model family and its production runs | `region`, `slug` |

#### Search & reference

| Endpoint | Returns | Required params |
|---|---|---|
| `search` | Unified search: VIN, part number, model or part name | — (q) |
| `part_names` | Part groups by name | — (q) |
| `abbreviations` | Abbreviation dictionary | — |
| `regions` | The four market datasets | — |
| `stats` | Every table behind the catalogue, with row counts | — |

#### Accessories

| Endpoint | Returns | Required params |
|---|---|---|
| `accessories` | Accessory campaigns | — |
| `accessory_campaign` | One campaign and its items | `campaign` |
| `accessory_item` | One accessory line | `id` |

Examples:

```json
{ "operation": "catalog_sections", "params": { "region": "EU", "code": "164520" } }
{ "operation": "catalog_group", "params": { "region": "EU", "code": "164520", "pnc": "04465" } }
{ "operation": "search", "params": { "q": "brake pad", "region": "EU" } }
```

### Input

Single call:

```json
{ "operation": "part_number", "params": { "number": "04465-02220", "region": "EU" } }
```

Batch:

```json
{
  "requests": [
    { "operation": "vin", "params": { "vin": "JTDKB20U093512345" } },
    { "operation": "part_number_history", "params": { "number": "04465-02220" } },
    { "operation": "catalog_sections", "params": { "region": "EU", "code": "164520" } }
  ],
  "fetchAllPages": true
}
```

### Example VINs

Decoding matches on the VIN prefix (first 8 characters), so these sample VINs return real catalogues. The serial digits are placeholders.

| VIN | Model | Catalogues |
|---|---|---|
| `VNKKG96330A123456` | Yaris (France-built) | EU |
| `NMTKZ3BX10R123456` | C-HR | EU |
| `SB1K93BE10E123456` | Corolla (UK-built) | EU |
| `JTEBU3FJ00K123456` | Land Cruiser Prado | EU |
| `JTDKN3DU0A0123456` | Prius | US |

```json
{
  "requests": [
    { "operation": "vin", "params": { "vin": "VNKKG96330A123456" } },
    { "operation": "vin", "params": { "vin": "NMTKZ3BX10R123456" } },
    { "operation": "vin", "params": { "vin": "SB1K93BE10E123456" } },
    { "operation": "vin", "params": { "vin": "JTEBU3FJ00K123456" } },
    { "operation": "vin", "params": { "vin": "JTDKN3DU0A0123456" } }
  ]
}
```

### API key

Every call to the catalogue API needs a key, `openapi.json` included, and only over HTTPS. The Actor sends the key in its secret environment variable `TOYOTA_EPC_API_KEY` (Actor → Source → Environment variables, marked **Secret**), or the **API key** input when a caller supplies their own. The key goes in the `X-API-Key` header, never in the URL, and the Actor refuses redirects so the key is never sent anywhere else.

Keys are issued in the site's `/admin` → **API clients**. There a key can also be given an expiry date or limited to certain IP addresses. Apify runs from changing addresses, so leave **Allowed IP addresses** empty for the Actor's key unless it runs through a proxy with a fixed IP.

The run stops at the first call, with a message saying what to fix, when the key is missing, invalid, revoked or expired, not allowed from the run's address, or when the API has locked the address out after repeated invalid keys. Only the per-key rate limit (HTTP 429 `rate_limited`) and server errors are retried.

`params` holds both path parameters (`vin`, `number`, `region`, `code`, …) and query parameters (`region`, `lang`, `q`, `limit`, `offset`).

### Output

Collection endpoints produce one dataset item per row. Single-resource endpoints produce one item. Every item has a `_request` field (operation, params, URL). Failed calls produce an item with `_error` instead of failing the whole run.

### Caveats

These come from the source data:

- The catalogue records which parts fit a vehicle, never how many, so `quantity` is always `null`.
- Prices exist for the Japanese dataset only, in whole yen.
- About 18% of drawing callouts point at standard fasteners and are `"resolved": false`.

### Development

```bash
npm install
TOYOTA_EPC_API_KEY=tepc_… npm run sync   # refresh the endpoint list from openapi.json
TOYOTA_EPC_API_KEY=tepc_… apify run -i '{"operation":"regions"}'
apify push                    # deploy to your Apify account
```

# Actor input Schema

## `operation` (type: `string`):

The API endpoint to call. Fill its path parameters (and any query parameters) in <b>Parameters</b>. Leave empty to use only <b>Batch requests</b>.

## `params` (type: `object`):

Path and query parameters for the endpoint, e.g. <code>{"vin": "JTDKB20U093512345"}</code> for <code>vin</code>, or <code>{"number": "04465-02220", "region": "EU"}</code> for <code>part\_number</code>. Common query parameters: <code>region</code> (EU, GR, US, JP), <code>lang</code>, <code>q</code>.

## `requests` (type: `array`):

Several calls in one run, each <code>{"operation": "…", "params": {…}}</code>. Run after the single endpoint above, if one is set.

## `fetchAllPages` (type: `boolean`):

For collection endpoints, follow <code>links.next</code> until the collection is exhausted or <b>Max items per request</b> is reached.

## `maxItemsPerRequest` (type: `integer`):

Stop paging a collection after this many items.

## `requestsPerMinute` (type: `integer`):

Throttle. The API allows 120 per minute per client.

## `apiKey` (type: `string`):

Key for the catalogue API, sent as <code>X-API-Key</code> over HTTPS. <b>Required</b>: every API call needs one. Leave empty to use the key configured on the Actor (secret environment variable <code>TOYOTA\_EPC\_API\_KEY</code>).

## `baseUrl` (type: `string`):

Where the API is served. Must be <code>https://</code>; the API refuses plain HTTP.

## Actor input object example

```json
{
  "operation": "part_number",
  "params": {
    "number": "04465-02220",
    "region": "EU"
  },
  "fetchAllPages": false,
  "maxItemsPerRequest": 1000,
  "requestsPerMinute": 100,
  "baseUrl": "https://toyota-epc.aftermarketcatalog.com"
}
```

# Actor output Schema

## `results` (type: `string`):

All items: catalogue rows, each tagged with the request that produced it, plus one `_error` item per failed call.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "operation": "part_number",
    "params": {
        "number": "04465-02220",
        "region": "EU"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("making-data-meaningful/toyota-epc").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "operation": "part_number",
    "params": {
        "number": "04465-02220",
        "region": "EU",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("making-data-meaningful/toyota-epc").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "operation": "part_number",
  "params": {
    "number": "04465-02220",
    "region": "EU"
  }
}' |
apify call making-data-meaningful/toyota-epc --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,making-data-meaningful/toyota-epc"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vbadV2hqhfqhMZuk7/builds/cdZwI8PlRN9rr8Pii/openapi.json
