curl -H "X-API-Key: your_api_key_here" \
"https://api.northaxiumdata.ca/api/v1/contracts/stats?group_by=department&department=National%20Defence&limit=10"
import requests
headers = {"X-API-Key": "your_api_key_here"}
params = {
"group_by": "department",
"department": "National Defence",
"limit": 10
}
response = requests.get(
"https://api.northaxiumdata.ca/api/v1/contracts/stats",
headers=headers,
params=params
)
print(response.json())
{
"data": [
{
"group_by": "department",
"group_value": "National Defence | Défense nationale",
"record_count": 18432,
"sum_field": "value",
"sum_value": 4821034521.00
},
{
"group_by": "department",
"group_value": "Public Services and Procurement Canada | Services publics et Approvisionnement Canada",
"record_count": 12891,
"sum_field": "value",
"sum_value": 3109823400.00
}
],
"meta": {
"total": 482,
"limit": 10,
"offset": 0
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "group_by must be one of: department, vendor, year."
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API key. Pass your key in the X-API-Key header."
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Monthly request limit exceeded. Upgrade your plan for higher limits."
}
}
Contracts
Contract Stats
Aggregated contract statistics grouped by department, vendor, or year.
GET
/
api
/
v1
/
contracts
/
stats
curl -H "X-API-Key: your_api_key_here" \
"https://api.northaxiumdata.ca/api/v1/contracts/stats?group_by=department&department=National%20Defence&limit=10"
import requests
headers = {"X-API-Key": "your_api_key_here"}
params = {
"group_by": "department",
"department": "National Defence",
"limit": 10
}
response = requests.get(
"https://api.northaxiumdata.ca/api/v1/contracts/stats",
headers=headers,
params=params
)
print(response.json())
{
"data": [
{
"group_by": "department",
"group_value": "National Defence | Défense nationale",
"record_count": 18432,
"sum_field": "value",
"sum_value": 4821034521.00
},
{
"group_by": "department",
"group_value": "Public Services and Procurement Canada | Services publics et Approvisionnement Canada",
"record_count": 12891,
"sum_field": "value",
"sum_value": 3109823400.00
}
],
"meta": {
"total": 482,
"limit": 10,
"offset": 0
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "group_by must be one of: department, vendor, year."
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API key. Pass your key in the X-API-Key header."
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Monthly request limit exceeded. Upgrade your plan for higher limits."
}
}
Overview
Returns grouped aggregate statistics across all federal contract records. Useful for spending breakdowns by department, vendor rankings by total value, or year-over-year procurement trends.Query Parameters
string
Grouping dimension. Options:
department, vendor, year. Default: department. Example: vendor.string
Only
value. Default: value. Example: amount.string
Partial match on vendor name. Example:
Palantir.string
Partial match on department name. Example:
National Defence.string
Exact match on
procurement_method. Example: Non-competitive.string
Exact match on
source_dataset. Example: open.canada.number
Minimum contract value. Example:
100000.number
Maximum contract value. Example:
5000000.string
ISO 8601 start date. Example:
2023-01-01.string
ISO 8601 end date. Example:
2023-12-31.integer
Max groups to return. Default:
100. Max: 200. Example: 25.integer
Result offset. Default:
0. Example: 50.curl -H "X-API-Key: your_api_key_here" \
"https://api.northaxiumdata.ca/api/v1/contracts/stats?group_by=department&department=National%20Defence&limit=10"
import requests
headers = {"X-API-Key": "your_api_key_here"}
params = {
"group_by": "department",
"department": "National Defence",
"limit": 10
}
response = requests.get(
"https://api.northaxiumdata.ca/api/v1/contracts/stats",
headers=headers,
params=params
)
print(response.json())
{
"data": [
{
"group_by": "department",
"group_value": "National Defence | Défense nationale",
"record_count": 18432,
"sum_field": "value",
"sum_value": 4821034521.00
},
{
"group_by": "department",
"group_value": "Public Services and Procurement Canada | Services publics et Approvisionnement Canada",
"record_count": 12891,
"sum_field": "value",
"sum_value": 3109823400.00
}
],
"meta": {
"total": 482,
"limit": 10,
"offset": 0
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "group_by must be one of: department, vendor, year."
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API key. Pass your key in the X-API-Key header."
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Monthly request limit exceeded. Upgrade your plan for higher limits."
}
}