{"uid":"cap_2Ej1fBRIhqFSPPEx0-Df2","slug":"date-math-stay-limit-calculator-schengen-rolling-window-30ad041a","name":"Date Math Stay-Limit Calculator (Schengen / Rolling Window)","description":"Date Math: Rolling stay-limit math such as the Schengen 90/180 rule: days used in the window, days left, overstay check, the longest stay allowed from a planned entry date, and the next date a full stay is possible. Entry and exit days both count. Custom rules via max_days/window_days. Use for travel planning, visa-free stays and \"can I enter on\".","url":"https://date-math.datemath.workers.dev/v1/stay?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"date":{"type":"string","example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"entry":{"type":"string","example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"trips":{"type":"array","items":{"type":"object","required":["entry","exit"],"properties":{"exit":{"type":"string","example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"entry":{"type":"string","example":"2026-11-07","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}},"maxItems":200,"description":"Past and planned stays. Entry and exit days both count as days present."},"max_days":{"type":"integer","default":90,"maximum":365,"minimum":1},"window_days":{"type":"integer","default":180,"maximum":730,"minimum":1,"description":"Length of the rolling window, counted back from each day (inclusive)"}}},"responseSchema":{"type":"json","example":{"date":"2026-10-01","note":"Entry and exit days both count. A planning aid; border officials and the official calculator have the final say.","rule":{"max_days":90,"window_end":"2026-10-01","window_days":180,"window_start":"2026-04-05"},"max_stay":{"entry":"2026-11-01","latest_exit":"2026-11-24","days_allowed":24},"days_used":66,"in_compliance":true,"overstay_days":0,"days_remaining":24,"first_overstay":null,"next_full_stay_date":"2026-12-30"}},"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_RAhoNOrje1oleMy2ZifC8","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":"Computes rolling-window stay compliance (e.g. Schengen 90/180 rule): days used, days remaining, overstay check, max stay from a planned entry date, and next date a full stay is possible.","exampleAgentPrompt":"I've been in the Schengen zone on these trips this year: Jan 5–Jan 20, Mar 1–Mar 30, and May 10–Jun 15. I'm planning to enter again on November 1, 2026 — how many days can I stay, am I compliant, and when could I next do a full 90-day stay?","exampleUseCases":[{"title":"Schengen compliance check before travel","prompt":"Here are all my Schengen entries and exits this year. I want to fly in on December 10, 2026 — am I allowed to enter, how many days do I have left in the 180-day window, and would I be overstaying?"},{"title":"Digital nomad re-entry planning","prompt":"I've used 75 Schengen days already this rolling period. When is the next date I can enter and do a full 90-day stay without overstaying the 90/180 rule?"},{"title":"Custom visa rule calculation","prompt":"I'm visiting a country with a 60-day max in any 120-day rolling window. I stayed March 1–March 31 and April 15–May 10. I want to enter again on July 1, 2026 — how many days can I stay and am I compliant?"}],"resultDescription":"A JSON object with: the reference date, days used in the rolling window, days remaining, whether the traveler is in compliance, any overstay days, the first overstay date (if applicable), the max stay allowed from a planned entry date (with latest exit date and days allowed), and the next date on which a full max-days stay would be possible. Also echoes back the rule parameters (max_days, window_days, window start/end).","failureModes":["Invalid date format (must be YYYY-MM-DD) returns a validation error","Overlapping or out-of-order trip entries may produce unexpected results","More than 200 trip records in the trips array will be rejected","window_days or max_days outside allowed bounds (1–730 / 1–365) returns an error","Missing required fields returns a schema validation error","Edge cases at exact window boundaries may differ from official government calculators"],"whenToPreferThis":"Use this endpoint when you need to compute rolling-window stay compliance for any visa-free or visa-on-arrival travel rule, especially the Schengen 90/180 rule. It is purpose-built for this calculation and supports custom max_days and window_days for non-Schengen regimes. Prefer it over generic date-math endpoints when you need overstay detection, compliance flags, or forward-looking planning (longest allowable stay, next full-stay date). It is not a substitute for official government calculators or legal advice.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:35:44.829Z","isFirstParty":false,"canonicalSlug":"date-math-stay-limit-calculator-schengen-rolling-window-30ad041a"}