{"uid":"cap_KrW1_br7PE9ZU6Pxqtkty","slug":"datetime-diff-tool-time-difference-calculator-45da1648","name":"Datetime Diff Tool (Time Difference Calculator)","description":"Pay-per-call API for AI agents: turn any public web page or PDF into clean, LLM-ready Markdown. $0.002 per call in USDC on Base via x402. No API key, no signup.","url":"https://lin-desk-x402.lindesk.workers.dev/v1/timetools/diff?utm_source=zero.xyz","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["input"],"properties":{"a":{"type":"string"},"b":{"type":"string"},"input":{"type":"string","description":"Datetime / unix / ISO string (empty for diff with a,b)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"op":{"type":"string"},"meta":{"type":"object","properties":{"chars_in":{"type":"integer"},"chars_out":{"type":"integer"},"elapsed_ms":{"type":"integer"}}},"result":{}}}}}}},"responseSchema":{"type":"json","example":{"op":"diff","meta":{"chars_in":0,"chars_out":32,"elapsed_ms":0},"result":{"days":2.5,"seconds":216000}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Uxb5H1FXja0ZNpc4K6eZ5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the difference between two datetime values, returning the result in days and seconds","exampleAgentPrompt":"What's the difference between January 15, 2024 and March 28, 2024 — how many days and seconds apart are they?","exampleUseCases":[{"title":"Days between two project milestones","prompt":"How many days and seconds are between 2024-06-01T00:00:00Z and 2024-09-15T00:00:00Z? I need the exact time gap for a project timeline."},{"title":"Time elapsed since a past event","prompt":"How long has it been since 2023-11-01T08:30:00Z compared to today, 2024-03-20T08:30:00Z? Give me the difference in days and seconds."},{"title":"Countdown to a future deadline","prompt":"How many days and seconds are between right now (2024-07-01T12:00:00Z) and my deadline on 2024-12-31T23:59:59Z?"}],"resultDescription":"A JSON object with the operation name ('diff'), metadata including input/output character counts and elapsed milliseconds, and a result object containing the time difference expressed as decimal days and total seconds.","failureModes":["Missing required 'input' query parameter returns an error","Malformed or unparseable datetime strings may cause computation failure","Non-GET HTTP methods are rejected (only GET is supported)","Payment not sent or insufficient USDC triggers a 402 Payment Required response","Providing only one datetime without both 'a' and 'b' may return an unexpected result"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-call computation of the time difference between two datetimes without managing API keys or subscriptions. It is ideal for AI agents that need lightweight date arithmetic as part of a larger workflow, especially in environments that support x402 micropayments on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T00:45:23.999Z","isFirstParty":false,"canonicalSlug":"datetime-diff-tool-time-difference-calculator-45da1648"}