API Documentation

Access our suite of reliable and fast API endpoints for your applications.

Time API

Get the current time in various formats

https://api.c.nf/time
Format: ISO 8601
Response Type: JSON
📅

Timestamp API

Retrieve Unix timestamp for precise timing

https://api.c.nf/timestamp
Format: Unix Timestamp
Response Type: JSON
🌐

IP Address API

Get the client's IP address information

https://api.c.nf/ip
Format: IPv4/IPv6
Response Type: Plain Text
🗺️

IP Geolocation API

Get geographical location data based on IP address

https://api.c.nf/ip-geolocation
Format: Country Code
Response Type: JSON
💱

FX Rate API

Get real-time currency exchange rates with USD as base currency. Note: Currency Base is optional and default in USD if not provided, i.e. https://api.c.nf/fx/rate?base=CNY

https://api.c.nf/fx/rate?base=CNY
Format: Currency Pairs
Response Type: JSON
v1

DNS Management API (v1)

Manage DNS zones and records on c.nf programmatically. Bearer-token auth from /account/api, strict per-user isolation (no cross-user override). Full HTML reference + JSON spec at /v1; endpoints under /v1/dns/zones/...

https://api.c.nf/v1
Format: REST
Response Type: JSON

Getting Started

Public utility endpoints (time, IP, FX rate, etc.) are free and require no authentication.

The DNS Management API (/v1) requires a Bearer token from Account → API keys; tokens are strictly scoped to your own verified zones.

Public endpoint

fetch('https://api.c.nf/time')
  .then(response => response.json())
  .then(data => console.log(data));

Authenticated endpoint (DNS v1)

fetch('https://api.c.nf/v1/dns/zones', {
  headers: { 'Authorization': 'Bearer cnf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' }
})
  .then(r => r.json())
  .then(data => console.log(data));