{
  "openapi": "3.0.1",
  "info": {
    "title": "Marktplaats Monitor: New Listing & Price Drop Alerts",
    "description": "Monitor Marktplaats.nl and 2dehands.be searches and get only NEW listings and PRICE DROPS. no duplicates, no ads, no daily-digest lag. Built for resellers and deal hunters.",
    "version": "0.1",
    "x-build-id": "aCsaOujVrlA0B1OSZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bostomate~marktplaats-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bostomate-marktplaats-monitor",
        "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/bostomate~marktplaats-monitor/runs": {
      "post": {
        "operationId": "runs-sync-bostomate-marktplaats-monitor",
        "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/bostomate~marktplaats-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-bostomate-marktplaats-monitor",
        "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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries to monitor",
            "type": "array",
            "description": "One or more search terms. Each is monitored independently per site — you get an alert only for listings not seen in previous runs.",
            "items": {
              "type": "string"
            }
          },
          "sites": {
            "title": "Sites",
            "type": "array",
            "description": "Which marketplaces to monitor (same search engine, two countries).",
            "items": {
              "type": "string",
              "enum": [
                "marktplaats.nl",
                "2dehands.be"
              ],
              "enumTitles": [
                "Marktplaats.nl (Netherlands)",
                "2dehands.be (Belgium)"
              ]
            },
            "default": [
              "marktplaats.nl"
            ]
          },
          "maxItemsPerQuery": {
            "title": "Listings checked per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many newest listings to check per query per run (the monitor diffs these against what it has already seen). 30 covers a typical query polled every 15-60 minutes; raise it for very busy queries or slow schedules.",
            "default": 30
          },
          "priceFromEur": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or above this price."
          },
          "priceToEur": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or below this price."
          },
          "postcode": {
            "title": "Postcode (for distance filter)",
            "type": "string",
            "description": "Center the search on this postcode (use a Dutch postcode for marktplaats.nl, Belgian for 2dehands.be — when monitoring both countries with a distance filter, run two monitors)."
          },
          "distanceKm": {
            "title": "Distance (km)",
            "minimum": 0,
            "maximum": 300,
            "type": "integer",
            "description": "Only listings within this distance of the postcode. 0 = everywhere.",
            "default": 0
          },
          "includeCommercialListings": {
            "title": "Include ads / commercial listings",
            "type": "boolean",
            "description": "Admarkt ads and paid-boosted listings are filtered out by default (they flood alerts). Turn on to include them.",
            "default": false
          },
          "emitOnFirstRun": {
            "title": "Emit results on the first run",
            "type": "boolean",
            "description": "On the first run of a new query, return the current matching listings (so you immediately see what's out there and start monitoring from a known set). Turn this OFF if you want a silent baseline and alerts only for listings that appear AFTER the first run.",
            "default": true
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of this watchlist's memory. Use different IDs to run independent monitors (e.g. one per product) without their seen-histories mixing.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The monitor is polite by design (5s between searches); add a proxy only if your runs get blocked."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}