Get Skill Counts
curl --request GET \
--url https://api.example.com/v1/api/admin/counts \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/v1/api/admin/counts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/v1/api/admin/counts', 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.example.com/v1/api/admin/counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.example.com/v1/api/admin/counts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.example.com/v1/api/admin/counts")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/api/admin/counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"master_skill_count": 8,
"sub_skill_count": 34,
"skill_count": 210
}
{
"message": "Access Denied"
}
Admin
Get Skill Counts
A quick snapshot of how many skills are in the database.
GET
/
api
/
admin
/
counts
Get Skill Counts
curl --request GET \
--url https://api.example.com/v1/api/admin/counts \
--header 'x-api-key: <api-key>'import requests
url = "https://api.example.com/v1/api/admin/counts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.example.com/v1/api/admin/counts', 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.example.com/v1/api/admin/counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.example.com/v1/api/admin/counts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.example.com/v1/api/admin/counts")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/api/admin/counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"master_skill_count": 8,
"sub_skill_count": 34,
"skill_count": 210
}
{
"message": "Access Denied"
}
Returns the total document count for each skill collection — master skills, sub-skills, and individual skills. Useful for verifying that a data import went through or just keeping an eye on how the catalogue is growing.
This is an admin-only route. You’ll need to pass your API key.
Headers
string
required
Your admin API key. Set this via the
ADMIN_API_KEY environment variable on the server.Response
integer
How many top-level skill domains exist
integer
How many sub-skill categories exist across all master skills
integer
How many individual skills are in the catalogue in total
Examples
curl http://localhost:5000/api/admin/counts \
-H "x-api-key: supersecretadminkey123"
const res = await fetch("http://localhost:5000/api/admin/counts", {
headers: { "x-api-key": "supersecretadminkey123" }
});
const counts = await res.json();
console.log(`${counts.skill_count} skills across ${counts.master_skill_count} domains`);
import requests
res = requests.get(
"http://localhost:5000/api/admin/counts",
headers={"x-api-key": "supersecretadminkey123"}
)
print(res.json())
{
"master_skill_count": 8,
"sub_skill_count": 34,
"skill_count": 210
}
{
"message": "Access Denied"
}
Don’t use your real
ADMIN_API_KEY value in client-side code or paste it into public chat logs. Treat it like a password.⌘I

