# Kijiji Scraper - Search Canada Classifieds (`lulzasaur/kijiji-scraper`) Actor

Scrape Kijiji.ca listings by keyword across all of Canada. Extract title, price (CAD), location, category, posted date, images, seller type (owner/dealer), and listing URL. Perfect for resellers, price monitoring, and Canadian marketplace research.

- **URL**: https://apify.com/lulzasaur/kijiji-scraper.md
- **Developed by:** [lulz bot](https://apify.com/lulzasaur) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Kijiji Scraper - Search Canada Classifieds

Scrape listings from **[Kijiji.ca](https://www.kijiji.ca)** — Canada's largest online classifieds marketplace — by keyword, across all categories and Canada-wide. Great for resellers, arbitrage, price monitoring, and Canadian marketplace research.

### What it does

Give it one or more search terms (e.g. `iphone`, `bike`, `sofa`) and it returns structured listing data pulled straight from Kijiji's search results, with automatic pagination.

### Output fields

| Field | Description |
|-------|-------------|
| `id` | Kijiji listing ID |
| `title` | Listing title |
| `price` | Price as a number (in CAD dollars). `null` for "Please Contact" / swap / free listings |
| `priceType` | `FIXED`, `PLEASE_CONTACT`, `FREE`, `SWAP_TRADE`, etc. |
| `currency` | Always `CAD` |
| `description` | Short listing description snippet |
| `location` | City / region name (e.g. "City of Toronto") |
| `address` | Street/postal address if shown |
| `latitude` / `longitude` | Listing coordinates |
| `categoryId` | Kijiji category ID |
| `postedDate` | Listing activation date (ISO 8601) |
| `adSource` | Ad placement type (e.g. `ORGANIC`, `TOP_AD`) |
| `isTopAd` | Whether it is a promoted "Top Ad" |
| `sellerType` | `owner` or `dealer` (from the "for sale by" attribute) |
| `posterId` / `posterVerified` / `posterRating` | Seller info |
| `imageUrl` | Primary image URL |
| `images` | All image URLs |
| `imageCount` | Number of images |
| `attributes` | Category-specific attributes (brand, condition, etc.) |
| `url` | Direct listing URL |
| `searchQuery` | The query that produced this row |
| `scrapedAt` | Scrape timestamp |

### Input

```json
{
    "searchQueries": ["iphone", "bike"],
    "maxListings": 100
}
```

- **searchQueries** — list of search terms. Each is searched across all categories, Canada-wide.
- **maxListings** — max listings per query (`0` = unlimited; paginates until results run out).
- **proxyConfiguration** — optional; not required for basic use.

### How it works

The scraper reads Kijiji's server-rendered `__NEXT_DATA__` (Apollo GraphQL cache) embedded in each search results page, so no headless browser is needed — it is fast and robust. Results are paginated automatically via Kijiji's `page-N` URL scheme.

### Notes

- Prices are normalized to dollars (Kijiji stores them internally in cents).
- Listings without a fixed price (contact-for-price, free, swap) return `price: null` with the reason in `priceType`.
- Please respect Kijiji's Terms of Service and use scraped data responsibly.

# Actor input Schema

## `searchQueries` (type: `array`):

List of search terms to scrape on Kijiji.ca (e.g., 'iphone', 'bike', 'sofa'). Each query is searched across all categories, Canada-wide, and produces its own set of results.

## `maxListings` (type: `integer`):

Maximum number of listings to scrape per search query. Set to 0 for unlimited (the scraper paginates until results run out or the run deadline). Each Kijiji page returns ~40 listings.

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

Proxy settings. Not required for basic Kijiji scraping but recommended for large-scale runs to avoid rate limiting.

## Actor input object example

```json
{
  "searchQueries": [
    "iphone"
  ],
  "maxListings": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "searchQueries": [
        "iphone"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lulzasaur/kijiji-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 = { "searchQueries": ["iphone"] }

# Run the Actor and wait for it to finish
run = client.actor("lulzasaur/kijiji-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "iphone"
  ]
}' |
apify call lulzasaur/kijiji-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lulzasaur/kijiji-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wgOdxiekmL84Gvj9z/builds/7RUEN90PS3XBNg2HA/openapi.json
