Relative Time Formatter API
Relative Time Formatter is a tool for converting timestamps and dates to human-readable relative time formats like '2 hours ago' or 'in 3 days'. It supports multiple styles and custom reference times for flexible time representation.
Live Test API
Try out the Relative Time Formatter with a live request and see the response in real-time.
API Request
API Response
12345678910111213141516171819202122232425{ "status": "ok", "error": null, "data": { "target_date": "2021-01-01T00:00:00Z", "reference_date": "2025-12-16T22:28:24.459Z", "relative_time": "4 years ago", "is_past": true, "is_future": false, "difference_ms": -156464904459, "primary_unit": "year", "primary_value": 4, "all_units": { "years": 4, "months": 59, "weeks": 258, "days": 1810, "hours": 43462, "minutes": 2607748, "seconds": 156464904, "milliseconds": 156464904459 }, "style": "short" } }
Multiple Access Methods
REST API with multiple response formats, GraphQL, and MCP for AI agents
View all integrationsJSON
JavaScript Object Notation
XML
Extensible Markup Language
YAML
Human-readable data format
CSV
Comma-separated values
GraphQL
Query language for APIs
MCP
AI agent integration
Skip the HTTP calls. Use our official packages
Integrate faster with type-safe SDKs and comprehensive documentation
View all integrationsRelated APIs
Explore other data conversion APIs that complement the Relative Time Formatter
Frequently Asked Questions
Get answers to common questions about the Relative Time Formatter API
What does the Relative Time Formatter API do?
Relative Time Formatter is a tool for converting timestamps and dates to human-readable relative time formats like '2 hours ago' or 'in 3 days'. It supports multiple styles and custom reference times for flexible time representation. The API returns structured data in JSON, XML, or YAML format, making it easy to integrate into any application or workflow.
How fast is the Relative Time Formatter API?
The Relative Time Formatter API has an average response time of 176ms, with a median (p50) of 170ms and 99th percentile of 218ms. Our infrastructure maintains 99.9% uptime with servers distributed globally for low latency.
How much does the Relative Time Formatter API cost?
Each call to the Relative Time Formatter API uses 1 credit. The free tier includes 100 credits per month. Paid plans start at $29.99/month with higher limits, and enterprise plans offer custom pricing with priority support.
How do I authenticate Relative Time Formatter API requests?
Include your API key in the request header as X-API-Key: your_key_here. All requests are made over HTTPS for security. You can get your API key by signing up for a free account.
What HTTP methods does Relative Time Formatter support?
The Relative Time Formatter API supports GET requests. Simply pass your parameters as query strings in the URL. Check our documentation for detailed parameter specifications.
Ready to integrate Relative Time Formatter API?
Join thousands of developers building amazing applications with reliable API data. Get started with your free API key today.