{
  "openapi": "3.0.1",
  "info": {
    "title": "OuedKniss Multi Scraper",
    "description": "Scrape ouedkniss.com, Algeria's largest classifieds marketplace. Five modes cover every common workflow: search by keyword, browse a category, walk the full category menu, fetch a hand-picked list of listing URLs, or pull the sponsored-listing banner the site shows at the top of every page.",
    "version": "0.0",
    "x-build-id": "JahNiRxcgboyCjutH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hamza325~ouedkniss-multi-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hamza325-ouedkniss-multi-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/hamza325~ouedkniss-multi-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hamza325-ouedkniss-multi-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/hamza325~ouedkniss-multi-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hamza325-ouedkniss-multi-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",
        "required": [
          "startMode"
        ],
        "properties": {
          "startMode": {
            "title": "What do you want to scrape?",
            "enum": [
              "search",
              "category",
              "directUrls",
              "categories",
              "topAnnounList",
              "seller",
              "similar"
            ],
            "type": "string",
            "description": "How to drive the scraper. `Search by keyword` and `Browse a category` return organic listings; `Seller listings` returns everything a specific seller — a business store or a personal account — has listed; `Similar products` fetches products similar to a given listing; `Sponsored listings (banner)` returns only the paid banner (different shape, store metadata only); `Category menu (full tree)` walks the site's category menu; `Specific listing URLs` enriches a hand-picked list of listing URLs with the full detail data.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search keyword",
            "type": "string",
            "description": "Used when `What to scrape` = \"Search by keyword\". Free-text query, exactly as OuedKniss's own search box accepts it."
          },
          "categoryUrl": {
            "title": "Category page URL",
            "type": "string",
            "description": "The category page URL, pasted straight from the browser's address bar (e.g. `https://www.ouedkniss.com/automobiles_vehicules/1`). Meaning depends on `What to scrape`: for **Browse a category** it is the category to browse (required); for **Category menu** it is the sub-tree to start the walk from (omit to walk the full menu); for **Sponsored listings** it scopes the banner to that category (omit for the site-wide banner). Ignored in the other modes."
          },
          "sellerUrl": {
            "title": "Seller page URL",
            "type": "string",
            "description": "Used when `What to scrape` = **Seller listings**. The seller whose listings you want — works the same for business stores and personal accounts. Paste the page URL straight from the address bar (e.g. `https://www.ouedkniss.com/store/290/dyalkom/` or `https://www.ouedkniss.com/membre/13412324`) — the URL decides which kind of seller it is. When **Include real phone + email** is on and the seller turns out to be a store, the run also emits one extra row with the store's public contact block (phones, emails, socials, address)."
          },
          "startUrls": {
            "title": "Listing URLs",
            "type": "array",
            "description": "The listing page URLs, pasted straight from the browser's address bar (e.g. `https://www.ouedkniss.com/renault-clio-d57354225`). The single input for the two modes that start from a listing page: **Specific listing URLs** scrapes each URL with the full detail data, and **Similar products** fetches the products similar to each URL (each row records its source listing in `attributes.similarToId`).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after pushing this many listings. Applies in every mode. 0 = no cap.",
            "default": 200
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many API requests that list results. One page = one request (48 items per page for search/category, 24 for the member-profile listing grid). Use 0 for no cap. Ignored in **Category menu** and **Sponsored listings** (those don't paginate).",
            "default": 20
          },
          "maxDepth": {
            "title": "How deep to walk the menu",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Used only by **Category menu** to limit how deep the category tree is walked. Top level = 0. Default 2 keeps the run bounded — recursive walks grow quickly. Raise it to discover deeper branches (OuedKniss's full tree goes ~5 levels, but each extra level multiplies the number of API calls).",
            "default": 2
          },
          "maxRequestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "type": "integer",
            "description": "Rate limit per worker. Anti-bot protection is currently low, but stay polite so the Actor stays viable long-term.",
            "default": 30
          },
          "proxyMaxAttempts": {
            "title": "Proxy fallback attempts",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "When the site blocks the actor's exit IP, the engine tries up to this many proxy IPs in sequence. The first one that returns a non-empty response is reused for the rest of the run. Default 5. Has no effect when running locally — local runs always use direct egress.",
            "default": 5
          },
          "locale": {
            "title": "Language",
            "enum": [
              "ar",
              "fr",
              "en"
            ],
            "type": "string",
            "description": "Which language to fetch field values in. Defaults to French (most listings).",
            "default": "fr"
          },
          "includeContactInfo": {
            "title": "Include real phone + email",
            "type": "boolean",
            "description": "If true, the Actor also retrieves contact info. In **Specific listing URLs** mode it reveals the actual phone number and email that the site hides behind a click on each listing. In every other mode it has no effect — those runs never fetch a surface that carries contact data — and the phone/email arrays stay empty. The Actor prints a warning at startup if this is enabled in a mode where it does nothing.",
            "default": false
          },
          "dedupe": {
            "title": "Skip duplicate listings",
            "type": "boolean",
            "description": "Skip listings whose ID has already been pushed in this run. Duplicates are dropped at the request-queue level too, so re-running the same Actor with the same settings is idempotent.",
            "default": true
          },
          "debugIncludeRaw": {
            "title": "Debug: include raw API response",
            "type": "boolean",
            "description": "If true, each pushed listing includes a `raw` field with the unparsed API response.",
            "default": false
          },
          "filterRegionIds": {
            "title": "Filter by wilaya (region)",
            "type": "array",
            "description": "Filter by wilaya IDs. Discover them by running `Category menu` first, or browse the menu in the site's own category tree. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "filterCityIds": {
            "title": "Filter by commune (city)",
            "type": "array",
            "description": "Filter by commune IDs (more granular than wilaya). Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "filterPriceMin": {
            "title": "Minimum price (DZD)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower price bound, inclusive. Leave empty for no lower bound."
          },
          "filterPriceMax": {
            "title": "Maximum price (DZD)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper price bound, inclusive. Leave empty for no upper bound."
          },
          "filterHasPictures": {
            "title": "Only listings with photos",
            "type": "boolean",
            "description": "Only return listings that include at least one photo.",
            "default": false
          },
          "filterHasPrice": {
            "title": "Only listings with a price",
            "type": "boolean",
            "description": "Only return listings with a numeric price (excludes 'contact for price').",
            "default": false
          },
          "filterExchange": {
            "title": "Only listings that accept trade-in",
            "type": "boolean",
            "description": "Only return listings where the seller accepts trade-in.",
            "default": false
          },
          "filterDelivery": {
            "title": "Only listings with delivery",
            "type": "boolean",
            "description": "Only return listings where the seller offers delivery.",
            "default": false
          },
          "filterOrigin": {
            "title": "Filter by seller type",
            "enum": [
              "",
              "INDIVIDUAL",
              "STORE"
            ],
            "type": "string",
            "description": "Restrict results by whether the seller is a person or a business. **Any** (default) returns both. **Individual sellers only** returns listings posted by personal accounts. **Stores only** returns listings posted by verified stores / shops.",
            "default": ""
          },
          "filterOrderByField": {
            "title": "Sort by",
            "enum": [
              "REFRESHED_AT",
              "CREATED_AT"
            ],
            "type": "string",
            "description": "Sort order applied to search/category results. Price-sort is not supported by the public API.",
            "default": "REFRESHED_AT"
          },
          "filterCount": {
            "title": "Items per page",
            "minimum": 1,
            "maximum": 48,
            "type": "integer",
            "description": "Number of items per page (max 48).",
            "default": 48
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}