Wavely API Reference
Integration documentation and examples for multiple environments.
Authentication
Authenticate your HTTP requests by passing your API key in the header configuration:
X-API-Key: wv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Note: Alternatively, you can pass the key in the URL query parameters using ?api_key=wv_xxxx, although headers are highly recommended.
Sample Search
/api/searchSearch samples from the Splice catalog using query, key, BPM, and instrument categories.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
q * |
string | Text query string (e.g. synth lead, deep bass) |
category |
string | Sample categories (e.g. loop, oneshot) |
bpm |
integer | Exact BPM matching |
key |
string | Audio musical key matching (e.g. Cmin, Gmaj) |
type |
string | Set to preset for synth preset searches |
import requests
url = "https://wavely.lol/api/search"
headers = {"X-API-Key": "wv_YOUR_API_KEY"}
params = {
"q": "synth lead",
"category": "loop",
"key": "Cmin"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
const fetch = require('node-fetch');
const url = new URL('https://wavely.lol/api/search');
url.searchParams.append('q', 'synth lead');
url.searchParams.append('key', 'Cmin');
fetch(url, {
headers: { 'X-API-Key': 'wv_YOUR_API_KEY' }
})
.then(res => res.json())
.then(data => console.log(data));
curl -H "X-API-Key: wv_YOUR_API_KEY" \
"https://wavely.lol/api/search?q=synth+lead&key=Cmin"
Sample Metadata
/api/sample/<uuid>Retrieve single sample info, tags, packs, BPM, and preview links by UUID.
import requests
uuid = "085bd422-bf47-4144-9c9d-a74ee502c368"
url = f"https://wavely.lol/api/sample/{uuid}"
headers = {"X-API-Key": "wv_YOUR_API_KEY"}
response = requests.get(url, headers=headers)
print(response.json())
const fetch = require('node-fetch');
const uuid = '085bd422-bf47-4144-9c9d-a74ee502c368';
fetch(`https://wavely.lol/api/sample/${uuid}`, {
headers: { 'X-API-Key': 'wv_YOUR_API_KEY' }
})
.then(res => res.json())
.then(data => console.log(data));
curl -H "X-API-Key: wv_YOUR_API_KEY" \
"https://wavely.lol/api/sample/085bd422-bf47-4144-9c9d-a74ee502c368"
Descramble Audio
/api/decrypted-audio/<uuid>Stream or download decrypted audio preview files directly. Splice's dual-block XOR security algorithm is automatically parsed on the fly in memory.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
format |
string | mp3 |
The output file format. Allowed values: mp3, wav. WAV format provides raw PCM transcoding. |
import requests
uuid = "085bd422-bf47-4144-9c9d-a74ee502c368"
# Request as WAV format
url = f"https://wavely.lol/api/decrypted-audio/{uuid}?format=wav"
headers = {"X-API-Key": "wv_YOUR_API_KEY"}
response = requests.get(url, headers=headers)
with open("decrypted_sample.wav", "wb") as f:
f.write(response.content)
print("Saved decrypted WAV sample successfully!")
const fetch = require('node-fetch');
const fs = require('fs');
const uuid = '085bd422-bf47-4144-9c9d-a74ee502c368';
fetch(`https://wavely.lol/api/decrypted-audio/${uuid}?format=mp3`, {
headers: { 'X-API-Key': 'wv_YOUR_API_KEY' }
})
.then(res => res.buffer())
.then(buffer => {
fs.writeFileSync('decrypted_sample.mp3', buffer);
console.log('Saved decrypted MP3 sample!');
});
curl -H "X-API-Key: wv_YOUR_API_KEY" \
"https://wavely.lol/api/decrypted-audio/085bd422-bf47-4144-9c9d-a74ee502c368?format=wav" \
-o sample.wav
Guide: Scrape Search Counts
Learn how to query the search API, parse the results, and inspect the total number of matched samples from the Splice catalog catalogued for query pagination.
import requests
url = "https://wavely.lol/api/search"
headers = {"X-API-Key": "wv_YOUR_API_KEY"}
params = {
"q": "Synth lead",
"category": "loop"
}
# 1. Fetch Search Results
response = requests.get(url, headers=headers, params=params)
data = response.json()
# 2. Extract Count & Results
total_found = data.get("count", 0)
samples = data.get("results", [])
print(f"Total samples found: {total_found}")
for i, sample in enumerate(samples[:5]):
print(f"[{i+1}] {sample['name']} | BPM: {sample['bpm']} | Key: {sample['key']}")
Guide: Download & Stream Audio
This guide covers how to stream decrypted audio previews dynamically inside browser elements or download files directly onto your disk storage.
1. Web Streaming (HTML5 Audio Player)
To stream real-time decrypted audio directly inside a client web application, set the source URL of an HTML5 <audio> element to the decryption API endpoint, passing your key in the query string:
<audio controls>
<source src="https://wavely.lol/api/decrypted-audio/085bd422-bf47-4144-9c9d-a74ee502c368?api_key=wv_YOUR_API_KEY" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
2. Dynamic Chunk Streaming (Node.js)
For script integrations, stream the file in chunks rather than buffering everything in memory to ensure low resource usage:
const http = require('http');
const fs = require('fs');
const url = 'https://wavely.lol/api/decrypted-audio/085bd422-bf47-4144-9c9d-a74ee502c368?format=wav';
const options = {
headers: { 'X-API-Key': 'wv_YOUR_API_KEY' }
};
http.get(url, options, (res) => {
if (res.statusCode !== 200) {
console.error(`Request Failed. Status: ${res.statusCode}`);
return;
}
const fileStream = fs.createWriteStream('sample.wav');
res.pipe(fileStream);
fileStream.on('finish', () => {
fileStream.close();
console.log('Download complete!');
});
});