cqGMA - Global Mountain Activity
cqGMA - Global Mountain Activity
Download .md

cqGMA Reference Information API

Overview

The cqGMA Reference API provides information about:

Main API URL:

https://www.cqgma.org/api/ref/?REFERENCE

---

Examples

Summit

https://www.cqgma.org/api/ref/?DA/NI-099

WWFF

https://www.cqgma.org/api/ref/?DLFF-0125

Island

https://www.cqgma.org/api/ref/?EU-022

Lighthouse

ILLW

https://www.cqgma.org/api/ref/?DE0136

ARLHS

https://www.cqgma.org/api/ref/?FED 009

or

https://www.cqgma.org/api/ref/?FED-009

WCA

https://www.cqgma.org/api/ref/?DL-00319

COTA

https://www.cqgma.org/api/ref/?NBN-047

MOTA (Mills)

https://www.cqgma.org/api/ref/?X53965

---

Program-Specific APIs

Castles only

https://www.cqgma.org/api/castle/?DL-00136

Islands only

https://www.cqgma.org/api/island/?EU-066

Lighthouses only

https://www.cqgma.org/api/lighthouse/?FED-101

Mills only

https://www.cqgma.org/api/mill/?X53965

Summits only

https://www.cqgma.org/api/summit/?DA/NI-096

WWFF only

https://www.cqgma.org/api/wwff/?DLFF-0126

---

Example Return JSON

{
  "reference": "DLFF-0125",
  "name": "Nature Park TERRA vita",
  "latitude": "52.26815796",
  "longitude": "8.35510254",
  "locator": "JO42EG",
  "reftype": "WWFF"
}

---

Simple PHP Example

<?php

function ref_info($ref)
{
$url = 'https://www.cqgma.org/api/ref/?' . urlencode($ref);

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $url);

$json = curl_exec($ch);

curl_close($ch);

return $json;
}

$json = ref_info('DLFF-0125');

$data = json_decode($json, true);

echo $data["name"];

?>

---

Interactive Example

Example dialogue application:

https://www.adventureradio.de/cqgma/reference_info.php

---

Multiple Reference Examples

COTA

$json = ref_info('NBN-019');

WCA

$json = ref_info('DL-05279');

Summit

$json = ref_info('DM/NS-108');

WWFF

$json = ref_info('DLFF-0125');

IOTA

$json = ref_info('EU-126');

GMA Islands

$json = ref_info('DAI/NI-010');

Mill

$json = ref_info('X29821');

ILLW

$json = ref_info('DE0067');

WLOTA

$json = ref_info('518');

---

ARLHS Special Handling

The API accepts different ARLHS formats:

FED-101
FED 101
FED+101

---

Summit-only Example

<?php

function summit_info($ref)
{
$url = 'https://www.cqgma.org/api/summit/?' . urlencode($ref);

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $url);

$json = curl_exec($ch);

curl_close($ch);

return $json;
}

$json = summit_info('DM/NS-108');

var_dump(json_decode($json, true));

?>

---

Notes

---

Contact

CQGMA Website:

https://www.cqgma.org
Support:
support@cqgma.org
---