Duration between two instants
API · /duration-api
Duration API
Work with ISO-8601 durations — the PnYnMnDTnHnMnS strings (P3Y6M4DT12H30M5S, PT1H30M) used across calendars, scheduling, video metadata, billing periods and APIs. Parse a duration into its components and a total in seconds and milliseconds; format a number of seconds (or individual year/month/week/day/hour/minute/second fields) back into a canonical ISO-8601 string; humanise any duration into readable text ("1 hour and 30 minutes"); and measure the exact duration between two instants (ISO timestamps or unix epochs) as both an ISO-8601 string and a precise second count. Years and months use documented calendar averages and are clearly flagged as approximate. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. Distinct from date/time parsing and relative-time ("3 hours ago") formatting.
API health
healthy- Uptime
- 100.00%
- Server probes · 24h
- Avg latency
- 82 ms
- Server probes · 24h
- Subscribers
- 4,689
- active
- Total calls
- 80
- last 7 days
Pricing
Pick a tier — billed monthly, cancel anytime.
Free
Free
- 1,060 calls / month
- 2 requests / second
- Hard cap (429 above quota, no overage)
- 1,060 calls/month
- 2 req/sec
- Parse + format + humanize + between
- No credit card
Starter
€2.60 /month
- 9,100 calls / month
- 8 requests / second
- Hard cap (429 above quota, no overage)
- 9.1k calls/month
- 8 req/sec
- ISO-8601 round-trip
- Email support
Pro
€22.00 /month
- 140,000 calls / month
- 20 requests / second
- Hard cap (429 above quota, no overage)
- 140k calls/month
- 20 req/sec
- Scheduling / billing pipelines
- Priority support
Mega
€58.00 /month
- 720,000 calls / month
- 50 requests / second
- Hard cap (429 above quota, no overage)
- 720k calls/month
- 50 req/sec
- Platform scale
- Dedicated SLA
Built by
Related APIs
Other APIs with overlapping tags.
Bond Pricing API
Fixed-income bond maths as an API, computed locally and deterministically. The price endpoint computes a bond's price from its face value, coupon rate, yield to maturity, years to maturity and coupon frequency — Price = Σ coupon/(1+y)ᵗ + face/(1+y)ⁿ with y the periodic yield — and reports the clean price as a percent of par, the annual coupon, the current yield and whether the bond trades at a premium, discount or par. The yield endpoint inverts this, solving for the yield to maturity that matches a given market price by bisection, with the current yield. The duration endpoint computes the Macaulay duration (the cash-flow-weighted average time), the modified duration (which approximates the percent price change per 1 % yield move), the convexity and the DV01 (the price change per basis point). A zero-coupon bond is just coupon rate 0. Everything is computed locally and deterministically, so it is instant and private. Ideal for fintech, fixed-income, treasury and portfolio app developers, bond-analytics and risk tools, and finance education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is bond analytics; for option pricing use an options API and for NPV and IRR an NPV API.
api.oanor.com/bond-api
DateTime API
A fast, fully-local date and time toolkit (UTC): parse any date string or unix timestamp into ISO, unix and components with the ISO week number, day-of-year and leap-year flag; format dates with custom tokens (YYYY-MM-DD, weekday and month names, and more); add or subtract month-aware durations; compute the difference between two dates in every unit plus a human-readable summary; and convert between unix timestamps and ISO. Every endpoint accepts input via the query string or the request body. Pure server-side compute, no third-party upstream, so responses are instant and always available. Ideal for scheduling, billing periods, reminders, analytics and any date arithmetic. (For the current time in a specific timezone, see the oanor Time API.)
api.oanor.com/datetime-api
Time & Timezone API
Current local date and time for any IANA timezone or geographic coordinate, with UTC offset and daylight-saving (DST) state, plus the full list of 590+ timezones. Resolve a timezone from lat/lon, build world clocks, schedule across regions or stamp events in the right local time.
api.oanor.com/time-api
INI API
Convert between INI configuration files and JSON, in both directions. The parse endpoint reads INI text — sections ([section]), nested sections ([database.replica]), key=value pairs, comments and repeated keys (arrays) — into a clean JSON object; the stringify endpoint turns a JSON object back into a properly formatted INI file. INI is the config format used by Git (.gitconfig), PHP (php.ini), systemd units, desktop entries, tox/setup.cfg, many CLI tools and Windows software. Perfect for editing config programmatically, migrating settings between formats, and reading config in environments that only speak JSON. Pure local computation — no key, no third-party service, instant; send large files via POST. Live, nothing stored. 3 endpoints. Complements the YAML, TOML, CSV and XML converters and is distinct from each.
api.oanor.com/ini-api
Frequently asked questions
Quick answers about pricing, quotas, and integration.
How do I get an API key for Duration API?
What's the rate limit for Duration API?
How much does Duration API cost?
Can I cancel my subscription anytime?
Is Duration API GDPR-compliant?
Pick an endpoint from the list on the left to see its details and try it.
Code snippets
Sign up to get an API key, then call any path under your slug.
curl https://api.oanor.com/duration-api/SOME_PATH \
-H "x-oanor-key: oanor_test_..."
const res = await fetch("https://api.oanor.com/duration-api/SOME_PATH", {
headers: { "x-oanor-key": "oanor_test_..." }
});
const data = await res.json();
$ch = curl_init("https://api.oanor.com/duration-api/SOME_PATH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
$response = curl_exec($ch);
import requests
r = requests.get(
"https://api.oanor.com/duration-api/SOME_PATH",
headers={"x-oanor-key": "oanor_test_..."},
)
print(r.json())
Ratings
Sign in to rate.
No reviews yet.
Discussion
Ask questions, share usage tips, get answers from the provider and other developers. Public — anyone can read.
Sign in to start a thread or reply.
Sign inNew thread
·
-
Provider answer
🔒 This thread is locked — no new replies.
-
·
- No threads yet — start the discussion.
Support
Private 1:1 support with the provider — billing questions, integration issues, account problems. Only you and the provider team can see these threads.
Sign in to open a support ticket.
Sign inOpen new ticket
Describe what you need help with. The provider team gets an email and replies on the ticket page.
-
·
Urgent - No tickets yet for this API.