On this page
Code examples
Minimal patterns for authenticated GETs. Replace the base URL and key for your environment.
cURL
# Set YOUR_API_KEY to your portal API key (server-side only)
curl -s -H "x-api-key: YOUR_API_KEY" \
"https://api.crunchclash.com/v1/seasons/current"
JavaScript (fetch)
const API_KEY = "YOUR_API_KEY";
const res = await fetch("https://api.crunchclash.com/v1/performance/players?season=2026&metrics=goals&take=5", {
headers: { "x-api-key": API_KEY },
});
const json = await res.json();
if (!res.ok) throw new Error(json.error?.message ?? res.statusText);
console.log(json.data);
Python (requests)
import requests
API_KEY = "YOUR_API_KEY"
r = requests.get(
"https://api.crunchclash.com/v1/league-table",
headers={"x-api-key": API_KEY},
params={"season": "2026"},
)
r.raise_for_status()
print(r.json()["data"])
Query DSL (POST)
curl -s -X POST -H "x-api-key: YOUR_API_KEY" -H "content-type: application/json" \
-d '{"entity":"player","season":"2026","metrics":["goals","minutes"],"limit":5}' \
https://api.crunchclash.com/v1/query
Use the Playground codegen tabs to copy curl / JS / Python for any registered endpoint after filling parameters.
Related: API Reference · Playground