{
  "openapi": "3.0.1",
  "info": {
    "title": "Marktplaats + 2dehands + 2ememain Scraper",
    "description": "Marktplaats, 2dehands and 2ememain listings in one Actor: prices, attributes and business sellers, with new-listing and price-change monitoring. Private sellers are not identified. $0.75 per 1,000 listings.",
    "version": "0.1",
    "x-build-id": "PFhHz8ItQmbOah3be"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goobertje~marktplaats-2dehands-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goobertje-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/goobertje~marktplaats-2dehands-scraper/runs": {
      "post": {
        "operationId": "runs-sync-goobertje-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/goobertje~marktplaats-2dehands-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-goobertje-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": {
          "sites": {
            "title": "Sites",
            "type": "array",
            "description": "Which sites a keyword or category search runs on: Marktplaats (Netherlands), 2dehands (Belgium, Dutch) and 2ememain (Belgium, French). 2dehands and 2ememain show the same Belgian listings in two languages, and each listing is delivered once. Start URLs ignore this setting and use their own site. Default: Marktplaats and 2dehands.",
            "items": {
              "type": "string",
              "enum": [
                "marktplaats.nl",
                "2dehands.be",
                "2ememain.be"
              ],
              "enumTitles": [
                "Marktplaats (Netherlands)",
                "2dehands (Belgium, Dutch)",
                "2ememain (Belgium, French)"
              ]
            },
            "default": [
              "marktplaats.nl",
              "2dehands.be"
            ]
          },
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Search term, for example \"racefiets\". Leave empty to search a whole category (set a category ID) or to use only start URLs. A search needs a keyword, a category ID or a start URL."
          },
          "categoryId": {
            "title": "Category ID (top level)",
            "minimum": 1,
            "type": "integer",
            "description": "Top-level category id, the same on all three sites. Examples: 91 = Cars, 445 = Bicycles and mopeds, 31 = Audio, TV and photo, 504 = Home and furnishing. Leave empty to search by keyword only. Sub-categories are not supported."
          },
          "minPriceEur": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Only listings with a numeric price of at least this amount, in euros, for example 100. Leave empty for no lower limit. Must not be higher than the maximum price. Listings without a numeric price (bidding only, on request) are left out when a price range is set."
          },
          "maxPriceEur": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Only listings with a numeric price of at most this amount, in euros, for example 500. Leave empty for no upper limit."
          },
          "postcode": {
            "title": "Postcode",
            "type": "string",
            "description": "Search around this postcode (for example 1011AB in the Netherlands or 9000 in Belgium). Leave empty for no location filter. Must be given together with a distance: a postcode alone does not filter."
          },
          "distanceMeters": {
            "title": "Distance around postcode (meters)",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Radius around the postcode in meters, between 1 and 200000, for example 5000 for 5 km. Leave empty for no location filter. Must be given together with a postcode."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "auto",
              "newest",
              "relevance",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order within each search. Auto (default) = newest first, except that Seller type 'business_only' uses relevance order, because the sites only return a seller's website in relevance order and without it most business sellers are not recognized. Big searches are read in price bands, lowest band first, and this order applies inside each band. If you pick 'newest' or a price order together with 'business_only', your choice is used and the run log warns that far fewer business sellers will be found.",
            "default": "auto"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "business_only",
              "private_only"
            ],
            "type": "string",
            "description": "business_only = only listings from sellers recognized as businesses (a website or a verified account; in a 360-listing test sample this recognized about 70% of business sellers on Marktplaats and 76% on 2dehands, and the rest look private and are treated as private). private_only = only the rest, always without any seller identity. all = everything. Default: all. This is a filter; the dataset field sellerType is the resulting classification. With business_only the Sort order 'auto' uses relevance order automatically, because in newest-first order the sites do not return seller websites and most businesses are not recognized.",
            "default": "all"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste search URLs straight from your browser (marktplaats.nl, 2dehands.be or 2ememain.be), for example https://www.marktplaats.nl/q/racefiets/ or https://www.2dehands.be/l/auto-s/#PriceCentsFrom:500000|sortBy:SORT_INDEX|sortOrder:DECREASING. Keyword, top-level category, price range, postcode radius and sort order are understood. A postcode without a distance (browsers add one from your saved location) and any unsupported filter are ignored with a warning in the run log. Sub-category URLs are rejected, because the search API cannot filter by them. Leave empty to use the keyword or category settings above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of listings collected in total over all searches and sites; the run stops once reached. Each delivered listing is billed. With 'only changes' on, unchanged listings count toward this limit (it is a scan budget) but are not delivered or billed, so raise it for a daily monitoring feed. A run also ends early at 3,000 API requests or shortly before the Actor timeout. Default: 100.",
            "default": 100
          },
          "maxRequestsPerSecond": {
            "title": "Max requests per second (per site)",
            "minimum": 0.2,
            "maximum": 2,
            "type": "number",
            "description": "Politeness limit per site. Between 0.2 and 2. Default: 1.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxy is the default and is enough. Residential proxy is not needed.",
            "default": {
              "useApifyProxy": true
            }
          },
          "monitorMode": {
            "title": "Monitor mode (track changes)",
            "type": "boolean",
            "description": "Remember every listing's price in a named key-value store and mark each listing as new, price_changed or unchanged (with the previous price and the change in EUR). Use with a schedule.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only changes (only bill new listings and price changes)",
            "type": "boolean",
            "description": "With monitor mode on: deliver only new listings and listings whose price changed. Unchanged listings are neither delivered nor billed. Needs monitor mode.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
            "minLength": 3,
            "maxLength": 63,
            "type": "string",
            "description": "Name of the persistent key-value store that holds the monitor state (record STATE). Use a different name for each saved search or schedule, otherwise they share one history. Lowercase letters, digits and hyphens only, 3 to 63 characters. Only used when monitor mode is on.",
            "default": "marktplaats-2dehands-state"
          },
          "stateRetentionDays": {
            "title": "Forget listings not seen for (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Monitor state entries not seen for this many days are dropped. A dropped listing shows as new again if it reappears. Default: 90.",
            "default": 90
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Include the listing description text (phone numbers, e-mail addresses and profile links are always removed from it). Turn off for a leaner dataset.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}