{
  "openapi": "3.0.1",
  "info": {
    "title": "2dehands Ads Scraper",
    "description": "Collect classified ads from 2dehands.be or 2ememain.be using one or more search terms. Results include titles, descriptions, seller details, locations, categories, attributes, image URLs and date labels. The Actor uses the sites’ public JSON search endpoint and supports Dutch and French searches.",
    "version": "0.1",
    "x-build-id": "63mQO3SCITfY1c03N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axiomworks~2dehands-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axiomworks-2dehands-ads-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/axiomworks~2dehands-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axiomworks-2dehands-ads-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/axiomworks~2dehands-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axiomworks-2dehands-ads-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": {
          "searchQueries": {
            "title": "Search keyword strings",
            "type": "array",
            "description": "Keyword strings, e.g. [\"fiets\", \"iphone 13\"]. Supply searchQueries, startUrls, or categoryId. Queries use language; all targets share maxItems. Unmatched or unavailable searches return no rows; try broader keywords or fewer filters.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "2dehands or 2ememain search URLs",
            "type": "array",
            "description": "Search URLs, e.g. https://www.2dehands.be/q/fiets/ or https://www.2ememain.be/lrp/api/search?query=velo. Accepts strings or {\"url\":\"...\"}. URL host selects the site. Default reads keywords only; useUrlFilters=true retains supported query-string filters, overridden by explicit Actor filters. Targets share maxItems.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "language": {
            "title": "Keyword search site: nl or fr",
            "enum": [
              "nl",
              "fr"
            ],
            "type": "string",
            "description": "Choose nl for Dutch 2dehands.be or fr for French 2ememain.be, e.g. \"fr\" with searchQueries [\"velo\"]. Default nl. Applies to keyword and category searches; startUrls select their own site.",
            "default": "nl"
          },
          "categoryId": {
            "title": "Numeric listing category ID",
            "minimum": 1,
            "type": "integer",
            "description": "Restrict results to a numeric listing categoryId, e.g. 447. Omit for all categories. Can be used alone without keywords or URLs; sent as l2CategoryId, so use a leaf category from an existing result."
          },
          "postcode": {
            "title": "Belgian postcode string",
            "type": "string",
            "description": "Filter around a Belgian postcode string, e.g. \"9000\", using distanceMeters (default 25000 metres). Default empty string searches all locations. Combined with category and price filters; remove filters if no ads match.",
            "default": ""
          },
          "minPrice": {
            "title": "Minimum asking price in euros",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum asking price as a whole number of euros, e.g. 50. Default 0 applies no minimum. Combined with maxPrice; use minPrice less than or equal to maxPrice when both are positive.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum asking price in euros",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum asking price as a whole number of euros, e.g. 500. Default 0 applies no maximum. Combined with minPrice; use maxPrice greater than or equal to minPrice when both are positive.",
            "default": 0
          },
          "sortBy": {
            "title": "Search result sort enum",
            "enum": [
              "RELEVANCE",
              "NEWEST",
              "PRICE_ASC",
              "PRICE_DESC"
            ],
            "type": "string",
            "description": "Choose RELEVANCE (default), NEWEST, PRICE_ASC, or PRICE_DESC, e.g. \"NEWEST\" for recent ads. Applies separately to each target; results are processed in input order rather than globally sorted.",
            "default": "RELEVANCE"
          },
          "maxItems": {
            "title": "Total ad limit across targets",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum unique ads saved across all queries and URLs combined, 1-5000, default 50; e.g. 7 saves at most seven rows total. Duplicates and previously seen ads with onlyNewListings are skipped. Fewer rows are returned when matches run out or targets are unavailable.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Apify Proxy settings object",
            "type": "object",
            "description": "Connection settings object, e.g. {\"useApifyProxy\":false} (default, direct requests). Failed direct requests retry using Apify datacenter proxy when available. You can configure Apify Proxy or proxyUrls; unavailable targets produce no rows.",
            "default": {
              "useApifyProxy": false
            }
          },
          "onlyNewListings": {
            "title": "Skip previously returned ad IDs",
            "type": "boolean",
            "description": "Boolean, e.g. true for scheduled searches. Default false includes matching ads on every run. When true, skips IDs remembered by previous enabled runs in the named 2dehands-seen-ads store; shared across targets. Zero rows can mean all matching ads were already seen.",
            "default": false
          },
          "distanceMeters": {
            "title": "Postcode radius in metres",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Radius around postcode in metres, 0-200000, default 25000. Used only when postcode is supplied. For example 5000 searches within five kilometres.",
            "default": 25000
          },
          "useUrlFilters": {
            "title": "Keep filters from search URLs",
            "type": "boolean",
            "description": "Use supported query-string filters from startUrls: category, postcode, radius, attributes, price ranges and sort. Default false keeps the existing keywords-only URL behavior. Explicit Actor filters override the same URL parameter; maxItems remains shared.",
            "default": false
          },
          "postedAfter": {
            "title": "Earliest posting date",
            "type": "string",
            "description": "Keep ads with dateIso on or after this inclusive YYYY-MM-DD date, e.g. 2026-10-01. Default empty disables the lower bound. Uses Brussels-local dates; unreadable dates are excluded when a bound is set. Filters the available search results, not an archive.",
            "default": ""
          },
          "postedBefore": {
            "title": "Latest posting date",
            "type": "string",
            "description": "Keep ads with dateIso on or before this inclusive YYYY-MM-DD date. Default empty disables the upper bound. Combine with postedAfter for a window; earlier must not exceed later. Date filtering can return fewer than maxItems when matching results run out.",
            "default": ""
          },
          "resetState": {
            "title": "Reset remembered ad IDs",
            "type": "boolean",
            "description": "Forget previously returned IDs when onlyNewListings=true, then return matching ads and remember them again. Default false preserves history. Has no effect when onlyNewListings=false. The reset applies to the shared 2dehands-seen-ads store, across all enabled schedules.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}