{
  "openapi": "3.0.1",
  "info": {
    "title": "Wallapop Scraper — Phones & Battery Health",
    "description": "Searches Wallapop for used phones and keeps only listings that clear a battery-health floor you set. Reads battery health, screen and battery replacement, price, distance and shipping from each ad, and drops anything advertised as damaged.",
    "version": "0.1",
    "x-build-id": "wQbmYMUe8chMrObaL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reventadata~wallapop-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reventadata-wallapop-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/reventadata~wallapop-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reventadata-wallapop-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/reventadata~wallapop-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reventadata-wallapop-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",
        "required": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "One search per phone model. Every keyword is repeated around every origin below.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Search origins",
            "type": "array",
            "description": "Origins for the country-wide shipping pass. Wallapop searches around a coordinate, so these widen coverage rather than restrict it. Leave empty to sweep all of them.",
            "items": {
              "type": "string",
              "enum": [
                "madrid",
                "barcelona",
                "valencia",
                "sevilla",
                "zaragoza",
                "malaga",
                "bilbao",
                "murcia",
                "palma",
                "alicante",
                "las-palmas",
                "vigo"
              ],
              "enumTitles": [
                "Madrid",
                "Barcelona",
                "Valencia",
                "Sevilla",
                "Zaragoza",
                "Málaga",
                "Bilbao",
                "Murcia",
                "Palma de Mallorca",
                "Alicante",
                "Las Palmas",
                "Vigo"
              ]
            },
            "default": [
              "madrid",
              "barcelona",
              "valencia",
              "sevilla",
              "zaragoza",
              "malaga",
              "bilbao",
              "murcia",
              "palma",
              "alicante",
              "las-palmas",
              "vigo"
            ]
          },
          "searchNearby": {
            "title": "Pass 1: search near a point",
            "type": "boolean",
            "description": "Look close to home first and keep anything inside the radius, whether or not the seller posts.",
            "default": true
          },
          "nearLatitude": {
            "title": "Near latitude",
            "type": "number",
            "description": "Centre of the local search. Defaults to Madrid (40.4168).",
            "default": 40.4168
          },
          "nearLongitude": {
            "title": "Near longitude",
            "type": "number",
            "description": "Defaults to Madrid (-3.7038).",
            "default": -3.7038
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "type": "integer",
            "description": "Enforced by Wallapop via its own distance_in_km parameter, and re-checked here from each listing's coordinates to fill in the distance field.",
            "default": 100
          },
          "searchAllSpainWithShipping": {
            "title": "Pass 2: rest of Spain, sellers who post",
            "type": "boolean",
            "description": "Sweep the whole country from 12 city origins, not just the radius around your near-point. Whether distant sellers must post is a separate switch below.",
            "default": true
          },
          "requireShipping": {
            "title": "Pass 2: only sellers who post",
            "type": "boolean",
            "description": "On by default: a listing 700 km away that the seller will not post is not buyable. Turn it off to see every distant listing anyway - useful for price research, or if you are willing to travel or arrange your own courier. Either way the sellerAllowsShipping field tells you which is which.",
            "default": true
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep this above zero. Wallapop's cheapest results are phone cases and repair-service adverts, not devices.",
            "default": 1
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Leave empty for no ceiling. Applied by Wallapop itself, so setting it also narrows what the feed returns."
          },
          "minBattery": {
            "title": "Minimum battery health (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Read from the seller's own text. Set 0 to disable. Listings that never mention battery health are dropped unless 'Keep listings with no stated battery' is on.",
            "default": 0
          },
          "allowUnknownBattery": {
            "title": "Keep listings with no stated battery",
            "type": "boolean",
            "description": "Most sellers never state battery health. Turn this on to see them anyway and ask yourself.",
            "default": false
          },
          "excludeDamaged": {
            "title": "Exclude damaged and parts-only listings",
            "type": "boolean",
            "description": "Drops anything describing a cracked screen, a dead unit, or a sale for parts. \"Sin grietas\" and other denials are not treated as damage.",
            "default": true
          },
          "excludeAccessories": {
            "title": "Exclude accessories and repair services",
            "type": "boolean",
            "description": "Drops cases, screen protectors, spare parts and repair-shop adverts by title. A phone listed \"+ funda\" is kept - the case is included, not the product. These are Spanish phone-market phrases; turn this off if you search anything that is not a phone.",
            "default": true
          },
          "requireKeywordMatch": {
            "title": "Require the keyword to appear in the title",
            "type": "boolean",
            "description": "Wallapop's keyword search is fuzzy - searching 'iphone 13 mini' also returns iPhone 8s and multi-model shop adverts. This drops any listing whose title does not contain every word of your query. Turn it off only for broad exploration.",
            "default": true
          },
          "benchmarkAgainstShop": {
            "title": "Add a shop reference price",
            "type": "boolean",
            "description": "Looks up what the same phone costs at Cash Converters, a chain that grades its own stock and prices identically nationwide. Adds a reference price and the gap to it on every row. One extra request per keyword, and it never removes a listing - a price far below the trade price is what you are hunting for, and also what a scam looks like.",
            "default": false
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Wallapop's own condition filter, applied server-side. Leave empty for any. It accepts one value per request, so each condition selected costs one extra request per origin. 'As good as new' is the tightest useful setting.",
            "items": {
              "type": "string",
              "enum": [
                "un_opened",
                "in_box",
                "new",
                "as_good_as_new",
                "good",
                "fair",
                "has_given_it_all"
              ],
              "enumTitles": [
                "Unopened",
                "In its box",
                "New",
                "As good as new",
                "Good",
                "Fair",
                "Well used"
              ]
            },
            "default": []
          },
          "orderBy": {
            "title": "Sort order",
            "enum": [
              "most_relevance",
              "newest",
              "price_low_to_high",
              "price_high_to_low",
              "closest"
            ],
            "type": "string",
            "description": "Leave on relevance. 'newest' quietly restricts the feed to a recent window - the same query returns 7 items sorted newest against 40 by relevance - so use it only for a scheduled run watching for new adverts.",
            "default": "most_relevance"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on rows pushed for the whole run.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Wallapop lets an unproxied caller through as long as the request carries the X-DeviceOS header, which this Actor always sends. Rotating the address still spreads out a large sweep.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}