{
  "openapi": "3.0.1",
  "info": {
    "title": "2dehands & 2ememain Scraper",
    "description": "Scrape 2dehands.be and 2ememain.be as clean JSON: paste search links from either site or run several searches at once, and get only new listings on a schedule. Prices, condition, specs, locations and images. GDPR-safe: no seller names or personal data.",
    "version": "0.1",
    "x-build-id": "ZUleczrgnQfpiQ8Wi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lowlanddata~tweedehands-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lowlanddata-tweedehands-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/lowlanddata~tweedehands-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lowlanddata-tweedehands-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/lowlanddata~tweedehands-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lowlanddata-tweedehands-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": {
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text search. Provide this, a category, or both."
          },
          "searchQueries": {
            "title": "More search queries",
            "type": "array",
            "description": "Several searches in one run, one per line, e.g. <code>gazelle</code> and <code>sparta</code>. Each one uses the filters below. A listing found by two searches is delivered once. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "2dehands / 2ememain search URLs",
            "type": "array",
            "description": "Set up a search on 2dehands.be or 2ememain.be with any filters you like (category, condition, brand, price, distance...), then paste the address of the results page here, including everything after the <code>#</code>. Add as many as you watch, up to 50, from either site. <b>When URLs are given, the search fields of this form are ignored</b> (the marketplace too: each URL keeps its own site) and the run status says which ones were. Posted-date window, max items and only-new mode still apply. A listing page or another site is refused with the reason.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "domain": {
            "title": "Marketplace",
            "enum": [
              "2dehands.be",
              "2ememain.be"
            ],
            "type": "string",
            "description": "Which marketplace to scrape.",
            "default": "2dehands.be"
          },
          "categoryId": {
            "title": "Category ID",
            "minimum": 1,
            "type": "integer",
            "description": "Numeric marketplace category ID to scope the crawl. Every result includes its <code>categoryId</code>, so run a broad search first to discover the IDs you need. Optional."
          },
          "listingIds": {
            "title": "Specific listing IDs",
            "type": "array",
            "description": "Fetch these exact listings instead of searching, e.g. [\"m2107483664\"] - the id is in every listing URL and every dataset item. Useful to re-check price or availability of listings you found earlier. When set, all search filters are ignored.",
            "items": {
              "type": "string"
            }
          },
          "postcode": {
            "title": "Postcode",
            "type": "string",
            "description": "Belgian postcode to search around, e.g. \"2000\". Combine with radiusKm to narrow the search area. The distance itself is not returned as a field."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Only return listings within this many km of the postcode. Requires postcode."
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Only return listings in these conditions. Empty = all conditions. Without a category ID the search runs category by category, because the marketplace applies this filter only inside a category.",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "as-new",
                "used",
                "refurbished",
                "not-working"
              ],
              "enumTitles": [
                "New",
                "As good as new",
                "Used",
                "Refurbished",
                "Not working / parts"
              ]
            }
          },
          "delivery": {
            "title": "Delivery",
            "enum": [
              "any",
              "pickup",
              "shipping"
            ],
            "type": "string",
            "description": "Only listings offering pickup, or only listings that ship. \"any\" = no filter.",
            "default": "any"
          },
          "buyItNowOnly": {
            "title": "Buy-it-now only",
            "type": "boolean",
            "description": "Only listings with the \"Direct Kopen\" (buy it now) option.",
            "default": false
          },
          "priceMinEur": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return listings priced at or above this amount. Optional."
          },
          "priceMaxEur": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only return listings priced at or below this amount. Optional."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "date",
              "price_asc",
              "price_desc",
              "relevance"
            ],
            "type": "string",
            "description": "Order of the results. Newest first is the default and the right choice for monitoring.",
            "default": "date"
          },
          "postedAfter": {
            "title": "Posted after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2})?(\\.\\d+)?(Z|[+-]\\d{2}:?\\d{2})?)?$",
            "type": "string",
            "description": "Only keep listings posted on or after this date. Listings whose posting date cannot be read are excluded when a window is set. <b>Format: <code>YYYY-MM-DD</code></b> (for example <code>2026-09-08</code>) or a full ISO timestamp such as <code>2026-09-08T14:30:00Z</code>. Slash dates like <code>08/09/2026</code> are refused on purpose: they are read as September in Europe and August in the United States, and this actor will not guess which you meant."
          },
          "postedBefore": {
            "title": "Posted before",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}([T ]\\d{2}:\\d{2}(:\\d{2})?(\\.\\d+)?(Z|[+-]\\d{2}:?\\d{2})?)?$",
            "type": "string",
            "description": "Only keep listings posted on or before this date. <b>Format: <code>YYYY-MM-DD</code></b> (for example <code>2026-09-08</code>) or a full ISO timestamp such as <code>2026-09-08T14:30:00Z</code>. Slash dates like <code>08/09/2026</code> are refused on purpose: they are read as September in Europe and August in the United States, and this actor will not guess which you meant."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many listings, across all searches of the run. With several searches, each gets an equal share of what is left.",
            "default": 1000
          },
          "onlyNewListings": {
            "title": "Only new listings",
            "type": "boolean",
            "description": "For scheduled runs: return only listings this search has not delivered before. The first run returns the usual results and remembers them; later runs skip them, and skipped listings are not charged. The memory is kept per search (and per task) in a key-value store named <code>tweedehands-scraper-seen-listings</code> in your own account, for 90 days. Changing a search's filters starts a fresh memory.",
            "default": false
          },
          "resetState": {
            "title": "Forget delivered listings",
            "type": "boolean",
            "description": "With only-new mode on: forget what the searches of this run delivered before, return the full results once and remember them again.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. Keep Apify proxy enabled.",
            "default": {
              "useApifyProxy": true
            }
          },
          "reportFailures": {
            "title": "Report failures to the developer",
            "type": "boolean",
            "description": "When a run fails, send the developer the actor name and build, an error category, the error message (truncated) and a one-way hash of your input - so a bug can be fixed without anyone asking you to reproduce it. <b>Your input itself, your results and your identity are never sent, and successful runs send nothing at all.</b> Switch this off and the actor behaves exactly the same.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}