Getting Started
Quick start guide for the CaneToad API
Getting Started
The CaneToad API provides programmatic access to Australian mining and geological data, including companies, tenements, drillholes, assays, and reports.
1. Get an API Key
Sign in to CaneToad
Go to canetoad.ai and sign in with your account.
Navigate to Settings
Click on your profile and go to Settings → API Tokens.
Create a Token
Click Create Token, give it a name (e.g., "My App"), and copy the token.
Save your token securely! It won't be shown again.
2. Make Your First Request
curl -H "Authorization: Bearer ct_your_token" \
"https://api.canetoad.ai/api/v1/companies?per_page=5"const response = await fetch(
'https://api.canetoad.ai/api/v1/companies?per_page=5',
{
headers: {
'Authorization': 'Bearer ct_your_token'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.canetoad.ai/api/v1/companies',
headers={'Authorization': 'Bearer ct_your_token'},
params={'per_page': 5}
)
data = response.json()
print(data)3. Understanding the Response
All successful responses follow this structure:
{
"data": [
{
"asx_code": "BHP",
"company_name": "BHP Group Limited",
"market_cap_aud": 150000000000,
"gics_sector": "Materials",
"total_tenements": 250,
"is_active": true
}
],
"meta": {
"total": 1500,
"page": 1,
"per_page": 5,
"total_pages": 300
}
}| Field | Description |
|---|---|
data | Array of requested resources |
meta.total | Total number of matching records |
meta.page | Current page number |
meta.per_page | Records per page |
meta.total_pages | Total number of pages |
4. Explore Available Endpoints
Companies
List and search ASX-listed mining companies
Tenements
Query mining tenement data across all states
Reports
Access company announcements and reports
5. Export Data
The API supports multiple output formats for easy integration:
# Default format
curl -H "Authorization: Bearer ct_your_token" \
"https://api.canetoad.ai/api/v1/companies"# CSV for spreadsheets
curl -H "Authorization: Bearer ct_your_token" \
"https://api.canetoad.ai/api/v1/companies?format=csv"# TSV for tab-separated data
curl -H "Authorization: Bearer ct_your_token" \
"https://api.canetoad.ai/api/v1/companies?format=tsv"6. Handle Pagination
For large datasets, use pagination to fetch data in chunks:
async function fetchAllCompanies(token) {
let page = 1;
let allData = [];
while (true) {
const response = await fetch(
`https://api.canetoad.ai/api/v1/companies?page=${page}&per_page=100`,
{ headers: { 'Authorization': `Bearer ${token}` } }
);
const { data, meta } = await response.json();
allData = allData.concat(data);
if (page >= meta.total_pages) break;
page++;
}
return allData;
}