---
title: "Search the library directory"
method: GET
path: "/api/libraries/search"
tags: ["libraries"]
---

# Search the library directory

`GET /api/libraries/search`

## Request

- Base URL: `https://leafle.org` (the document declares no server; this is the origin it was published from)
- URL: `https://leafle.org/api/libraries/search`
- Auth: none required

**Access: no authentication.**

Search by name or place. `country` is a two-letter country code; omit it for an IP-based hint or send an empty string to search worldwide. Location and live coverage are separate: check each result's coverage status.

## Query parameters

- `q` string
- `country` string, nullable
- `lat` number, nullable
- `lng` number, nullable

## Response `200`

Successful Response

- LibrarySearch
  - `offer_id` string, nullable
  - `query` string, required
  - `country_hint` string, nullable, required
  - `results` LibraryPlace[], required
    - `id` string, required
    - `service_code` string, nullable, required
    - `service` string, required
    - `name` string, required
    - `branch` string, nullable, required
    - `country` string, required
    - `url` string, nullable, required
    - `lat` number, nullable, required
    - `lng` number, nullable, required
    - `covered` boolean, required
    - `kind` string, required
    - `distance_km` number, nullable
  - `countries` string[]
  - `message` string

## Other responses

- `422`: Validation Error
- `429`: Request or usage limit reached. Wait before retrying.

---

[API](https://skmtc.dev/leafle/apis/leafle-api.md) · [All operations](https://skmtc.dev/leafle/apis/leafle-api/llms.txt) · [OpenAPI document](https://skmtc.dev/leafle/apis/leafle-api/revisions/f2e56cb74495?raw)
