▲ Pyrénées RefugesFR · EN · ES · CA · EU

API for Pyrenean refuges and cabins

Access public data on Pyrenean refuges, cabins, shelters and ruins through a read-only API. GeoJSON, JSON, CSV, GPX and KML formats.

Explore the builder Code examples · GitHub OpenAPI 3.0 (JSON)

5 formats

GeoJSON, JSON, CSV, GPX, KML

HTTP GET

Read-only public API with BBOX filters and pagination.

WGS84

GPS longitude / latitude coordinates (EPSG:4326).

Documentation and parameters

GET /api.php?format=geojson&limit=10

ParameterValueDescription
format / type_fichiergeojson (default), json, csv, gpx, kmlOutput format
bboxwest,south,east,northGeographical bounds in WGS84 longitude/latitude
type_lieuall (default), 1 to 7Place category
regionExact textFilter by the stored region
limit1 to 20000 (default 10000)Maximum results
offset0 to 1000000 (default 0)Pagination offset

Place categories

1: Closed cabin · 2: Open cabin · 3: Cabin occupied by a shepherd in summer · 4: Orri, toue or stone shelter · 5: Refuge staffed in summer · 6: Refuge staffed all year · 7: Ruin.

Code examples

PHP

<?php
$url = 'https://www.pyrenees-refuges.com/api.php?format=geojson&limit=10';
$ctx = stream_context_create(['http' => ['timeout' => 20]]);
$json = file_get_contents($url, false, $ctx);
if ($json === false) { throw new RuntimeException('API inaccessible'); }
$data = json_decode($json, true, 512, JSON_THROW_ON_ERROR);
foreach ($data['features'] as $feature) { echo $feature['properties']['name'] . PHP_EOL; }

Python

import json
from urllib.request import urlopen
url = "https://www.pyrenees-refuges.com/api.php?format=geojson&limit=10"
with urlopen(url, timeout=20) as response:
    data = json.load(response)
for feature in data["features"]:
    print(feature["properties"]["name"])

JavaScript

const url = 'https://www.pyrenees-refuges.com/api.php?format=geojson&limit=10';
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
for (const feature of data.features) console.log(feature.properties.name);

Interactive builder

Explore the builder

Example: GeoJSON, 10 points. API responses can be downloaded; availability depends on the service and database.

Data usage: check reuse and attribution terms with Pyrénées Refuges before redistribution. A public API does not imply an open licence.

Geographical dataset

Geographical data on Pyrenean refuges and cabins. Check coverage, update frequency and reuse terms with the publisher.

Explore the data (GeoJSON)

Search examples

Get ten refuges or cabins in GeoJSON

GET /api.php?format=geojson&limit=10

Filter geographical bounds

GET /api.php?format=geojson&bbox=-1,42,1,43&limit=100