> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.buqipi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Spanish postal codes

> Fuzzy search by municipality name (Spain).

`GET /postal-codes/search`

Fuzzy search by municipality name (Spain).

## Authentication

Send the scoped API key as `Authorization: Bearer bqp_pk_...`. All requests use the base URL `https://api.buqipi.com/connect/v1`.

## Parameters

| Name | In | Type | Required | Description |
| - | - | - | - | - |
| `q` | query | string | yes | |

## Example request

```bash theme={null}
curl -X GET "https://api.buqipi.com/connect/v1/postal-codes/search" \
  -H "Authorization: Bearer $BUQIPI_API_KEY"
```

## Responses

| Status | Description |
| - | - |
| `200` | Postal code results. |
| `401` | Missing, invalid, expired or revoked API key. |
| `422` | One or more request fields are invalid. |
| `429` | The key or IP exceeded its quota. |
| `500` | An unexpected server error. Details are not exposed to the client. |

## Response fields (200)

| Field | Type | Required | Description |
| - | - | - | - |
| `data` | object | yes | |
| `data.query` | string | yes | |
| `data.count` | integer | yes | |
| `data.results` | array of object | yes | |
| `meta` | object | yes | Response trace and pagination metadata. |
| `meta.api` | string enum: buqipi-connect | yes | |
| `meta.version` | string enum: v1 | yes | |
| `meta.request_id` | string (uuid) | yes | |
| `meta.generated_at` | string (date-time) | yes | |
| `meta.pagination` | object | no | |

## Specification

[View the full OpenAPI specification](https://api.pastes.dev/8OG3RS6RJx).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.