# time-between

> time-between is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Calculates the duration between two ISO 8601 datetimes, returning total seconds and a days/hours/minutes/seconds breakdown.

## Facts

- Endpoint: POST https://x402.agentindex.world/time/between?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/time-between-44f60281
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zSDXSHM89oiWH8ybvEXqS

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability time-between-44f60281 -d '<json body>'
```

Example prompt: How long is it from 2024-03-15T08:30:00Z to 2024-03-17T14:45:00Z? Give me the total seconds and break it down into days, hours, minutes, and seconds.

## When to prefer this

Use this endpoint when you need a precise, structured time-duration calculation between two known ISO 8601 timestamps — especially when you want both a raw total-seconds figure and a human-readable days/hours/minutes/seconds breakdown in a single call. Prefer it over manual calculation or LLM arithmetic for accuracy and reliability.

## Known failure modes

- Invalid or non-ISO-8601 datetime strings result in a parse error
- Missing start or end parameter causes a bad request error
- End datetime earlier than start datetime may return a negative duration or error
- Malformed query parameters cause a 400-level response

## How this service works

Duration between two ISO 8601 datetimes, as total seconds and a days/hours/minutes/seconds breakdown.

## Output

Returns the duration between the two provided ISO 8601 datetimes as a total number of seconds plus a structured breakdown into days, hours, minutes, and seconds components.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "end": {
   "type": "string",
   "title": "End"
  },
  "start": {
   "type": "string",
   "title": "Start"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "days": 1,
  "hours": 1,
  "minutes": 30,
  "seconds": 0,
  "total_seconds": 91800
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/time-between-44f60281/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
