curl Examples
These examples use curl for HTTP requests and jq for JSON processing.
Fetch and explore
# Get the dataset catalog
curl -s https://api.datafornerds.io/v2/index.json | jq '.datasets[].name'
# Fetch a dataset and count records
curl -s https://api.datafornerds.io/v2/microsoft/language-codes.json | jq '.metadata.recordCount'
# View metadata only
curl -s https://api.datafornerds.io/v2/microsoft/windows-update-history.json | jq '.metadata'
Filter and transform
# Latest 5 Windows 11 standard updates
curl -s https://api.datafornerds.io/v2/microsoft/windows-11-update-history.json \
| jq '[.data[] | select(.ReleaseType == "Standard")]
| sort_by(.ReleaseDate) | reverse | .[:5]
| .[] | {date: .ReleaseDate, kb: .KBNumber, build: .OSBuild}'
# All M365 Apps channels and their latest versions
curl -s https://api.datafornerds.io/v2/microsoft/m365-apps-update-history.json \
| jq '[.data | group_by(.ChannelName)[]
| {channel: .[0].ChannelName, latest: (sort_by(.ReleaseDate) | last | .Build)}]'
# Find a specific language code
curl -s https://api.datafornerds.io/v2/microsoft/language-codes.json \
| jq '.data[] | select(.BCP47 == "en-US")'
Check response headers
# View cache and ETag headers (HEAD request, no body)
curl -s -I https://api.datafornerds.io/v2/microsoft/language-codes.json
# Check the linked JSON Schema
curl -s -I https://api.datafornerds.io/v2/microsoft/language-codes.json \
| grep -i link
Conditional request with ETag
# Save the ETag from a first request
ETAG=$(curl -s -D- https://api.datafornerds.io/v2/microsoft/language-codes.json -o /dev/null \
| grep -i etag | tr -d '\r' | awk '{print $2}')
echo "ETag: $ETAG"
# Use it on the next request - returns 304 if unchanged
curl -s -o /dev/null -w "HTTP %{http_code}\n" \
-H "If-None-Match: $ETAG" \
https://api.datafornerds.io/v2/microsoft/language-codes.json
Export to CSV
# Convert JSON to CSV using jq
curl -s https://api.datafornerds.io/v2/microsoft/language-codes.json \
| jq -r '.data[] | [.LanguageCode, .Description, .BCP47] | @csv' \
> language-codes.csv