Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api-reference/endpoint/wallapop/list-categories.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "List Categories"
api: "GET https://scrapebadger.com/v1/wallapop/categories"
description: "Wallapop's full category tree with localised names — the ids are the category_id values search and filters accept."
description: "Wallapop's full category tree with localised names — the ids are the category_id and subcategory_ids values search and filters accept."
---

Wallapop's full category tree. Every `id` in the tree, at any depth, works as the `category_id` in [search](/api-reference/endpoint/wallapop/search-items) and [filters](/api-reference/endpoint/wallapop/list-filters).
Wallapop's full category tree. A top-level `id` is a `category_id`; every id under it in `subcategories`, at any depth, goes in `subcategory_ids` — both in [search](/api-reference/endpoint/wallapop/search-items) and [filters](/api-reference/endpoint/wallapop/list-filters). For example, Smartphones is `category_id=24200&subcategory_ids=9447`.

**Credits:** 1

Expand All @@ -31,7 +31,7 @@ Wallapop's full category tree. Every `id` in the tree, at any depth, works as th
<ResponseField name="parent_id" type="integer | null">Parent category id; `null` for top-level categories.</ResponseField>
<ResponseField name="vertical" type="string | null">Wallapop vertical, e.g. `consumer_goods` or `cars`. Subcategories inherit it from their parent.</ResponseField>
<ResponseField name="icon" type="string | null">Wallapop icon name for the category, e.g. `car`.</ResponseField>
<ResponseField name="subcategories" type="Category[]">Child categories, with the same shape, nested to any depth.</ResponseField>
<ResponseField name="subcategories" type="Category[]">Child categories, with the same shape, nested to any depth. Their ids are `subcategory_ids` values.</ResponseField>
</Expandable>
</ResponseField>
<ResponseField name="market" type="string">The market used for the request.</ResponseField>
Expand Down
6 changes: 5 additions & 1 deletion api-reference/endpoint/wallapop/list-filter-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ The options for filters too long to inline in [`/v1/wallapop/filters`](/api-refe
## Query Parameters

<ParamField query="category_id" type="integer">
Category to scope the options to, e.g. `100` for car makes and models.
Top-level category to scope the options to, e.g. `100` for car makes and models.
</ParamField>

<ParamField query="subcategory_ids" type="string">
Comma-separated subcategory ids to scope the options to. For example `brand` with `subcategory_ids=9447` lists phone brands, and with `10310` laptop brands.
</ParamField>

<ParamField query="query" type="string">
Expand Down
6 changes: 5 additions & 1 deletion api-reference/endpoint/wallapop/list-filters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ Filters with long option lists, such as `brand` and `model`, return no options h
## Query Parameters

<ParamField query="category_id" type="integer">
Category the filters apply to, from [`/v1/wallapop/categories`](/api-reference/endpoint/wallapop/list-categories). Use `100` for car filters.
Top-level category the filters apply to, from [`/v1/wallapop/categories`](/api-reference/endpoint/wallapop/list-categories). Use `100` for car filters.
</ParamField>

<ParamField query="subcategory_ids" type="string">
Comma-separated subcategory ids the filters apply to, e.g. `9447` (Smartphones). Same format as in [search](/api-reference/endpoint/wallapop/search-items).
</ParamField>

<ParamField query="query" type="string">
Expand Down
21 changes: 17 additions & 4 deletions api-reference/endpoint/wallapop/search-items.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Search Listings"
api: "GET https://scrapebadger.com/v1/wallapop/search"
description: "Search Wallapop second-hand listings in Spain, Italy, or Portugal with Wallapop's own filters — price, condition, brand, model, colour, distance, listing age, shipping, and car filters."
description: "Search Wallapop second-hand listings in Spain, Italy, or Portugal with Wallapop's own filters — category and subcategory, price, condition, brand, model, colour, distance, listing age, shipping, and car filters."
---

Search Wallapop listings, **40 per page**, with the same filters the Wallapop app offers. Send a `query`, a `category_id`, or both.
Search Wallapop listings, **40 per page**, with the same filters the Wallapop app offers. Send a `query`, a `category_id`, `subcategory_ids`, or any combination.

**Credits:** 5 per page. Empty results are not charged.

Expand All @@ -17,7 +17,7 @@ Search Wallapop listings, **40 per page**, with the same filters the Wallapop ap
## Query Parameters

<ParamField query="query" type="string">
Search text, e.g. `iphone 14`, `bicicleta montaña`. Required unless you pass `category_id`; requests with neither return `422`.
Search text, e.g. `iphone 14`, `bicicleta montaña`. Required unless you pass `category_id` or `subcategory_ids`; requests with none of them return `422`.
</ParamField>

<ParamField query="market" type="string" default="es">
Expand All @@ -37,7 +37,11 @@ Search Wallapop listings, **40 per page**, with the same filters the Wallapop ap
</ParamField>

<ParamField query="category_id" type="integer">
Category id from [`/v1/wallapop/categories`](/api-reference/endpoint/wallapop/list-categories), e.g. `24200` (Technology & electronics) or `100` (Cars). Required unless you pass `query`.
Top-level category id from [`/v1/wallapop/categories`](/api-reference/endpoint/wallapop/list-categories), e.g. `24200` (Technology & electronics) or `100` (Cars). Wallapop matches only top-level ids here: a subcategory id sent as `category_id` returns no results, so send subcategories in `subcategory_ids`.
</ParamField>

<ParamField query="subcategory_ids" type="string">
Comma-separated subcategory ids from [`/v1/wallapop/categories`](/api-reference/endpoint/wallapop/list-categories) — the `subcategories` of a category, at any depth. For example `24201` (Phones), `9447` (Smartphones), or `9447,10310` (smartphones and laptops); a listing in any of them matches. Works with or without `category_id`; a subcategory from another category than `category_id` matches nothing. Spaces and empty entries are ignored; anything other than numeric ids returns `422`. A `next_page` cursor keeps the subcategories.
</ParamField>

<ParamField query="min_price" type="number">
Expand Down Expand Up @@ -237,6 +241,15 @@ scrapebadger wallapop search "iphone" --market es --shippable

</CodeGroup>

Subcategory search — smartphones (`9447`, under Technology & electronics `24200`) up to €300, newest first:

```bash
curl "https://scrapebadger.com/v1/wallapop/search?query=iphone&category_id=24200&subcategory_ids=9447&max_price=300&order_by=newest" \
-H "X-API-Key: YOUR_API_KEY"
```

Each listing's `taxonomy` shows the full category path it sits in, e.g. Technology & electronics › Phones › Smartphones.

Car search — manual cars from 2015 on with under 100,000 km, closest to Madrid first:

```bash
Expand Down
Loading