# LesPAC Scraper — Quebec Classified Ads (`ocrad/lespac-scraper`) Actor

Scrape LesPAC.com Quebec classified ads from any category, city or search URL: title, price, category, city, region, posting date, description, photos, seller type and attributes. Fast, no browser. Export JSON/CSV/Excel.

- **URL**: https://apify.com/ocrad/lespac-scraper.md
- **Developed by:** [Ocrad](https://apify.com/ocrad) (community)
- **Categories:** E-commerce, Automation, Agents
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 records

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

### LesPAC Scraper

***

Quebec Classified Ads Provide any LesPAC.com category, city or search URL and get structured classified-ad data across result pages — furniture, vehicles, real estate, pets, jobs, services and every other category.

***

#### **📋 Example Output**

```json
{
  "id": "227413809",
  "url": "https://www.lespac.com/montreal/centre-sud/centre-ville/ameublement-electromenagers/duo-laveuse-secheuse-samsung-frontales-superposables_227413809D0.jsa",
  "title": "Duo laveuse-sécheuse Samsung (frontales / superposables)",
  "price": 550,
  "currency": "CAD",
  "priceLabel": "550 $",
  "priceNote": "Négociable",
  "category": "Furniture - Home Appliances",
  "categoryCode": "AMEUBLEMENT_ELECTROMENAGERS",
  "city": "Montréal / Centre-Sud / Centre-Ville",
  "region": "Montréal",
  "postedAt": "2026-10-25T06:08:49.000Z",
  "publishedSince": "Parue depuis 3 jours",
  "description": "Ensemble en très bon état et très propre. Peut s'installer côte à côte (frontales) ou une sur l'autre (superposables). Marque : Samsung (2021) Laveuse (Modèle WF45T6000AW) : 27\" L x 31 3/8\" P x 38 3/4\" H (Capacité : 5,2 pi³) Sécheuse (Modèle DVE45T6005W) : 27\" L x 30 1/4\" P x 38 3/4\" H (Capacité : 7,5 pi³) Prix pour les deux ensembles. Pas de",
  "imageUrl": "https://cdn.lespac.com/binary/zoomedGallery/3200136070.jpg",
  "imageCount": 5,
  "condition": "USED",
  "sellerType": "INDIVIDUAL",
  "sellerName": "Sara Fournier",
  "isPinned": false,
  "attributes": null,
  "scrapedAt": "2026-10-28T19:57:49.771Z"
}
```

With `detailedInfo: true` each ad page is visited and the record also carries the **full description**, the attribute table as a JSON string (`attributes`, e.g. `{"Type de meuble":"Sofa-lit","Année":"2022","Couleurs":"Black"}`), `conditionLabel` (Usagé / Neuf), `offerType` (Offre de particulier / commerçant), `sellerSince` and `year`.

#### ⚙️ **Configuration**

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `url` | String | *(required)* | LesPAC category, city or search URL, e.g. `https://www.lespac.com/montreal/ameublement_b2g17567k1R2.jsa`. The URL must end with the site's search token (`…k1R2.jsa`); English `/en/` URLs work too. |
| `maxItems` | Integer | `100` | Maximum number of ads to return (0 = everything the site exposes, up to 100 pages × 20 ads). |
| `detailedInfo` | Boolean | `false` | Visit each ad page for the full description, attributes and seller details (one extra request per ad). |
| `proxyConfiguration` | Object | Apify Proxy (auto) | Proxy settings; switch to RESIDENTIAL only if results are empty. |

##### Example Input

```json
{
  "url": "https://www.lespac.com/montreal/ameublement_b2g17567k1R2.jsa",
  "maxItems": 100,
  "detailedInfo": false
}
```

##### Getting your category or search URL

1. Open LesPAC.com, pick a category (or a city, or type a search) and apply any filters (price, condition, sub-category …)
2. Copy the full URL from your browser address bar — it ends with a token such as `_b2g17567k1R2.jsa`
3. Paste it as the `url` input. Pages are read in order (the `k1` part of the token is the page number) until `maxItems` is reached.

Results are sorted the way the site sorts them (distance from the chosen city by default); pinned ads that the site repeats on every page are returned only once.

***

#### 💬 **Support and Feedback**

Reach out via Apify support channels or leave feedback on the Actor's page.

#### **Is it legal to scrape LesPAC data?**

It is legal to scrape publicly available data such as prices, titles, and listing details. Results may contain personal data (e.g. seller names); scrape personal data only with a legitimate reason. Personal data is protected by Quebec's Law 25, PIPEDA and other regulations — consult your legal advisor if unsure.

# Actor input Schema

## `url` (type: `string`):

A LesPAC.com category, city or search results URL (it ends with a token such as \_b2g17567k1R2.jsa), e.g. https://www.lespac.com/montreal/ameublement_b2g17567k1R2.jsa. Open lespac.com, choose a category, city or search, then copy the address bar.

## `maxItems` (type: `integer`):

Maximum number of ads to return (0 = everything the site exposes, up to 100 pages of 20). Pages are read one after another until the limit is reached.

## `detailedInfo` (type: `boolean`):

Visit each ad page for the full description, the attribute table (Caractéristiques), seller name, member-since date and condition labels. One extra request per ad.

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

Defaults to Apify Proxy (auto). Switch to RESIDENTIAL only if results are empty.

## Actor input object example

```json
{
  "url": "https://www.lespac.com/montreal/ameublement_b2g17567k1R2.jsa",
  "maxItems": 40,
  "detailedInfo": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `id` (type: `string`):

LesPAC ad ID

## `url` (type: `string`):

Ad page URL

## `title` (type: `string`):

Ad title

## `price` (type: `string`):

Asking price as a number

## `currency` (type: `string`):

Always CAD

## `priceLabel` (type: `string`):

Price as displayed (e.g. 6 000 $)

## `priceNote` (type: `string`):

Price note (e.g. Négociable)

## `category` (type: `string`):

Category label

## `categoryCode` (type: `string`):

Category code (e.g. AMEUBLEMENT_MOBILIER_MAISON)

## `city` (type: `string`):

City / district

## `region` (type: `string`):

Quebec region

## `postedAt` (type: `string`):

Publication date (ISO 8601)

## `publishedSince` (type: `string`):

Publication age as displayed (e.g. Parue depuis 3 jours)

## `description` (type: `string`):

Ad description (snippet on list pages, full text in detailed mode)

## `imageUrl` (type: `string`):

Main image URL

## `imageCount` (type: `string`):

Number of photos

## `condition` (type: `string`):

Item condition code (NEW / USED)

## `sellerType` (type: `string`):

Advertiser type (INDIVIDUAL / DEALER …)

## `sellerName` (type: `string`):

Advertiser display name

## `isPinned` (type: `string`):

True when the ad is a paid pinned placement

## `attributes` (type: `string`):

Attribute table as a JSON string (detailed mode)

## `scrapedAt` (type: `string`):

ISO 8601 timestamp when the record was scraped

# 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 = {
    "url": "https://www.lespac.com/montreal/ameublement_b2g17567k1R2.jsa",
    "maxItems": 40,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ocrad/lespac-scraper").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 = {
    "url": "https://www.lespac.com/montreal/ameublement_b2g17567k1R2.jsa",
    "maxItems": 40,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("ocrad/lespac-scraper").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 '{
  "url": "https://www.lespac.com/montreal/ameublement_b2g17567k1R2.jsa",
  "maxItems": 40,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call ocrad/lespac-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ocrad/lespac-scraper"
        }
    }
}
```

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/K2UfQNc4UL6d2uxbD/builds/rhRr6yMrrHrhWIJHE/openapi.json
