{
  "openapi": "3.0.1",
  "info": {
    "title": "Marktplaats Scraper & API: Export Ads, Prices, Sellers",
    "description": "Scrape Marktplaats and 2dehands.be without login: search by keyword, category, postcode, price and date, or paste search URLs. Price, photos, place, seller, optional full ad page with views and phone. Tens of thousands of ads per run. JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "5lfYyphmTYBkWLIz3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~marktplaats-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-marktplaats-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/s_actors~marktplaats-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-marktplaats-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/s_actors~marktplaats-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-marktplaats-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": {
          "country": {
            "title": "Site",
            "enum": [
              "nl",
              "be"
            ],
            "type": "string",
            "description": "Which site to search with the keywords below: Marktplaats (Netherlands) or 2dehands / 2ememain (Belgium, the same ads in Dutch and French). URLs you paste always use their own site.",
            "default": "nl"
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "What to search: any words you would type in the search box, in Dutch or English. One search per keyword. Leave empty to take every ad of the category below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Search or category pages copied from your browser with the filters already set (for example https://www.marktplaats.nl/l/fietsen-en-brommers/elektrische-fietsen/q/gazelle/#PriceCentsFrom:50000). The keyword, the category, the price, place and sort order filters of the page are kept.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Ads per search or URL",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum ads for each keyword and each URL. The site shows at most 5 000 ads per search, so above that the Actor cuts the search into slices (category, sub-category, price band) and joins them: ads come in slice order, not in one global order.",
            "default": 100
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "1",
              "31",
              "91",
              "2600",
              "48",
              "201",
              "289",
              "1744",
              "322",
              "378",
              "1098",
              "395",
              "239",
              "445",
              "1099",
              "504",
              "1032",
              "565",
              "621",
              "1776",
              "678",
              "728",
              "1784",
              "1826",
              "356",
              "784",
              "820",
              "1984",
              "1847",
              "167",
              "856",
              "895",
              "976",
              "537",
              "1085",
              "428"
            ],
            "type": "string",
            "description": "Only this top category (all ads of it when there is no keyword). Empty = every category.",
            "default": "all"
          },
          "subcategoryId": {
            "title": "Sub-category ID",
            "type": "string",
            "description": "Only this sub-category, a number such as 451 = Elektrische fietsen (the parent category is found automatically). The easy way: open the sub-category on the site and paste its URL in \"Search URLs\"."
          },
          "postcode": {
            "title": "Postcode",
            "type": "string",
            "description": "Only ads near this postcode (1012AB in the Netherlands, 9000 in Belgium), within the radius below. Empty = the whole country."
          },
          "radiusKm": {
            "title": "Radius around the postcode (km)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Distance from the postcode. 0 = 5 km.",
            "default": 0
          },
          "priceFrom": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Only ads priced at or above this amount."
          },
          "priceTo": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Only ads priced at or below this amount."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New or used items only (categories that have a condition).",
            "default": "all"
          },
          "postedWithin": {
            "title": "Posted within",
            "enum": [
              "any",
              "today",
              "yesterday",
              "week"
            ],
            "type": "string",
            "description": "Only ads posted today, since yesterday or in the last week.",
            "default": "any"
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "newest",
              "relevance",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Newest first, best match, or by price. Newest first reaches the most ads per search; with best match the site returns fewer (about 2 000).",
            "default": "newest"
          },
          "includeDetails": {
            "title": "Add the full ad page",
            "type": "boolean",
            "description": "Open every ad page and add the full description, views, favourites, the time the ad was first posted, seller type, seller phone (when shown), highest bid and all photos. Charged as the \"Ad page\" event on top of each ad.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new ads",
            "type": "boolean",
            "description": "Output only ads that were not returned for the same search in the previous runs with the same monitor name (sorted by newest, up to 5 000 per search). Schedule the Actor to get new ads every hour.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps the memory of seen ads apart for different schedules."
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every request retry.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}