{"uid":"cap_Dam7zojpq7RsGC6IBwYqQ","slug":"fastx402-lab-date-period-boundaries-c947579e","name":"FastX402 Lab Date Period Boundaries","description":"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.","url":"https://fastx402.tools/date-period?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"],"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"}}}}}}},"responseSchema":{"type":"json","example":{"end":"2026-10-18T23:59:59.999Z","unit":"week","start":"2026-10-12T00:00:00.000Z"}},"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_8U60hm1HXO8TJdsJA3BwR","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":"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.","exampleAgentPrompt":"What are the exact start and end timestamps for the month containing 2025-03-15? Give me the full ISO timestamps.","exampleUseCases":[{"title":"Monthly report date range generation","prompt":"I need to build a report for February 2025 — can you get me the exact start and end timestamps for the month containing 2025-02-10?"},{"title":"Weekly dashboard filter with Sunday start","prompt":"What are the start and end of the week containing 2025-07-22, with weeks starting on Sunday?"},{"title":"Quarterly analytics period lookup","prompt":"Give me the start and end of the quarter that contains the date 2024-11-05, so I can filter my sales data."}],"resultDescription":"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').","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:39:30.629Z","isFirstParty":false,"canonicalSlug":"fastx402-lab-date-period-boundaries-c947579e"}