{"openapi":"3.1.0","info":{"title":"המרכז למטייל במרוקו — agent API","summary":"Morocco travel facts, itineraries and Hebrew content for Israeli travelers.","description":"Public, unauthenticated, read-mostly endpoints for AI agents. Booking links for third-party attractions are never returned; an agent is given our own page URL and the person books there. No endpoint submits a visa application, takes a payment, or accepts personal data.","version":"1.0.0","contact":{"url":"https://moroc.co.il/contact"},"license":{"name":"Proprietary content; endpoints free to call.","identifier":"LicenseRef-moroc-agent-api"}},"servers":[{"url":"https://moroc.co.il"}],"paths":{"/api/agent/site":{"get":{"operationId":"getSite","summary":"What this business is, what an agent may do, and where the other machine surfaces are.","description":"The first call to make. Returns the service list, the rules an agent must respect, and the URLs of the other agent surfaces.","responses":{"200":{"description":"The business, its services and the agent rules.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/agent/search":{"get":{"operationId":"searchSite","summary":"Search every published page.","description":"The entry point when the question is not covered by a specific endpoint. Covers the Hebrew city guides, the magazine, the Jewish heritage hub, attractions and the service pages. Every hit carries a markdown URL; fetch that for the full page instead of scraping the HTML. Hebrew queries match far more than English ones.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2},"description":"Search terms, preferably Hebrew."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":25,"default":10}}],"responses":{"200":{"description":"Matching pages with page and Markdown URLs.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"A parameter is missing or is not a known value.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error"]}}}}}}},"/api/agent/visa":{"get":{"operationId":"getVisa","summary":"Morocco e-visa for Israeli passport holders: price, timing, documents.","description":"Both tracks with the government fee broken out. An agent must never submit, pay for or upload documents for an application; it explains and hands over the apply URL.","responses":{"200":{"description":"Visa tracks, prices in ILS, timing and the apply URL.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/agent/shabbat":{"get":{"operationId":"getShabbat","summary":"Candle lighting and havdalah this week in six Moroccan cities.","description":"Carries `source`. When it is `fallback` the times come from a saved snapshot and `verifiedOn` says when it was checked; say so when quoting them.","responses":{"200":{"description":"This week's times, the parasha and the source.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/agent/hilulot":{"get":{"operationId":"getHilulot","summary":"Upcoming hilula dates at the tombs of Moroccan tzadikim.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":60,"default":12},"description":"How many upcoming dates to return."}],"responses":{"200":{"description":"Upcoming dates with confidence and reliability.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"A parameter is missing or is not a known value.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error"]}}}}}}},"/api/agent/attractions":{"get":{"operationId":"searchAttractions","summary":"Search the day-trip and attraction catalog.","description":"Returns our own Hebrew editorial copy and our own page URL. No third-party booking link and no third-party price are returned, by contract with those providers.","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string"},"description":"One of the categories listed in the response, or omit for all."},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free-text search, Hebrew or English. All terms must match."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":60,"default":20}}],"responses":{"200":{"description":"Matching attractions with our page URL.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"A parameter is missing or is not a known value.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error"]}}}}}}},"/api/agent/guides":{"get":{"operationId":"getGuides","summary":"Index of the published Hebrew city guides.","description":"Each entry carries a Markdown URL; fetch that for the full text rather than scraping the page.","responses":{"200":{"description":"City guides with page and Markdown URLs.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/agent/plan":{"get":{"operationId":"getPlanVocabulary","summary":"The answer ids a plan request accepts.","responses":{"200":{"description":"Questions and their option ids.","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"operationId":"createPlan","summary":"A day-by-day Morocco route for a set of answers.","description":"Free, stateless and anonymous. Check partial, omittedCities, requestedDays and actualDays before presenting the route as complete. Partial answers include choices for recalculation. The route is not saved; the person continues at the questionnaire URL to keep it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["cities","who","style","vibes","pace","kosher"],"properties":{"cities":{"type":"array","minItems":1,"items":{"type":"string","enum":["marrakech","ourika","ouzoud","beni_mellal","casablanca","rabat","essaouira","safi","tangier","tetouan","chefchaouen","ouazzane","fes","meknes","sefrou","ifrane","midelt","oujda","agadir","taghazout","ouarzazate","dades","todra","erfoud","rissani","merzouga"]}},"who":{"type":"string","enum":["couple","family","friends","solo","group"]},"duration":{"type":["integer","null"],"description":"Whole days including the flight days, or null when it is open."},"style":{"type":"string","enum":["independent","guided","organized","unsure"]},"vibes":{"type":"array","items":{"type":"string","enum":["heritage","cities","desert","coast","food","nightlife","atlas"]}},"pace":{"type":"string","enum":["relaxed","balanced","packed"]},"kosher":{"type":"string","enum":["none","partial","keep"]},"arrivalDate":{"type":"string","format":"date","description":"Today or later in Israel time."},"month":{"type":"integer","minimum":1,"maximum":12},"shabbatCity":{"type":"string","enum":["default","marrakech","casablanca","fes","rabat","essaouira"],"description":"Only when kosher is partial or keep."},"cityPlans":{"type":"object","description":"Optional preferences for selected cities; impossible day trips produce a partial plan.","additionalProperties":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["dayTrip","stay"]},"nights":{"type":["integer","string"],"enum":[1,2,"3+"]}},"additionalProperties":false}}}}}}},"responses":{"200":{"description":"The route with partial, omittedCities, requestedDays, actualDays and choices, or ok:false with alternatives.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"A parameter is missing or is not a known value.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error"]}}}},"413":{"description":"A parameter is missing or is not a known value.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"}},"required":["error"]}}}},"503":{"description":"The planner is switched off.","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}