API documentation

Use reliable, low-latency endpoints in your applications.

Time API

Get the current time in several formats.

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

Timestamp API

Get the current Unix timestamp for precise timing.

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

IP address API

Get the requesting client’s IP address.

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

IP geolocation API

Get approximate location data for an IP address.

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

Exchange-rate API

Get current currency exchange rates. The base currency is optional and defaults to USD.

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

DNS Management API (v1)

Manage c.nf DNS zones and records with Bearer-token authentication and strict per-user isolation.

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

Getting started

Public utility endpoints such as time, IP address and exchange rates are free and require no authentication.

The DNS Management API at /v1 requires a Bearer token from Account → API keys. A token can access only its owner’s verified zones.

Public endpoint

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

Authenticated DNS v1 endpoint

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