Skip to main content
GET
/
adventures
Paginated adventure search
curl --request GET \
  --url https://api.safarapi.com/api/partner/v1/adventures \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.safarapi.com/api/partner/v1/adventures"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.safarapi.com/api/partner/v1/adventures', 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.safarapi.com/api/partner/v1/adventures",
  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.safarapi.com/api/partner/v1/adventures"

	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.safarapi.com/api/partner/v1/adventures")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.safarapi.com/api/partner/v1/adventures")

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
{ "data": [ { "id": "ad000002-0000-4000-8000-0000000000d2", "slug": "marrakech-3-jours-desert-sandbox", "type": "TRIP", "title": "[DEMO] 3-day Sahara desert circuit from Marrakech", "subtitle": null, "duration": { "days": 3, "hours": 0, "minutes": 0 }, "cover_image_url": "https://placehold.co/600x400?text=DEMO", "destinations": [ "Marrakech" ], "categories": [ "desert" ], "price_from": { "amount": "2400.00", "currency": "MAD" }, "rating": { "average": 4.7, "count": 23 }, "agency": { "id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f", "name": "Sahara Demo Trekking" } } ], "meta": { "count": 1, "next_cursor": null } }

Authorizations

Authorization
string
header
default:sk_test_DEMO0000_replace_with_your_sandbox_key
required

API key authentication. Issued by the Safariat admin or via the partner portal. The secret is shown only once at generation.

Production sk_live_* keys must additionally sign every write request (POST/PUT/DELETE) with the X-Timestamp and X-Signature headers. Sandbox sk_test_* keys are exempt from request signing: X-Signature and X-Timestamp are not required for writes in the sandbox (so the developer-portal "Try it" playground works end to end). The Idempotency-Key header remains required on writes in both environments.

Headers

Accept-Language
enum<string>
default:fr

Language of the returned labels (titles, descriptions, categories).

Available options:
fr,
en,
ar

Query Parameters

query
string

Full-text search on title / description / destination.

Maximum string length: 100
type
enum<string>

Filter on EXPERIENCE (short-duration) or TRIP (multi-day).

  • EXPERIENCE: short adventure (a few hours to 1 day), hourly slots.
  • TRIP: multi-day tour with an itinerary.
Available options:
EXPERIENCE,
TRIP
category_codes
string[]

One or more category codes (e.g. trek, desert, cultural). Repeat the parameter to combine.

destination_locality
string

Free-text locality match (city or area name, e.g. marrakech).

Maximum string length: 100
agency_id
string<uuid>

Restrict results to a single agency.

date_from
string<date>

Availability from this date (inclusive).

date_to
string<date>

Availability up to this date (inclusive).

available_months
string[]

One or more months in YYYY-MM format for flexible monthly availability. Up to 12 entries.

Maximum array length: 12
Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])$
participants
integer

Total number of travelers (adults + children).

Required range: 1 <= x <= 30
price_min
number<double>

Minimum net price per traveler in MAD (inclusive).

Required range: x >= 0
price_max
number<double>

Maximum net price per traveler in MAD (inclusive). Must be greater than or equal to price_min.

Required range: x >= 0
duration_min_hours
integer

Minimum total adventure duration in hours.

Required range: x >= 0
duration_max_hours
integer

Maximum total adventure duration in hours. Must be greater than or equal to duration_min_hours.

Required range: x >= 0
rating_min
integer

Minimum average customer rating (1-5).

Required range: 1 <= x <= 5
lat
number<double>

Latitude of the reference point for geo-proximity search. Required if lng or radius_km is set.

Required range: -90 <= x <= 90
lng
number<double>

Longitude of the reference point. Required if lat or radius_km is set.

Required range: -180 <= x <= 180
radius_km
number<double>

Search radius in kilometers from the reference point. Required if lat or lng is set.

sort
enum<string>
default:rating_desc

Sort order. Default rating_desc (best-rated first). Available options:

  • rating_desc — highest customer rating first
  • price_asc / price_desc — by base price (MAD)
  • created_desc — most recently added first
Available options:
rating_desc,
price_asc,
price_desc,
created_desc
cursor
string

Opaque pagination cursor returned by the previous response in meta.next_cursor. Pass null/omit on the first request; absence of next_cursor in the response signals the last page. Treat the cursor as fully opaque — its format is internal and may evolve.

Keyset pagination (all listing endpoints except /adventures). The cursor is anchored on the last row of the previous page, so results are stable under concurrent writes — no duplicates, no skipped rows when items are inserted between page fetches. Two cursors are not interchangeable across endpoints: a cursor obtained from /reviews will be rejected with 400 on /bookings.

/adventures is offset-based by design (dynamic sort: popularity, price, distance) and will not migrate to keyset. Its cursor cannot be passed to other endpoints.

Behavior change (Phase B): /webhooks/deliveries now sorts by created_at instead of updated_at. The previous sort field is mutable (retry attempts), which is incompatible with the keyset invariant. Use the status filter to surface deliveries currently being retried (status=PENDING,FAILED).

Maximum string length: 256
limit
integer
default:25

Maximum number of items per page.

Required range: 1 <= x <= 100

Response

Page of results

data
object[]
required
meta
object
required