# OEM Parts Catalogue Scraper (`barking_kelp/mercedes-parts-parser`) Actor

Scrape Mercedes-Benz OEM parts from mercedes-benz.oempartsonline.ca by model year or by catalogue, diagram and part URLs. Get part numbers, MSRP and sale prices (CAD), fitment (model, trim, engine), category, position, descriptions and diagram images. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/barking_kelp/mercedes-parts-parser.md
- **Developed by:** [9839_ser](https://apify.com/barking_kelp) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## OEM parts catalogue — Apify Actor

Rebuilds an OEM parts catalogue for a model year: every catalogue page of that
year, every diagram on every page and every row on every diagram, with each
part's own page merged in, plus the CSV export.

**23 storefronts**, one run can cover any of them: mercedes, gm, ford, mopar,
bmw, audi, subaru, honda, mitsubishi, toyota, mazda, volvo, porsche, nissan,
acura, hyundai, kia, lexus, infiniti, vw, landrover, jaguar and smart. They are
the same shop under 23 names, so the rows read the same; what differs is the
host, the years and makes each one carries, the currency its prices are written
in, and how its catalogue pages are found.

The Actor is `oem-parts-catalogue-scraper`. It was `mercedes-parts-parser` for
as long as there was one store to collect; a run that names no store still
collects `mercedes`, as it always has.

Give it a model year and it collects that year's whole catalogue; give it
links and it collects exactly those. Results arrive as one dataset record per
catalogue row, plus the CSV export, and a run that is interrupted resumes where
it stopped rather than starting the year again.

### How it crawls

```
sitemap.xml ─▶ /vehicles/ sitemaps ─▶ pages with /v-<year>- in the slug
                                          │
                     page ?assembly=1..N  (diagrams walked in order)
                                          │
                     part pages the rows link to (each read once per run)
                                          │
                     one dataset push per page, part page values merged in
```

- **Transport:** the Actor does not open the storefront itself — it hands each
  request to a fetching service chosen with `transport`, and the crawl is plain
  HTTP over curl_cffi. **No browser runs in this Actor.**
- **Merging:** a part page's title, price, position and description replace the
  diagram row's values whenever the part page has a value. If a part page
  fails, the row keeps the diagram's values.

### Transport — who fetches the page

`transport` picks the service that fetches each page. Nothing else about the
crawl changes with it, and no browser runs in this Actor either way.

| `transport` | Who fetches | What it needs |
|---|---|---|
| `unblocker` (default) | Apify Proxy's `UNBLOCKER` group | nothing: the run's own Apify account |
| `apifyProxy` | plain Apify Proxy, the groups in `proxyConfiguration` | nothing |
| `superScraper` | the `apify/super-scraper-api` Actor, over its standby API | `unlockerApiKey` (an Apify token) if the run has none |
| `webFetch` | the `apify/web-fetch` Actor, over its standby API | as above |
| `custom` | any other service you have | `unlockerProxyUrl` for one offered as a proxy, or `unlockerEndpoint` (containing `{url}`) for one offered as an API |

Costs differ per service and are the provider's to state, so size a run before
starting a large one: see **Cost** below.

Two things a fetching service takes away from the crawl, and what replaces them:

- **Redirects**, which it follows itself, so the URL the crawl asked for is not
  always the page it got. `unlockerFinalUrlHeader` names a response header the
  service uses to report where it landed; failing that the page's own
  `<link rel="canonical">` answers.
- **A readable refusal.** A service that fetches on our behalf answers `200`
  whether or not it got the page, so the Actor checks what came back rather
  than the status alone, retries what is not a page, and reports the count in
  `SUMMARY.challenged`. The alternative — storing a non-page as an empty page —
  is the one outcome that is never noticed.

A whole-`year` crawl also reads the storefront's `.xml.gz` sitemaps and
decompresses them itself. A service that re-encodes or decodes bodies on the way
through breaks that; it is **reported** (`SUMMARY.failedSitemaps`, and a run
that collected nothing fails) rather than read as an empty sitemap. Prefer a
proxy-style transport for year mode, or check one sitemap first.

**TLS.** A service that fetches on our behalf has to read the page, so some of
them terminate TLS and serve their own certificate, and verification cannot
succeed through those. That is a property of the service rather than a setting
to remember: each one carries its own default (`unblocker` runs with
verification off and says so in the log; the others keep it on). `tlsVerify`
overrides it either way — with it off, anything on the path can read the
traffic, which is why it is not the blanket default.

### Cost

A run's bill is one fetch per request, so what matters is how many requests a
page costs — and that varies by more than a hundredfold:

| | measured against the live storefront |
|---|---|
| one catalogue page | **2 to 159 requests**: the page, one per further diagram, and one per part page its rows link to (each part read once per run) |
| per stored row | ≈ **1 request** |
| a whole model year | thousands of pages; Mercedes' sitemaps alone list ~412,000 catalogue pages |
| a walked store | three or four requests to reach the first page of a vehicle, then one per section. A vehicle can list 50 to 400 sections, and a make-year has dozens of vehicles |

Neither limit is a cap on requests, and it is worth being exact about that:

- `maxResults` stops the crawl as soon as that many records are stored, which
  is the closest thing to a bill cap — but a page's part pages are fetched
  *before* its rows are stored, so the floor is one page's full cost, up to
  \~160 requests whatever the limit says. It means "at most this many records":
  a run resumed after an interruption can re-store a handful it had stored
  already, and those count against the limit (the CSV export still writes each
  page once, so the export itself is unaffected).
- **Concurrency changes the bill.** Measured: ~1 request per stored row at
  `maxConcurrency` 4, and 2.8 at 32 — because everything in flight when the
  limit closes the crawl is paid for and never stored. A lower concurrency
  costs less per row and takes longer.
- `maxPages` caps **work**, not spend: how many catalogue pages, diagrams and
  part links get scheduled, **per store**. It is counted across resumes, so a
  job that is interrupted and continued does not start the allowance again. It
  does not count walking a store's navigation to find its pages — that is
  discovery, and one page of a walked store takes a few requests to reach — and
  it does not cap the part pages a page's own rows link to, which is where most
  of the requests go.

`SUMMARY.requestsMade` reports what a run actually spent. Measured: all 23
stores asked for one model year, one page of each, cost **461 requests** and
came back with 21 stores' rows (two of them do not carry that year).

### Output

| Where | What |
|---|---|
| default dataset | one item per catalogue row (23 keys, including `store`: the 15 CSV columns plus `recordType`, `store`, `pageUrl`, `pageIndex`, `assembly`, `rowNo`, `partUrl`, `imageUrl`), and one per part asked for by link |
| KV `OUTPUT-<store>.csv` | one CSV per store: BOM, `;`, CRLF, minimal quoting, `-` for empty (but `code` is left empty), pages in the order they were found. A single-store run writes `OUTPUT.csv`, the name it has always had |
| KV `SUMMARY` | pages found/done/failed, rows, part pages read/failed, the first 100 failures, and what the transport ran into: `challenged`, `retried` (for any reason, not only challenges), `gaveUp`, `throttled`, `sitemapsFailed` (a sitemap that could not be read costs every page it lists) `requestsFetched` — every 2xx the transport brought back, so sitemaps, each `?assembly=N` and every part page, not the catalogue-page count `pagesFound`/`pagesDone` report — `requestsMade`, every request made at all, which is what a provider bills against, `pagesGone` (pages the storefront says do not exist: a vehicle it no longer sells answers 200 with the make's model picker, and those are skipped by later runs rather than paid for again) `blocked` (responses the fetching service could not get the page with), `retriedByScrapy` (a timeout or a dropped connection, retried and billed), `pagesSkipped` and `pagesUnfinished` (pages a limit stopped from being scheduled, and pages still in flight when it closed the crawl — for a single run over its whole input, `pagesFound` is the sum of done, failed, gone, skipped and unfinished; a resumed run counts its input again while `pagesDone` carries what earlier runs stored), `unrecordedRecords` (records the dataset held that an interrupted run had not counted), `byStore` (what each store came back with, which is where a store that collected nothing would otherwise hide), `stores`, `skipped` (what was asked for and could not be collected), `yearsWalkedInstead`, `navigationWalked`/`navigationLeft`, `pagesNotCollected` with `pagesNotCollectedUrls` (pages on a template this Actor does not read — see above — which are neither failures nor skipped for good) and `closeReason` |
| KV `CRAWL_STATE` | pages already stored + part pages already read; a migrated or resurrected run resumes from it |

Diagram images are not downloaded. Each row has its `imageUrl` instead.

#### What the columns mean

| column | what it is |
|---|---|
| `year`, `make`, `model` | the vehicle, from the page's heading and its url (`make` is the url's spelling: lower case, hyphenated) |
| `trim`, `engine` | the heading runs them together; the url's engine slug says where to cut |
| `category` | the parts category the page sits in — "Suspension" |
| `brand` | **the section within that category** — "Front Suspension". Not a manufacturer: the storefront prints "Brand: Mercedes-Benz" elsewhere on the page, and this column is not that. The name is the reference export's |
| `title` | what the part is called: its own page's name where that page was read, else the diagram's callout |
| `partnum` | the part number without separators, as the storefront prints it — leading zeros kept, because that is what the catalogue row says |
| `filename` | the file name of the diagram image the row is called out on |
| `code` | the callout number on the diagram. Left **empty** rather than `-` when the diagram gives none |
| `price1`, `price2` | the list price as printed (`MSRP  $56.40 CAD`, two spaces) and the storefront's own price |
| `position` | the side the diagram names for *this* row. A part page lists every side that part is fitted on in any vehicle, and that is used only where the diagram names none |
| `description` | the part's own page where it was read, else the diagram row |

A panel's own badge on the page (`47`, `43`…) counts the illustration's
callouts, not the rows to expect: the page lists the parts offered for *that*
vehicle, and that is what the export carries. Live, a bumper section whose
badges read 47 and 43 lists 29 rows across 17 callouts, and a console section
declaring 164 renders 148 — the difference is in no part of the page (the
part numbers match the rows exactly, the hotspot menus add none, and there is
no pagination inside a panel).

#### What it does not collect

The storefronts have a second parts template: **accessory sections** render a
product grid (cards, `?page=N`) instead of an exploded-view diagram. Those
parts have no callout, no side and no illustration, so three of the export's
columns have no source there, and this Actor does not collect them — it reports
them instead, in `SUMMARY.pagesNotCollected`, rather than calling them a
failure. How much there is depends on the vehicle: a 2026 EQE 320 SUV has 13
such sections (59 products), while a 2026 CLE 53 AMG has none at all. Those
urls are not in the sitemaps, so only a walked store meets them.

**And they cost requests.** A vehicle's sections are walked in the storefront's
own order, which is alphabetical — so the ones beginning `accessories-…` come
first. Measured: a 2026 Subaru tried **66 sections in a row** that were all
grids before any diagram page, and a 2026 Land Rover has nothing but grids
across all three of its vehicles. A page that turns out to be a grid gives its
budget back and the next section is tried with it, so a bounded run gets there
in the end — it just pays a request per grid on the way. If that matters, raise
`maxPages` for those stores or pass the section links you want in `startUrls`.

#### Coverage, measured

A whole-`year` crawl takes its pages from the vehicle sitemaps: 28 of them,
**412,068 catalogue pages**, and the year filter was checked against every one
of those urls across all 31 years it covers — exact, with nothing of a year
missed and nothing of another year included. The sitemaps are not quite the
whole storefront, though: a vehicle's own sidebar can list a few more sections
than the sitemaps carry for it (441 against 427 on one car), so a run that has
to have *every* section of a vehicle should pass those links in `startUrls`.

One page is not one request: a section with 9 diagrams costs 9 page fetches
plus one per part page its rows link to (148 rows there), and the largest
section seen has **54 diagrams**. Verified complete on pages of 1, 3, 4, 5, 6
and 9 diagrams: every diagram, every row, exactly once — 253 rows in one run,
with the dataset, `SUMMARY.rows` and `OUTPUT.csv` agreeing exactly and no
duplicates.

### Input — what to collect

| Mode | Input | Result |
|---|---|---|
| whole model years | `stores` + `years` (+ `makes`) | every catalogue page of those stores and years |
| catalogue pages | `startUrls` | every diagram of each page |
| diagrams | `diagramUrls` | `...?assembly=N` collects only that diagram; a link without `assembly` collects the whole page |
| parts | `partUrls` | one record per part page (`recordType: "part"`): `url`, `partnum`, `title`, `price`, `position`, `description` |

`stores` takes a name, a list or `all`; `years` takes `2026`, `1984-2010`,
`1999,2005-2007` or `all`. Stores do not carry the same years — smart ran
2008–2019, Jaguar's store stops at 2025, Mopar has nothing before 2001 — and a
year or make a store never had is **skipped with a note**, not an error: one
mistake must not take the other 22 stores with it. A misspelled *store* does
stop the run, because otherwise it would quietly collect everything except the
one that was wanted.

#### How the pages are found

Twelve stores list their catalogue pages in their sitemaps; the other eleven
answer with a three-entry index whose children are gone, and their pages are
found by walking the vehicle navigation instead — make → models → vehicles →
sections, exactly as a visitor clicks. Which is which is decided by **looking**
at the store rather than from a list, and a year a store's sitemaps do not reach
(BMW's start at 1996 while its navigation goes further back) is walked too, and
said so in the log and in `SUMMARY.yearsWalkedInstead`.

The walk is a chain, one level at a time per store, and it goes down before it
goes across. That is not a detail: a make of one year on the GM store has dozens
of vehicles and each lists around 380 sections, so a breadth-first walk spends
its first minutes discovering tens of thousands of pages and storing nothing.
What it has found and not yet walked is kept in `CRAWL_STATE`, so an interrupted
run continues the walk instead of starting it again.

If any links are given, no store is crawled. The three kinds of links can
be mixed in one run, and a part page cited by several of them is fetched only
once. Catalogue rows have `recordType: "row"`, and only they go into
`OUTPUT.csv`.

`maxResults` stops the run as soon as that many records are in the dataset:
the last page is cut to fit and the crawl closes right away. Which rows you get
is "whatever finished first", not the first pages in catalogue order — pages are
fetched concurrently, and a limit cuts the run wherever it has got to.
`maxPages` caps how many pages, diagrams and parts get scheduled; in year mode
the vehicle sitemaps are read one at a time and each waits for the pages the
previous one found, so a small limit reads only the first sitemaps. See
`.actor/input_schema.json` for the rest.

The input is prefilled with one link (a one-diagram page) plus `maxPages: 1` and `maxResults: 20`,
so Apify's daily test run (and a first try) finishes in a minute or two.

### Checking the data

There is no reference file to diff the output against, so the storefront is the
only source of truth, and the way to check a parser against a page without
fooling yourself is to read the page a second time through *other* sources:

```bash
.venv/bin/python tools/verify_against_page.py saved_page.html
PROXY=http://user:pass@host:port .venv/bin/python tools/verify_against_page.py <page url>
```

It compares every column of every row against the row's own link title, its
visible callout, the prices as printed, the add-to-cart element's data
attributes and the url's own slug — none of which the parser reads. Last runs:
**23 pages / 353 rows** on the Mercedes store and **19 pages / 355 rows** across
six storefronts, 0 disagreements. It reads the page afresh, so it sees a row
before the part page's values are merged into it — that part is not covered.
`tests/test_live_page.py` pins one real page inside the suite.

### Development

```bash
python3.12 -m venv .venv && .venv/bin/pip install -r requirements.txt pytest
.venv/bin/python -m pytest

## local run: input in storage/key_value_stores/default/INPUT.json
apify run           # or: .venv/bin/python -m src
```

Deploying is a merge: the Actor builds from this repository, so a push to `main`
is what ships. `apify push` is for an Actor that is *not* linked to a repo, and
it takes two care:

- give it the Actor **id** (`apify push <actorId>`). Given a bare `apify push`
  it looks the Actor up by the `name` in `.actor/actor.json`, and if the
  platform's Actor is called something else it creates a second one and builds
  your code into that — leaving the real Actor, with its history, tasks and
  schedules, untouched and behind. The same applies after any rename;
- `--force` is what pushes over an Actor that builds from a Git repository, so
  on this one it would replace the Git source with whatever is on your disk.

The Actor id is stable; its name is not, and nothing redirects an old name.

Layout: `src/` is the Actor entry point (input → transport → settings → crawl →
CSV). `scraper/` holds the crawler: `spiders/catalog.py`, `downloader/`
(the curl_cffi handler and the unlocker providers), `middlewares/`
(`unlocker.py` — the landing URL and whether a response is the page;
`ratelimit.py` — the delay that widens when the storefront asks for less and
narrows again) and `site/` (page and part
parsers, unchanged from the original).

The suite needs no network, no browser and no provider account: every transport
decision is made from settings, and a fake stands in for the curl handler.

Running it locally against your own fake storefront is worth the half hour — it
is how the output formats, the resume and the failure reporting were actually
checked. One wrinkle: Crawlee purges the default storages on start, so a local
resume needs `APIFY_PURGE_ON_START=0`; on the platform the state is kept
anyway.

# Actor input Schema

## `stores` (type: `string`):

Which storefronts to collect: a name, a comma-separated list, or "all" for every one of the 23. Left empty it collects mercedes, as it always has. The names are: mercedes, gm, ford, mopar, bmw, audi, subaru, honda, mitsubishi, toyota, mazda, volvo, porsche, nissan, acura, hyundai, kia, lexus, infiniti, vw, landrover, jaguar, smart.

## `years` (type: `string`):

Which model years: "2026", a range "1984-2010", a mixture "1999,2005-2007", or "all" for every year a store carries. Stores do not all carry the same years, and a year a store never had is skipped with a note rather than failing the run.

## `makes` (type: `string`):

Only these makes, comma-separated -- for the stores that carry several (GM has buick, cadillac, chevrolet and gmc; Ford has ford and lincoln; Mopar has chrysler, dodge, jeep and ram). Empty means every make the store carries that year.

## `discovery` (type: `string`):

Leave this alone unless you have a reason. "Automatic" reads the store's sitemap when it lists catalogue pages and walks its vehicle navigation when it does not -- which is how eleven of the stores have to be collected, and it also covers a year a store's sitemap does not reach. The other two pin it to one method and report instead of switching.

## `startUrls` (type: `array`):

Crawl these catalogue pages, every diagram of each, instead of reading the sitemap. Prefilled with one small page (2026 CLE53 AMG, Suspension → Front Suspension: one diagram) as a quick example — clear it to crawl the whole year.

## `diagramUrls` (type: `array`):

Links to single diagrams, e.g. https://mercedes-benz.oempartsonline.ca/v-2026-.../body--aperture-panel?assembly=2 — only that diagram's rows are collected. A link without ?assembly= collects the whole page.

## `partUrls` (type: `array`):

Links to part pages, e.g. https://mercedes-benz.oempartsonline.ca/oem-parts/mercedes-benz-oil-filter-2761800009 — one record each (recordType "part"): title, price, position, description.

## `maxPages` (type: `integer`):

Stop scheduling new catalogue pages, diagrams and part links for a store after this many, counted across resumes: a run that is interrupted and continued does not start the allowance again. **Per store**, so a run over several of them gets this much of each rather than spending it all on whichever store comes first. Walking a store's navigation to find its pages does not count against it -- that is discovery, and one page of a walked store takes a few requests to reach. It also does not cap the part pages a page's own rows link to, and one page can link to a hundred and fifty of them, so this bounds how much of a catalogue is covered rather than how many requests a run makes. Use Max results for that. 0 = no limit.

## `maxResults` (type: `integer`):

Stop as soon as this many records are in the dataset (catalogue rows plus parts by link); the crawl closes right away. It means "at most this many": records already stored by an interrupted run count towards it, and a resumed run can re-store a few of them. A page's part pages are fetched before its rows are stored, so a small limit still pays for one whole page, and a high Max concurrency pays for everything else in flight when the limit is reached. 0 = no limit.

## `transport` (type: `string`):

Which service fetches each page. This Actor runs no browser in any of them, and nothing else about the crawl changes with the choice. "Apify Unblocker" is a proxy group of Apify's own, billed per successful request. "Apify Proxy" is the plain proxy groups below. "Super Scraper API" and "Web Fetch" are Apify's own Actors, called over their standby API. "Custom" is any other service you have, given as a proxy URL or an endpoint. Each provider states its own price; what a run spends is reported as SUMMARY.requestsMade.

## `unlockerCountry` (type: `string`):

Two-letter country code for the exit IP, e.g. CA for the Canadian storefront. Leave empty to let the provider choose: naming a country shrinks the IP pool and can work worse, not better.

## `unlockerApiKey` (type: `string`):

For "Super Scraper API" and "Web Fetch" (an Apify API token; the run's own APIFY_TOKEN is used when this is empty) or for a custom unlocker's endpoint.

## `unlockerProxyUrl` (type: `string`):

Transport "custom", proxy mode: http://user:pass@host:port of any unlocker sold as a proxy. Takes precedence over the endpoint below.

## `unlockerEndpoint` (type: `string`):

Transport "custom", API mode: the endpoint to call. Put {url} where the target URL goes (it is URL-encoded); without a placeholder the target is added as ?url=... A key given above is sent as "Authorization: Bearer <key>"; a provider that wants it in the query string takes it here instead, which is why this field is secret too.

## `unlockerFinalUrlHeader` (type: `string`):

The response header your unlocker reports the URL it ended up on in, if it documents one. An unlocker follows redirects itself, so this is how the crawl learns about them; without it the page's own <link rel="canonical"> is used.

## `tlsVerify` (type: `boolean`):

Leave unset and the transport decides: a service that terminates TLS to read the page serves its own certificate, so verification cannot succeed through it and is off for those, while a plain proxy or an Apify API endpoint keeps it on. Set this only to override that -- and note that with verification off, anything on the path can read the traffic.

## `proxyConfiguration` (type: `object`):

Used only by the "Apify Proxy" transport; the other transports bring their own. Left as it is, Apify Proxy picks its default group.

## `requestDelay` (type: `integer`):

Seconds to wait between requests. 0 is fine with a fetching service: it brings its own exit IPs, and if the storefront asks for a slower pace the Actor widens this gap on its own and narrows it again afterwards.

## `maxConcurrency` (type: `integer`):

Requests in flight at once. It also sizes the thread pool the curl handler downloads on, so it is capped rather than unbounded.

## `exportCsv` (type: `boolean`):

After the crawl, write OUTPUT.csv (';', BOM, CRLF, sitemap order) to the key-value store.

## `debugLog` (type: `boolean`):

Log every request and transport decision.

## Actor input object example

```json
{
  "stores": "mercedes",
  "years": "2026",
  "discovery": "auto",
  "startUrls": [
    {
      "url": "https://mercedes-benz.oempartsonline.ca/v-2026-mercedes-benz-cle53-amg--4matic--3-0l-l6-electric-gas/suspension--front-suspension"
    }
  ],
  "maxPages": 1,
  "maxResults": 20,
  "transport": "unblocker",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "requestDelay": 0,
  "maxConcurrency": 16,
  "exportCsv": true,
  "debugLog": false
}
```

# Actor output Schema

## `rows` (type: `string`):

Every record the run stored: one per catalogue row (recordType "row") with the 15 CSV columns, the store it came from and the part page's values merged in, plus one per part asked for by link.

## `csv` (type: `string`):

One CSV per store, OUTPUT-<store>.csv -- or OUTPUT.csv when a run collected a single store. The catalogue rows in the reference format (BOM, ';', CRLF), each store's pages in the order they were found.

## `summary` (type: `string`):

What the run did: pages found/done/failed/gone, rows, part pages read/failed, sitemaps failed, the requests made and fetched, what the transport ran into, why the crawl closed, and the first 100 failures of each kind.

# 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 = {
    "stores": "mercedes",
    "years": "2026",
    "startUrls": [
        {
            "url": "https://mercedes-benz.oempartsonline.ca/v-2026-mercedes-benz-cle53-amg--4matic--3-0l-l6-electric-gas/suspension--front-suspension"
        }
    ],
    "maxPages": 1,
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("barking_kelp/mercedes-parts-parser").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 = {
    "stores": "mercedes",
    "years": "2026",
    "startUrls": [{ "url": "https://mercedes-benz.oempartsonline.ca/v-2026-mercedes-benz-cle53-amg--4matic--3-0l-l6-electric-gas/suspension--front-suspension" }],
    "maxPages": 1,
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("barking_kelp/mercedes-parts-parser").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 '{
  "stores": "mercedes",
  "years": "2026",
  "startUrls": [
    {
      "url": "https://mercedes-benz.oempartsonline.ca/v-2026-mercedes-benz-cle53-amg--4matic--3-0l-l6-electric-gas/suspension--front-suspension"
    }
  ],
  "maxPages": 1,
  "maxResults": 20
}' |
apify call barking_kelp/mercedes-parts-parser --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,barking_kelp/mercedes-parts-parser"
        }
    }
}
```

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/TbRKtjbFQAAxeIClK/builds/ks78HtwZVfkB5cHrD/openapi.json
