{
  "openapi": "3.0.1",
  "info": {
    "title": "Marktplaats & 2dehands Scraper: Listings, Price Drops & Stats",
    "description": "Export Marktplaats.nl, 2dehands.be and 2ememain.be classifieds by category or search words, past the 5,000-result limit: price, price type, city, date, condition, photo, seller type. Track new ads, price drops and removed ads; get median prices per category. No seller names, phones or emails.",
    "version": "0.1",
    "x-build-id": "JBt3sC3IfMqT0tAW4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datasmithlab~marktplaats-2dehands-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datasmithlab-marktplaats-2dehands-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/datasmithlab~marktplaats-2dehands-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datasmithlab-marktplaats-2dehands-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/datasmithlab~marktplaats-2dehands-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datasmithlab-marktplaats-2dehands-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": {
          "portal": {
            "title": "Site",
            "enum": [
              "marktplaats.nl",
              "2dehands.be",
              "2ememain.be"
            ],
            "type": "string",
            "description": "The three sites are one platform. 2ememain.be uses French category names (autos, velos-velomoteurs...).",
            "default": "marktplaats.nl"
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "One per line, as in the site links: 'auto-s', 'auto-s/volkswagen', 'fietsen-en-brommers', 'huizen-en-kamers'. Copy it from https://www.marktplaats.nl/l/<category>/. Searches above the 5,010-ad limit per search are split into sub-categories automatically.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search words",
            "type": "array",
            "description": "Optional keywords such as 'koga' or 'volkswagen golf'. With categories: each category x each word. Without categories: searched on the whole site.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Or paste list page URLs",
            "type": "array",
            "description": "Category or search list pages such as https://www.2dehands.be/l/auto-s/ or https://www.marktplaats.nl/q/fiets/. Filters in the URL are ignored; use the settings below.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max listings",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many listing rows (you pay per row). Market summary rows are not counted.",
            "default": 100
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 167,
            "type": "integer",
            "description": "30 ads per page, at most 167 pages (about 5,000 ads) per search. Leave empty for all pages."
          },
          "priceFrom": {
            "title": "Price from (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Ads without a price (see description, bidding, on request) are left out when a price limit is set."
          },
          "priceTo": {
            "title": "Price to (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Leave empty for no limit."
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Only ads in these cities (name as shown on the site, not case-sensitive), e.g. Utrecht, Gent.",
            "items": {
              "type": "string"
            }
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "all",
              "private",
              "professional"
            ],
            "type": "string",
            "description": "Sellers appear only as Private or Professional: no names, ids, phones or e-mails are collected.",
            "default": "all"
          },
          "listedWithinDays": {
            "title": "Listed within the last days",
            "minimum": 1,
            "type": "integer",
            "description": "1 = today, 2 = today and yesterday, ... Uses the listing date shown on the list page."
          },
          "requirePrice": {
            "title": "Only ads with a price",
            "type": "boolean",
            "description": "Leave out ads that have no price (see description, on request, swap).",
            "default": false
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed listings",
            "type": "boolean",
            "description": "For scheduled runs: each run returns only ads that are NEW, had a PRICE_DROP or PRICE_UP since the last run with the same settings, and (when every search was read completely) REMOVED ads. The first run returns everything as NEW. Unchanged ads are not returned and not charged.",
            "default": false
          },
          "marketSummary": {
            "title": "Market summary by category",
            "type": "boolean",
            "description": "Add one row per site, category and subcategory: ads, median and quartile price, price range, share with price, professional share and ads listed today or yesterday. Uses every matching ad, also unchanged ones in monitoring mode.",
            "default": false
          },
          "splitLargeSearches": {
            "title": "Split large searches",
            "type": "boolean",
            "description": "The sites show at most 167 pages (about 5,000 ads) per search. When a search has more, it is read per sub-category. Turn off to read only the first 5,000. List URLs cannot be sorted or price-filtered, so coverage is reported in HEALTH (splitCoverage).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Requests go out without a proxy first. Only if the site blocks them is this proxy used (at most 3 new IPs, then the run stops and reports it).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}