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.
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
| Parameter | Value | Description |
|---|---|---|
format / type_fichier | geojson (default), json, csv, gpx, kml | Output format |
bbox | west,south,east,north | Geographical bounds in WGS84 longitude/latitude |
type_lieu | all (default), 1 to 7 | Place category |
region | Exact text | Filter by the stored region |
limit | 1 to 20000 (default 10000) | Maximum results |
offset | 0 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
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.
Search examples
Get ten refuges or cabins in GeoJSON
GET /api.php?format=geojson&limit=10Filter geographical bounds
GET /api.php?format=geojson&bbox=-1,42,1,43&limit=100