{
  "openapi": "3.0.1",
  "info": {
    "title": "Classified Listings",
    "description": "Search and track listings across Facebook Marketplace, OLX, Wallapop, Leboncoin and Custojusto through one unified API — one request shape, five sources, normalized results, plus price alerts that notify you when something new matches.",
    "version": "0.0",
    "x-build-id": "wuy7O3WJKjefLBMSp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pintostudio~classified-listings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pintostudio-classified-listings",
        "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/pintostudio~classified-listings/runs": {
      "post": {
        "operationId": "runs-sync-pintostudio-classified-listings",
        "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/pintostudio~classified-listings/run-sync": {
      "post": {
        "operationId": "run-sync-pintostudio-classified-listings",
        "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": {
          "operation": {
            "title": "Operation",
            "enum": [
              "search",
              "listingDetail",
              "sourceExtra",
              "alertCheck"
            ],
            "type": "string",
            "description": "What this run should do. \"search\" runs a keyword search across one or more sources (the main use case). \"listingDetail\" fetches one listing's full detail. \"sourceExtra\" calls a source's own unique endpoint (categories, etc). \"alertCheck\" re-runs a saved search and reports only genuinely new listings since the last run with this same Alert State Key — intended to be triggered on a schedule.",
            "default": "search"
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which classifieds sites to search. Used by \"search\" and \"alertCheck\". Leave empty to search all 5.",
            "items": {
              "type": "string",
              "enum": [
                "facebook",
                "olx",
                "wallapop",
                "leboncoin",
                "custojusto"
              ],
              "enumTitles": [
                "Facebook Marketplace",
                "OLX (Portugal)",
                "Wallapop (Spain)",
                "Leboncoin (France)",
                "Custojusto (Portugal)"
              ]
            },
            "default": []
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keyword search text. Used by \"search\" and \"alertCheck\".",
            "default": "iphone"
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Source-specific category id/slug (use the \"sourceExtra\" operation with extraName=\"categories\" to list them for Leboncoin/Custojusto). Optional."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Source-specific location filter: a city name for OLX/Custojusto, a zip/city for Leboncoin, \"lat,lon\" for Wallapop/Facebook (e.g. \"40.4168,-3.7038\"), or a raw Facebook location id for Facebook. Optional."
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price filter, in the source's own currency. Optional."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter, in the source's own currency. Optional."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price_asc",
              "price_desc",
              "date"
            ],
            "type": "string",
            "description": "Result ordering. Used by \"search\" and \"alertCheck\".",
            "default": "relevance"
          },
          "page": {
            "title": "Page",
            "minimum": 1,
            "type": "integer",
            "description": "Page number, starting at 1. Has no effect on Facebook (first page only). On Wallapop, prefer \"cursor\" below once you have one — it's far more efficient than paging forward.",
            "default": 1
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Max listings to return per source, 1-100.",
            "default": 30
          },
          "cursor": {
            "title": "Cursor (Wallapop only)",
            "type": "string",
            "description": "An opaque \"nextCursor\" value from a previous Wallapop search result — pass it back here to fetch the next page in one request instead of using \"page\"."
          },
          "compareBySource": {
            "title": "Include price comparison by source",
            "type": "boolean",
            "description": "When true, a \"search\" run also includes min/max/avg price stats grouped by source in the output.",
            "default": false
          },
          "source": {
            "title": "Source",
            "enum": [
              "facebook",
              "olx",
              "wallapop",
              "leboncoin",
              "custojusto"
            ],
            "type": "string",
            "description": "A single source. Used by \"listingDetail\" and \"sourceExtra\"."
          },
          "listingId": {
            "title": "Listing id or URL",
            "type": "string",
            "description": "Used by \"listingDetail\". For Wallapop/Facebook, the plain listing id (a search result's \"sourceId\"). For OLX/Custojusto/Leboncoin, the listing's full \"url\" field from a search result instead — these sites need the slug, not just the numeric id."
          },
          "extraName": {
            "title": "Extra name",
            "type": "string",
            "description": "Used by \"sourceExtra\". One of: Leboncoin → \"categories\"; Custojusto → \"categories\"; OLX → \"rawState\"; Wallapop → \"cars\"."
          },
          "extraParams": {
            "title": "Extra params (JSON)",
            "type": "object",
            "description": "Used by \"sourceExtra\". Parameters for the chosen extra, e.g. {\"id\": \"<olx-listing-url>\"} for OLX's rawState, or {\"query\": \"golf\", \"brand\": \"Renault\"} for Wallapop's cars.",
            "default": {}
          },
          "webhookUrl": {
            "title": "Webhook URL (alertCheck only)",
            "type": "string",
            "description": "If set and the \"alertCheck\" operation finds new matches, they're POSTed here as { query, sources, matches }."
          },
          "alertStateKey": {
            "title": "Alert state key (alertCheck only)",
            "type": "string",
            "description": "Key-value store key this run's \"seen listing ids\" are kept under, so a later run (e.g. a scheduled one) only reports genuinely new matches. Use a distinct key per saved search.",
            "default": "default"
          },
          "baseProxyUrl": {
            "title": "Base proxy URL",
            "type": "string",
            "description": "A generic HTTP(S) proxy URL (e.g. http://user:pass@host:port), tried before falling back to the impit service below. Optional but recommended — most sources need this to avoid being blocked."
          },
          "rotatingResidentialProxyUrl": {
            "title": "Rotating residential proxy URL",
            "type": "string",
            "description": "A residential proxy that rotates IP per connection, used by the impit fallback for anti-bot-protected sources (Leboncoin especially). Optional."
          },
          "spainResidentialProxyUrl": {
            "title": "Spain residential proxy URL",
            "type": "string",
            "description": "A residential proxy pinned to Spain, used for Wallapop. Optional — falls back to the rotating/base proxy above if not set."
          },
          "portugalResidentialProxyUrl": {
            "title": "Portugal residential proxy URL",
            "type": "string",
            "description": "A residential proxy pinned to Portugal, used for OLX and Custojusto. Optional — falls back to the rotating/base proxy above if not set."
          },
          "impitProxyMethodUrl": {
            "title": "Impit proxy service URL",
            "type": "string",
            "description": "Base URL of a service that fetches a URL with a real browser TLS fingerprint (impit, Firefox impersonation) and returns { status_code, content, headers } — used as the last-resort fallback when a direct/proxied request is blocked. Required for Leboncoin/Wallapop to reliably work. Optional for OLX/Custojusto/Facebook."
          },
          "wallapopAppVersion": {
            "title": "Wallapop app version header override",
            "type": "string",
            "description": "Advanced: override the x-appversion header Wallapop requires. Leave blank to use the built-in default."
          },
          "wallapopDeviceId": {
            "title": "Wallapop device id header override",
            "type": "string",
            "description": "Advanced: override the x-deviceid header Wallapop requires. Leave blank to use the built-in default."
          },
          "wallapopDeviceOs": {
            "title": "Wallapop device OS header override",
            "type": "string",
            "description": "Advanced: override the x-deviceos header Wallapop requires. Leave blank to use the built-in default."
          },
          "facebookLocationId": {
            "title": "Facebook location id override",
            "type": "string",
            "description": "Advanced: override the default Facebook-internal location id used when \"location\" isn't a raw location id. Leave blank to default to the San Francisco Bay Area."
          },
          "requestBudgetMs": {
            "title": "Per-request time budget (ms)",
            "type": "integer",
            "description": "Advanced: how long a single outbound request is allowed to spend across its whole retry ladder. Leave blank to use the built-in default (45000)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}