# Hagebau — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Browse Hagebau's complete product catalog, search across thousands of items by category and brand, and check real-time store availability for building materials and home improvement products. Access detailed product specifications, filter by brand, and discover what's in stock at your nearest location.

**Category:** E-commerce | **Website:** [hagebau.de/](https://hagebau.de/) | **Docs:** [parse.bot/marketplace/61f1639e-4c0f-4eee-b3e1-e0924ab66b72/hagebau-de-api](https://parse.bot/marketplace/61f1639e-4c0f-4eee-b3e1-e0924ab66b72/hagebau-de-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_brands

Get a list of brands and their product counts aggregated across multiple categories. Samples up to 10 level-2 subcategories to collect manufacturer data. Results are not exhaustive but representative of the catalog.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/get_all_brands \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_categories

Get the full hierarchical category tree from hagebau.de. Returns nested categories with IDs, URLs, product counts, and children. No parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_category_brands

Get all brands with product counts for a specific category. Returns the manufacturer filter options from the category page. Requires a level 2+ category slug.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category URL slug (level 2+ required, e.g. 'auto-zweirad-autobatterien') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/get_category_brands \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>"}'
```

### get_category_products

Get products in a category. Requires a level 2 or deeper category slug (e.g. 'auto-zweirad-autobatterien'). Top-level category slugs return 403 from upstream. Use get_categories to discover valid slugs. Paginates by page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category URL slug from the category tree (level 2+ required, e.g. 'auto-zweirad-autobatterien', 'werkzeug-maschinen-hammer') |
| `page` | integer | No | Page number for paginated results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","page":"<integer>"}'
```

### get_product_details

Get full product details including schema.org structured data, tracking metadata, and product attributes. Accepts a full hagebau.de product URL or a URL slug.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_url` | string | Yes | Full product URL (e.g. 'https://www.hagebau.de/p/fiskars-faeustel-anP04645074/') or relative URL slug (e.g. '/p/fiskars-faeustel-anP04645074/') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_url":"<string>"}'
```

### get_store_availability

Find hagebau stores/markets. Returns store IDs and URLs. Optionally filter by keyword matching against store URLs (typically city names).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Optional filter keyword to match against store URLs (e.g. city name like 'Berlin', 'Hamburg') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/get_store_availability \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### search_products

Search for products by keyword. Handles both direct search results and category-redirect searches. Returns paginated product listings with filters and total count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for paginated results. |
| `query` | string | Yes | Search keyword (e.g. 'hammer', 'bosch akkuschrauber') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-hagebau-de-api-61f1639e/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
