Search
curl --request GET \
--url https://api.marzipan.co/v1/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.marzipan.co/v1/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.marzipan.co/v1/search', 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.marzipan.co/v1/search",
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.marzipan.co/v1/search"
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.marzipan.co/v1/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.marzipan.co/v1/search")
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{
"query": "signature",
"totalResults": 3,
"results": {
"products": [
{
"id": "2e2805a1-738e-4118-8a8b-f9431f0e210c",
"type": "product",
"title": "Signature Selection",
"slug": "signature-selection",
"url": "https://api.marzipan.co/products/signature-selection",
"excerpt": "Our premium signature product, made in small batches",
"image": {
"id": "0736c529-a33d-4b8c-8126-eb69779dcdad",
"path": "1/0736c529-a33d-4b8c-8126-eb69779dcdad.jpg",
"src": "https://marzipan-cloud-dev.b-cdn.net/1/0736c529-a33d-4b8c-8126-eb69779dcdad.jpg",
"alt": "Signature Selection product photo",
"mimeType": "image/jpeg",
"filename": "0736c529-a33d-4b8c-8126-eb69779dcdad.jpg"
},
"price": "£24.99",
"status": "active"
}
],
"pages": [
{
"id": "page-buying-guide",
"type": "page",
"title": "Signature Buying Guide",
"slug": "signature-buying-guide",
"url": "https://api.marzipan.co/pages/signature-buying-guide",
"excerpt": "Learn about our signature range, how it is made, and how to get the most from it",
"image": null,
"price": null,
"status": "published"
}
],
"collections": [
{
"id": "885ea507-690b-4598-a8fc-095c0528be24",
"type": "collection",
"title": "Featured Collection",
"slug": "featured",
"url": "https://api.marzipan.co/collections/featured",
"excerpt": "Our carefully curated selection of premium featured products",
"image": {
"id": "1b978a90-3ecb-4f37-b480-9fb81882176e",
"src": "https://marzipan-cloud-dev.b-cdn.net/1/1b978a90-3ecb-4f37-b480-9fb81882176e.jpg",
"alt": "Featured collection"
},
"price": null,
"status": "active"
}
],
"events": [],
"subscriptionPackages": []
}
}{
"message": "string"
}Search
Search
Search across products, pages, and other content using a query string. Returns relevant results based on the search term.
GET
/
search
Search
curl --request GET \
--url https://api.marzipan.co/v1/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.marzipan.co/v1/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.marzipan.co/v1/search', 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.marzipan.co/v1/search",
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.marzipan.co/v1/search"
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.marzipan.co/v1/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.marzipan.co/v1/search")
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{
"query": "signature",
"totalResults": 3,
"results": {
"products": [
{
"id": "2e2805a1-738e-4118-8a8b-f9431f0e210c",
"type": "product",
"title": "Signature Selection",
"slug": "signature-selection",
"url": "https://api.marzipan.co/products/signature-selection",
"excerpt": "Our premium signature product, made in small batches",
"image": {
"id": "0736c529-a33d-4b8c-8126-eb69779dcdad",
"path": "1/0736c529-a33d-4b8c-8126-eb69779dcdad.jpg",
"src": "https://marzipan-cloud-dev.b-cdn.net/1/0736c529-a33d-4b8c-8126-eb69779dcdad.jpg",
"alt": "Signature Selection product photo",
"mimeType": "image/jpeg",
"filename": "0736c529-a33d-4b8c-8126-eb69779dcdad.jpg"
},
"price": "£24.99",
"status": "active"
}
],
"pages": [
{
"id": "page-buying-guide",
"type": "page",
"title": "Signature Buying Guide",
"slug": "signature-buying-guide",
"url": "https://api.marzipan.co/pages/signature-buying-guide",
"excerpt": "Learn about our signature range, how it is made, and how to get the most from it",
"image": null,
"price": null,
"status": "published"
}
],
"collections": [
{
"id": "885ea507-690b-4598-a8fc-095c0528be24",
"type": "collection",
"title": "Featured Collection",
"slug": "featured",
"url": "https://api.marzipan.co/collections/featured",
"excerpt": "Our carefully curated selection of premium featured products",
"image": {
"id": "1b978a90-3ecb-4f37-b480-9fb81882176e",
"src": "https://marzipan-cloud-dev.b-cdn.net/1/1b978a90-3ecb-4f37-b480-9fb81882176e.jpg",
"alt": "Featured collection"
},
"price": null,
"status": "active"
}
],
"events": [],
"subscriptionPackages": []
}
}{
"message": "string"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your API token.
Query Parameters
Search term to find matching content
Minimum string length:
1Filter results by content type. If not specified, searches all types
Available options:
products, pages, collections, events, subscription_packages Maximum number of results to return per type
Required range:
1 <= x <= 50⌘I

