# FastX402 Lab Date Period Boundaries

> FastX402 Lab Date Period Boundaries is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-17).

Returns the start and end timestamps of the day, week, month, quarter, or year that contains a given date, with a configurable week start day.

## Facts

- Endpoint: GET https://fastx402.tools/date-period?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-lab-date-period-boundaries-c947579e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Dam7zojpq7RsGC6IBwYqQ

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 fastx402-lab-date-period-boundaries-c947579e
```

Example prompt: What are the exact start and end timestamps for the month containing 2025-03-15? Give me the full ISO timestamps.

## When to prefer this

Use this endpoint when you need precise ISO timestamp boundaries for a calendar period (day, week, month, quarter, or year) containing a specific date — especially for building report date ranges, dashboard filters, or analytics queries. It is particularly valuable when you need configurable week start days (e.g. Sunday vs Monday). Prefer this over manual date arithmetic to avoid off-by-one errors at period boundaries.

## Known failure modes

- Invalid or missing 'date' parameter returns an error — must be a valid ISO 8601 date or date-time string
- Invalid 'unit' value (not one of day/week/month/quarter/year) returns a validation error
- Invalid 'week_starts_on' value (outside 0–6) returns an error
- Malformed query parameters result in a 400-level response

## How this service works

146 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object with three fields: 'start' (ISO 8601 timestamp for the first instant of the period, e.g. '2026-10-12T00:00:00.000Z'), 'end' (ISO 8601 timestamp for the last instant of the period, e.g. '2026-10-18T23:59:59.999Z'), and 'unit' (the requested granularity such as 'week').

## Request schema (JSON Schema)

```json
{
 "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",
     "required": [
      "date",
      "unit"
     ],
     "properties": {
      "date": {
       "type": "string",
       "description": "ISO 8601 date or date-time"
      },
      "unit": {
       "enum": [
        "day",
        "week",
        "month",
        "quarter",
        "year"
       ],
       "type": "string",
       "description": "day, week, month, quarter or year"
      },
      "week_starts_on": {
       "type": "string",
       "description": "First day of the week, 0 = Sunday ... 6 (default 1, Monday)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "end": {
       "type": "string"
      },
      "unit": {
       "type": "string"
      },
      "start": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "end": "2026-10-18T23:59:59.999Z",
  "unit": "week",
  "start": "2026-10-12T00:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-lab-date-period-boundaries-c947579e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
