{"uid":"cap_gC-XwW538hLIZAut4lwjM","slug":"api-x402node-dev-607e65a6","name":"Duration Calculator – Time Difference & Elapsed Time","description":"Duration calculator, time difference, elapsed time, days between dates, hours between times, age calculator, how long ago, countdown, time span. Compute the duration between two timestamps with human-readable breakdown (years, months, days, hours, minutes, seconds). Accepts payment on Base or Solana — either network works.","url":"https://api.x402node.dev/time/duration","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"end":{"type":"string","description":"End (optional)"},"start":{"type":"string","description":"Start (optional)"}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0022","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0022/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0022","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0022","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VbGIK1CzSSFgvlIYe8ezF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0022","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the duration between two timestamps, returning a human-readable breakdown of years, months, days, hours, minutes, and seconds.","exampleAgentPrompt":"How long is it from January 15, 2000 at 9:00 AM to March 22, 2024 at 6:30 PM — give me the breakdown in years, months, days, hours, minutes, and seconds?","exampleUseCases":null,"resultDescription":"A structured, human-readable breakdown of the duration between the two provided timestamps, split into component parts: years, months, days, hours, minutes, and seconds.","failureModes":["Invalid or unparseable timestamp format returns an error","End timestamp earlier than start timestamp may return zero or negative duration","Missing required start or end timestamp returns a 400-level error","Malformed JSON body results in a parse error","Timestamps in unsupported timezone formats may cause incorrect calculations"],"whenToPreferThis":"Use this endpoint when you need a precise, multi-unit human-readable breakdown of the time span between two specific timestamps — especially when you need all components (years through seconds) rather than just total seconds or days. Ideal for age calculators, event duration displays, countdowns, and elapsed-time reporting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:04:05.245Z","isFirstParty":false}