# Hagebau OpenSearch API Documentation

`GET /api/hagebau/opensearch` returns the parsed public OpenSearch descriptor: short name, description, input encoding and the search URL templates.

## Credits

A successful request costs **1 credit**. Errors and missing products cost nothing. The response shows the charge in `meta.credits_charged`.

- **Documentation:** [https://scrappa.co/docs/hagebau-api/hagebau_opensearch](https://scrappa.co/docs/hagebau-api/hagebau_opensearch)
- **API group:** Hagebau API
- **Endpoint:** `GET https://scrappa.co/api/hagebau/opensearch`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/hagebau/opensearch"
```

## Example response

```json
{
    "success": true,
    "site": "de",
    "opensearch": {
        "short_name": "hagebau",
        "description": "hagebau search",
        "urls": [
            {
                "type": "text/html",
                "template": "https://www.hagebau.de/search/?q={searchTerms}"
            }
        ]
    },
    "meta": {
        "endpoint_family": "hagebau-opensearch",
        "billable": true,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, unknown or malformed. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | The upstream could not be reached or changed its embedded page shape. Retryable and never billed. Clients are never rate limited. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
