{
  "openapi": "3.0.1",
  "info": {
    "title": "Kijiji Scraper & API: Canada Classifieds, New Ads, Price Drops",
    "description": "Scrape Kijiji.ca listings by keyword, city and category: price, location, condition, car and rental fields. Watch mode returns only new ads and price drops since your last run. No seller personal data. From USD 0.50 per 1,000 listings.",
    "version": "1.0",
    "x-build-id": "NJGuSv4blaqygFkt3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/usefulapi~kijiji-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-usefulapi-kijiji-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/usefulapi~kijiji-scraper/runs": {
      "post": {
        "operationId": "runs-sync-usefulapi-kijiji-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/usefulapi~kijiji-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-usefulapi-kijiji-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "What to search for, one search per line (for example: macbook pro, f-150, 2 bedroom). Each keyword is searched in every location and category below. Leave empty to list a whole category.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "City, region or province names as Kijiji writes them (Calgary, City of Toronto, Edmonton Area, Ville de Montréal, Alberta, Canada) or Kijiji location codes (1700199). Empty = all of Canada. Unknown names stop the run with the closest matches.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Kijiji category names (Cars & Trucks, Laptops, Long Term Rentals, Buy & Sell, Free Stuff...) or codes (174). Empty = all categories. Category pages without a keyword come newest first, which suits watch mode best.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Or Kijiji search URLs",
            "type": "array",
            "description": "Search pages copied from kijiji.ca (they start with kijiji.ca/b-...). Anything after \"?\" (Kijiji's sort and filter settings) is dropped, because Kijiji's robots.txt asks robots not to use those; use the filters below instead.",
            "items": {
              "type": "string"
            }
          },
          "maxListingsPerSearch": {
            "title": "Max rows per search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop a search after this many rows are saved.",
            "default": 100
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Kijiji shows 40 listings a page. In watch mode this is how deep each check reads (25 pages = 1,000 listings).",
            "default": 25
          },
          "watchMode": {
            "title": "Watch mode: only new and changed listings",
            "type": "boolean",
            "description": "Remembers every listing each search returned. Each next run saves only listings that are new or changed price since the last run with the same watch name (changeType new / price_changed, with previousPrice). On newest-first category searches a run stops at the first page with nothing new, so it catches new listings cheaply; turn on \"Full check every run\" for price changes deeper down and for gone listings. Schedule it hourly or daily for alerts. Unchanged listings are read but not saved or billed as rows.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Keeps separate memories for separate watch jobs (for example \"toronto-rentals\"). Same name + same search = compared with the last run.",
            "default": "default"
          },
          "watchFirstRunOutput": {
            "title": "First watch run: save every listing as new",
            "type": "boolean",
            "description": "Off = the first run only learns what is there (pays for pages, saves no rows) and alerts start from the second run.",
            "default": true
          },
          "reportGone": {
            "title": "Report gone listings",
            "type": "boolean",
            "description": "Save a row (changeType gone) for each listing that disappeared since the last run. Only when both runs read the whole search: needs \"Full check every run\" on newest-first searches, and Max pages high enough for the whole search.",
            "default": true
          },
          "includeUnchanged": {
            "title": "Also save unchanged listings",
            "type": "boolean",
            "description": "Save every listing with its changeType (new, price_changed, unchanged). Billed per row like a normal run.",
            "default": false
          },
          "watchFullScan": {
            "title": "Full check every run",
            "type": "boolean",
            "description": "Newest-first category searches normally stop at the first page with nothing new (cheap, catches new listings). Turn this on to read up to Max pages every run: price changes on older listings are caught, and gone listings can be reported once a run reads the whole search.",
            "default": false
          },
          "resetWatch": {
            "title": "Forget what was seen",
            "type": "boolean",
            "description": "Start this watch name from scratch: everything counts as new again.",
            "default": false
          },
          "minPrice": {
            "title": "Min price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep listings at or above this price. Listings without a price (\"Please contact\", swap) are left out when a price filter is set."
          },
          "maxPrice": {
            "title": "Max price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep listings at or below this price. Free listings count as 0."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "owner",
              "business"
            ],
            "type": "string",
            "description": "From Kijiji's \"For sale by\" / \"For rent by\" field.",
            "default": "any"
          },
          "maxAgeDays": {
            "title": "Max age (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Keep listings posted or bumped in the last N days. In newest-first searches the run also stops reading once pages get older."
          },
          "titleMustInclude": {
            "title": "Title must include",
            "type": "array",
            "description": "Keep only listings whose title contains all of these words (case does not matter). Useful because Kijiji's best-match search also returns accessories.",
            "items": {
              "type": "string"
            }
          },
          "excludeWords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Leave out listings whose title or description snippet contains any of these (for example: wanted, broken, parts).",
            "items": {
              "type": "string"
            }
          },
          "includeTopAds": {
            "title": "Include top ads",
            "type": "boolean",
            "description": "Kijiji's paid top ads (often from other cities, repeated on every page). Off by default; when on, the first page's are added once. Never in watch mode.",
            "default": false
          },
          "includeDescription": {
            "title": "Description snippet",
            "type": "boolean",
            "description": "The short description Kijiji shows in results (about 200 characters), with phone numbers and emails removed.",
            "default": true
          },
          "includeAttributes": {
            "title": "All attributes",
            "type": "boolean",
            "description": "Every attribute Kijiji lists for the item, with Kijiji's own labels (condition, brand, payment, amenities...). The main vehicle and rental fields are columns either way.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}