curl --request GET \
--url https://api.thebuoy.app/v2/buoys/last_readings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.thebuoy.app/v2/buoys/last_readings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thebuoy.app/v2/buoys/last_readings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.thebuoy.app/v2/buoys/last_readings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.thebuoy.app/v2/buoys/last_readings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.thebuoy.app/v2/buoys/last_readings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thebuoy.app/v2/buoys/last_readings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"buoys": [
{
"id": 123,
"name": "<string>",
"lat": 123,
"lng": 123,
"source": "<string>",
"last_reading": {
"id": 123,
"uuid": "<string>",
"significient_height": 123,
"maximum_height": 123,
"period": 123,
"time": "2023-11-07T05:31:56Z",
"water_temperature": 123,
"direction": 123,
"direction_compass": "<string>",
"unit": "<string>",
"energy_per_wave": 123
}
}
],
"missing_ids": [
123
]
}
}{
"error": "bad_request",
"message": "Search term must be at least 2 characters",
"timestamp": "2025-12-27T14:30:00Z",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"error": "unauthorized",
"message": "Invalid API key",
"timestamp": "2025-12-27T14:30:00Z",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"error": "rate_limit_exceeded",
"message": "You have exceeded 1000 requests per hour",
"timestamp": "2025-12-27T14:30:00Z",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}Get last readings for multiple buoys
Bulk fetch the latest reading for a list of buoys by ID.
By default returns the first 3 IDs supplied. Pass limit to fetch up to 100 buoys in a single request.
Tip: To get last readings for all buoys in a country in one call, use GET /buoys?country=FR instead — the index response already includes last_reading for each buoy.
curl --request GET \
--url https://api.thebuoy.app/v2/buoys/last_readings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.thebuoy.app/v2/buoys/last_readings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thebuoy.app/v2/buoys/last_readings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.thebuoy.app/v2/buoys/last_readings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.thebuoy.app/v2/buoys/last_readings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.thebuoy.app/v2/buoys/last_readings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thebuoy.app/v2/buoys/last_readings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"buoys": [
{
"id": 123,
"name": "<string>",
"lat": 123,
"lng": 123,
"source": "<string>",
"last_reading": {
"id": 123,
"uuid": "<string>",
"significient_height": 123,
"maximum_height": 123,
"period": 123,
"time": "2023-11-07T05:31:56Z",
"water_temperature": 123,
"direction": 123,
"direction_compass": "<string>",
"unit": "<string>",
"energy_per_wave": 123
}
}
],
"missing_ids": [
123
]
}
}{
"error": "bad_request",
"message": "Search term must be at least 2 characters",
"timestamp": "2025-12-27T14:30:00Z",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"error": "unauthorized",
"message": "Invalid API key",
"timestamp": "2025-12-27T14:30:00Z",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"error": "rate_limit_exceeded",
"message": "You have exceeded 1000 requests per hour",
"timestamp": "2025-12-27T14:30:00Z",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
API key authentication. Pass your API key as a Bearer token in the Authorization header.
Format: Authorization: Bearer YOUR_API_KEY
Alternative: Pass as query parameter ?api_key=YOUR_API_KEY
Security: API keys are stored as BCrypt hashes (never plain text). Only the hash is stored in the database.
Query Parameters
Comma-separated or array-style buoy IDs (e.g., ids=1,2,3 or ids[]=1&ids[]=2)
Maximum number of buoys to return from the supplied ids list (default: 3, max: 100)
1 <= x <= 100