{"uid":"cap_7L6G-S5NO4usg8kVRMbQr","slug":"torii-japanese-wareki-era-date-converter-31480d21","name":"Torii Japanese Wareki (Era) Date Converter","description":"Pay-per-call HTTP APIs for Japanese public data, metered with x402 (HTTP 402 + PAYMENT-SIGNATURE). Send a plain GET to receive 402 with the price and payment requirements, then resend the request with a signed payment. Only 2xx responses are charged; 4xx and 5xx are free. Per-operation payment metadata is published under the `x-payment-info` extension.","url":"https://torii-gateway-production.ichis-lab.workers.dev/v1/jp-biz-calendar/wareki?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"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Date to convert, in YYYY-MM-DD (UTC). Must be between 1873-01-01 (when Japan adopted the Gregorian calendar) and 2100-12-31; dates outside that range return 400, uncharged."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"data":{"era":"令和","date":"2026-01-05","text":"令和8年","year":8},"meta":{"stale":false,"source_id":"jp-biz-calendar","terms_url":"https://www.cao.go.jp/notice/rule.html","fetched_at":"2026-09-21T03:00:00.000Z","license_id":"PDL-1.0","attribution":"出典:内閣府ウェブサイト(https://www8.cao.go.jp/chosei/shukujitsu/gaiyou.html)を加工して作成","source_name":"内閣府「国民の祝日について」","freshness_class":"static"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SSvsePJIYwlmlWxztgul2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a Gregorian date (YYYY-MM-DD) to its Japanese imperial era (wareki) representation, returning the era name, year number, and formatted text.","exampleAgentPrompt":"What is the Japanese wareki era name and year for 2025-11-03? I need the 令和 year number and the formatted Japanese text.","exampleUseCases":[{"title":"Japanese document date formatting","prompt":"I'm filling out a Japanese government form that needs the date in wareki format — can you convert 2024-06-15 to its Japanese imperial era name and year number?"},{"title":"Historical era identification","prompt":"My colleague mentioned a date written as 平成 but I only know it as 1998-07-20 in western format — what Japanese era and year does that correspond to?"},{"title":"Automated invoice localization","prompt":"For our Japanese customers we need to display invoice dates in wareki format. What is the Japanese era name and year for 2023-04-01?"}],"resultDescription":"Returns a JSON object with: the era name in kanji (e.g. '令和'), the input date in YYYY-MM-DD, a formatted Japanese year string (e.g. '令和8年'), the numeric year within that era, plus metadata including data source, license (PDL-1.0), freshness class, and attribution to the Cabinet Office of Japan.","failureModes":["Date outside the supported range (before 1873-01-01 or after 2100-12-31) returns HTTP 400 at no charge","Malformed date string not matching YYYY-MM-DD pattern returns HTTP 400 at no charge","Payment not provided or invalid signature returns HTTP 402 with price and payment requirements","Server errors return HTTP 5xx at no charge","Missing required 'date' query parameter returns HTTP 400"],"whenToPreferThis":"Choose this endpoint when you need an authoritative, government-sourced wareki conversion for a single specific date, especially for Japanese legal documents, invoices, or localization workflows. It is more reliable than hardcoded era tables because it covers edge cases (e.g. era transitions) using Cabinet Office data. At $0.01 USDC per call it is cost-effective for low-to-medium volume lookups; for high-volume batch conversion consider caching results since the data is static.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T06:42:44.303Z","isFirstParty":false,"canonicalSlug":"torii-japanese-wareki-era-date-converter-31480d21"}