{
  "openapi": "3.0.1",
  "info": {
    "title": "Kijiji Real-Time Data — Canada Classifieds & Resale Scraper",
    "description": "Live Kijiji data for vintage & thrift resellers: keyword + location search tasks, full listing details, seller inventory & profiles, sold comps, and any-URL scraping. Freshness, seller-type, and photo tags on every row — predictable volume, real-time webhooks, pay per result.",
    "version": "0.0",
    "x-build-id": "4fVXezlDhns8qP3ET"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/b2b_leads~Kijiji-Real-Time-Data-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-b2b_leads-Kijiji-Real-Time-Data-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/b2b_leads~Kijiji-Real-Time-Data-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-b2b_leads-Kijiji-Real-Time-Data-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/b2b_leads~Kijiji-Real-Time-Data-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-b2b_leads-Kijiji-Real-Time-Data-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": {
          "enableListingSearch": {
            "title": "Listing Search",
            "type": "boolean",
            "description": "Live keyword search across Kijiji — thrift brands, streetwear, and vintage finds. On by default and prefilled so you can click Start and get results in seconds.",
            "default": true
          },
          "searchTasks": {
            "title": "Search tasks",
            "type": "array",
            "description": "Add one row per search. Pair a keyword with an optional city/region/province and category — like searching Kijiji with a location picked on a map.",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "title": "Keyword",
                  "type": "string",
                  "description": "Search term (e.g. \"carhartt detroit jacket\", \"vintage 90s levis 501\", \"patagonia fleece\").",
                  "editor": "textfield"
                },
                "location": {
                  "title": "Location",
                  "type": "string",
                  "description": "Optional city, region, or province for this search (e.g. \"City of Toronto\", \"Toronto (GTA)\", \"Ontario\", \"Vancouver\"). Leave empty for all of Canada.",
                  "editor": "textfield"
                },
                "category": {
                  "title": "Category",
                  "type": "string",
                  "description": "Optional catalog category for this search (e.g. \"Clothing\", \"men's shoes\", \"Jewellery & Watches\", or a category id like 274). Leave empty for all categories.",
                  "editor": "textfield"
                },
                "maxResults": {
                  "title": "Max results",
                  "type": "integer",
                  "description": "Maximum listings for this task (1–200). Uses the default below if omitted.",
                  "minimum": 1,
                  "maximum": 200,
                  "editor": "number"
                }
              },
              "required": [
                "keyword"
              ]
            }
          },
          "searchMaxResults": {
            "title": "Default max results per task",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Default maximum listings per search task (1–200); override per task in the list. Default 10 — perfect for instant demo runs. This — not filtering — is what sets your run volume.",
            "default": 10
          },
          "searchCategories": {
            "title": "Category scope for all tasks (optional)",
            "type": "array",
            "description": "Advanced: scope every keyword to catalog categories, with multiple selections searched one after another (any-of). Use plain names (\"Clothing\", \"Men's Shoes\") or numeric ids (e.g. 274). Prefer the per-task Category column above — this applies to every task.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchLocations": {
            "title": "Location for all tasks (optional)",
            "type": "array",
            "description": "Advanced: search these places for every keyword — city/region/province names or numeric location ids (e.g. \"City of Toronto\", \"Ontario\"). Multiple locations are searched one after another. Prefer the per-task Location column above — this applies to every task.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchSort": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "newest",
              "price_low_to_high",
              "price_high_to_low"
            ],
            "type": "string",
            "description": "How to order search results. \"Just listed\" is ideal for deal alerts on fresh inventory.",
            "default": "relevance"
          },
          "searchMinPrice": {
            "title": "Min price (optional)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Minimum listing price in CAD."
          },
          "searchMaxPrice": {
            "title": "Max price (optional)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum listing price — pair with \"Just listed\" sort to catch underpriced steals fast."
          },
          "searchPriceType": {
            "title": "Price type",
            "enum": [
              "",
              "fixed",
              "contact",
              "give_away",
              "swap_trade"
            ],
            "type": "string",
            "description": "Filter by how the item is priced.",
            "default": ""
          },
          "searchFetchFullDetails": {
            "title": "Enrich with full listing details",
            "type": "boolean",
            "description": "When on, each search result stays ONE row (featureType listing_search, detailsFetched=true) but is enriched with the full description, attribute specifics, full image gallery, and view counts. Adds a little extra time per listing. When off, you get fast search cards with price, title, image, location, and seller. Every discovered item is always saved — never filtered out.",
            "default": false
          },
          "newlyListedOnly": {
            "title": "Alert mode (newest first)",
            "type": "boolean",
            "description": "Deal-bot mode: results are sorted newest-first and every listing is saved with freshness tags — nothing is filtered out, so run volume stays exactly what you set. Each row carries is_newly_listed (posted within the freshness window) and posted_age_days, so you can filter for fresh inventory downstream. Combine with a webhook URL for real-time deal alerts.",
            "default": false
          },
          "searchMaxAgeDays": {
            "title": "Freshness window (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Listings posted within this many days (1–30) are flagged is_newly_listed on every row. Nothing is removed — it is a tag, not a filter. Default 7.",
            "default": 7
          },
          "searchKeywords": {
            "title": "Search keywords (alternative)",
            "type": "array",
            "description": "Simple alternative to the task list above: plain keywords searched everywhere with no per-task location/category. Only used when the Search tasks list is empty.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enableListingDetails": {
            "title": "Listing Details",
            "type": "boolean",
            "description": "Fetch the full record for specific Kijiji listings by URL or listing ID.",
            "default": false
          },
          "listingIds": {
            "title": "Listing IDs (optional)",
            "type": "array",
            "description": "Kijiji listing IDs — the long number at the end of a listing URL, e.g. 1737865031.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Listing URLs (optional)",
            "type": "array",
            "description": "Full Kijiji listing URLs (https://www.kijiji.ca/v-...).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "enableClosetListings": {
            "title": "Seller Inventory",
            "type": "boolean",
            "description": "Collect the full active inventory of any seller — track competitor stock and repricing moves.",
            "default": false
          },
          "sellerUsernames": {
            "title": "Seller IDs",
            "type": "array",
            "description": "Kijiji seller (poster) IDs — the long number in a seller profile URL (kijiji.ca/o-profile/1015260943/... → 1015260943). Shared by Seller Inventory, Seller Profile, and Sold Comps.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sellerMaxListings": {
            "title": "Max listings per seller",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum active listings to collect per seller (1–500).",
            "default": 30
          },
          "enableSellerProfile": {
            "title": "Seller Profile",
            "type": "boolean",
            "description": "Extract reseller stats: display name, seller type, active inventory size, verification, responsiveness, member since, and review summary.",
            "default": false
          },
          "enableSoldHistory": {
            "title": "Sold Item Comps / History",
            "type": "boolean",
            "description": "Collect the seller's ended and removed listings alongside active ones — the closest available sold-comp signal for pricing and sell-through analysis.",
            "default": false
          },
          "soldMaxItems": {
            "title": "Max items per seller",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum listings to collect per seller for comps (1–500).",
            "default": 30
          },
          "enableScrapeByUrl": {
            "title": "Scrape By URL",
            "type": "boolean",
            "description": "Paste any Kijiji URL — search results, category page, seller profile, or single listing.",
            "default": false
          },
          "scrapeUrls": {
            "title": "Kijiji URLs",
            "type": "array",
            "description": "Any Kijiji search, category, seller, or listing URL.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Every record is always saved to the run dataset — this webhook is an ADDITIONAL real-time push. Each new row is also POSTed to this URL (Slack, Discord, Zapier, Make, n8n, custom pricing bot).",
            "default": ""
          },
          "webhookFormat": {
            "title": "Webhook format",
            "enum": [
              "json",
              "slack"
            ],
            "type": "string",
            "description": "json = full record object; slack = Slack-friendly message payload.",
            "default": "json"
          },
          "proxyConfiguration": {
            "title": "Proxy settings",
            "type": "object",
            "description": "Residential proxy recommended. Canadian residential exit addresses deliver the most reliable results at scale.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "CA"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}