{"name":"marocannonces.com Listings by Category API","description":"Listings by Category on marocannonces.com, as its pages list them.","api_id":"generated_63192213b68f333666b99814","slug":"marocannonces-com-listings-by-category-api","source":{"name":"Marocannonces","domain":"marocannonces.com","url":"https://www.marocannonces.com/"},"category":"commerce","countries":[],"languages":[],"record_types":[],"tags":[],"limitations":[],"updated":"2026-12-04","note":"Sample records are saved samples, not a live run. CleanedWeb is not affiliated with the source.","version":"1.0","versions":[{"major":1,"latest_minor":"1.0","status":"current","sunset_at":null}],"changelog":[{"version":"1.0","date":"2026-12-03T20:33:12.000Z","kind":"major","changes":[]}],"version_note":"Pin a major with \"version\": N in the run body (an integer). Leave it out and the call runs on the latest major. A sunset major runs on the latest major and the response says rerouted. An unknown major answers 404 catalog_version_not_found and lists the available majors.","endpoints":[{"endpoint_id":"generated_63192213b68f333666b99814_search","name":"List marocannonces.com Listings by Category","description":"Return records within the accepted scope.","definition_version":"f5337b4af24c5dcf55c71cdf0ff252e532a740fa74edf1e6b7874fe08fedff8b","method":"POST","path":"/v1/catalog/public/apis/generated_63192213b68f333666b99814/endpoints/generated_63192213b68f333666b99814_search/run","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_63192213b68f333666b99814/endpoints/generated_63192213b68f333666b99814_search/run","authentication":{"type":"bearer","scheme":"Authorization: Bearer <API key>","scope":"run","note":"Reading this file and the live catalog needs no credential. A run needs a CleanedWeb account and uses the credits of its workspace.","docs":"https://cleanedweb.com/docs/run-catalog-api/"},"required_headers":[{"name":"Authorization","value":"Bearer YOUR_API_KEY","description":"An API key with the run scope."},{"name":"Idempotency-Key","value":"UNIQUE_REQUEST_ID","description":"Required. Save it before you send; reuse it only to retry the same request and to read the result. 1-200 characters: letters, numbers, . _ : -"},{"name":"Content-Type","value":"application/json","description":"The body is JSON."}],"request_body":{"input":"An object that follows input_schema.","max_items":"Optional. Stop after this many records.","timeout_seconds":"Optional, 60-86400, default 10800.","wait_seconds":"Optional, 0-86400, default 90. How long the request waits before answering 202.","version":"Optional integer major. Leave it out for the latest major."},"input_schema":{"type":"object","properties":{"enrich_records":{"type":"boolean","default":true,"description":"true: read each returned record's product/detail page and merge its fields into the record. false: return list/search-level fields only, with no detail page reads. Every returned record's detail page is read within the run's time budget; records the time budget leaves unread are returned without detail fields, and summary.record_enrichment reports how many records were enriched and why any were not (run_time_budget). Detail fields are optional."},"search":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[^\\x00-\\x1f\\x7f]+$","description":"Optional. Text sent to the site's own search form; its result pages are read and revalidated like the collection. Omit to read the whole collection."},{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"pattern":"^[^\\x00-\\x1f\\x7f]+$","description":"Optional. Text sent to the site's own search form; its result pages are read and revalidated like the collection. Omit to read the whole collection."}}],"description":"Optional. Text sent to the site's own search form; its result pages are read and revalidated like the collection. Omit to read the whole collection. Supply an array to union distinct results from each source search, in query order."},"category":{"x-enum-labels":["Mes Favoris","Connexion","Inscription","FAQ"],"x-value-status":["verified","observed","observed","observed"],"x-input-proof":{"evidence":"declared","key":3,"kind":"link","read":"listing","rule":"request_structure_v1","value":"mes-favoris.html","where":"path"},"x-source-key":"category","type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9\\-\\._]{0,127}$","minLength":1,"maxLength":128,"examples":["mes-favoris.html","mon-compte","register.php","faq.html"],"x-open-values":true,"description":"Required. The name of a page of the same kind as the pages the pasted one links (any name that fits the pattern; the examples are the names it links). The site decides: a name it does not serve is refused as input_value_unverified.","not":{"type":"string","pattern":"\\n"},"x-source-route":"path_segment","x-input-type":{"kind":"string"}},"from_url":{"type":"string","format":"uri","description":"Optional. A results link copied from the site (its own address bar): a category page, a search or a filtered list. It is read as this API's own inputs and the run echoes them as `decoded`. Tracking and paging keys are dropped. A link from another site, or one that names a page or filter this API has no input for, is refused with the unread parts listed; it is never served from another page.","x-from-url":{"origin":"https://www.marocannonces.com"}},"urls":{"anyOf":[{"type":"string","format":"uri","minLength":1},{"type":"array","minItems":1,"items":{"type":"string","format":"uri","minLength":1}}],"description":"Optional. Record pages to read instead of searching: one address or a list (a record's page, path shaped /categorie/{int}/{slug}/annonce/{int}/{slug}). One record comes back per page, in this order, in this API's fields, read from the page alone (fields only the list shows stay empty). Take no other input but enrich_records, which a page read ignores. A page off that shape, on another site or unreadable is told by its code in the run's metadata (record_pages), never served from another page; the run fails only when no page was read.","examples":[["https://www.marocannonces.com/categorie/383/4x4-tout-terrain/annonce/10500127/Range-Rover-Velar-D240S-%E2%80%93-Excellent-%C3%A9tat-%E2%80%93-79000KM.html"]]}},"required":["category"],"additionalProperties":false,"allOf":[{"not":{"required":["search"],"properties":{"search":{"type":"array"}}}}]},"output_schema":{"type":"object","additionalProperties":true,"properties":{"image":{"type":"object","properties":{"alt":{"type":["string"]},"original":{"type":["string"]}},"additionalProperties":false},"location":{"type":"string"},"dates":{"type":"object","properties":{"posted_at":{"type":"string","format":"date","x-precision":"day","description":"ISO 8601 value computed from the source's relative date text (such as '3 months ago') at delivery time; precise to about one day."},"published_at":{"type":"string","description":"Publiée le"}},"additionalProperties":false},"price":{"type":"number","description":"Numeric reading of source text such as '1 000 DH' (suffix 'dh' removed)"},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"category":{"type":"string"},"vehicle":{"type":"object","properties":{"year":{"type":"string","description":"Année"},"fuel_type":{"type":"string","description":"Carburant"},"mileage":{"type":"string","description":"Kilométrage"},"make":{"type":"string","description":"Marque"},"model":{"type":"string","description":"Modèle"},"power":{"type":"string","description":"Puissance"}},"additionalProperties":false},"annonce_n":{"type":"string","description":"Annonce N°"},"description":{"type":"string"},"other_details":{"type":"object","additionalProperties":{"type":["object","array"],"additionalProperties":{"type":["string","boolean"]},"items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}}}}},"_page":{"type":"object","properties":{"twitter_url":{"type":"string","description":"twitter url"}},"additionalProperties":false},"views":{"type":"string","description":"Vue"},"city":{"type":"string","description":"Ville"}},"required":["title","url"]},"output_schema_note":"Some fields the source returns are not published here (identifiers, personal details and page-building noise). A record can carry fields this schema does not list, so additionalProperties is true. Do not reject a record for an extra field. The live contract, linked as live_contract, lists every field the saved definition declares.","examples":[{"kind":"saved_validation_records","saved_at":"2026-12-03T20:33:12.707Z","live_verified":false,"request":{"input":{}},"records_shown":2,"records_saved":2,"records":[{"image":{"alt":"Range Rover Velar D240S – Excellent état – 79000KM","original":"user_images/383/5810961.jpg"},"vehicle":{"year":"2020","fuel_type":"Diesel","mileage":"79000","make":"Land rover","model":"Range rover","power":"8 CV"},"dates":{"posted_at":"2026-11-30","published_at":"30 Nov-8:03"},"_page":{"twitter_url":"http://twitter.com/home?status=https://www.marocannonces.com/categorie/15/Auto-Moto/2.html"},"annonce_n":"10500127","description":"Detail de l'annonce : Je mets en vente ma Range Rover Velar D240 S, mise en circulation en novembre 2020, achetée neuve au Maroc. Véhicule en excellent état général, soigneusement entretenu et affichant seulement 79 000 km. Ses principaux atouts : - Motorisation D240 diesel, 2.0 litres, 240 ch, boîte automatique. - Version S, 4 cylindres. - Seulement 79 000 km. - Origine Maroc, achetée neuve au Maroc. - Intérieur cuir. - Toit panoramique ouvrant. - Système de navigation intégré. - Caméra de recul avec affichage écran. - Radars de stationnement avant et arrière. - Limiteur de vitesse. - Véhicule toutes options selon configuration. Entretien et état : - Carnet d'entretien disponible. - Historique des révisions disponible. - Visite technique récemment renouvelée. - Peinture d'origine. - Excellent état intérieur et extérieur. - Aucun défaut signalé.","location":"Marrakech","price":399000,"title":"Range rover velar d240s – excellent état – 79000km","url":"https://www.marocannonces.com/categorie/383/4x4-tout-terrain/annonce/10500127/Range-Rover-Velar-D240S-%E2%80%93-Excellent-%C3%A9tat-%E2%80%93-79000KM.html","category":"4x4 tout terrain","views":"13"},{"image":{"alt":"Range rover sport hse 2013","original":"user_images/5606742.jpg"},"vehicle":{"year":"2013","fuel_type":"Diesel","mileage":"179000","make":"Land rover","model":"Range rover sport","power":"12 CV"},"dates":{"posted_at":"2026-11-27","published_at":"27 Nov-8:53"},"_page":{"twitter_url":"http://twitter.com/home?status=https://www.marocannonces.com/categorie/15/Auto-Moto/3.html"},"annonce_n":"10498876","description":"Detail de l'annonce : Range sport hse n9ia 2 éme main mod 2013 km 179 tt option","location":"Bouskoura","price":123000,"title":"Range rover sport hse 2013","url":"https://www.marocannonces.com/categorie/383/4x4-tout-terrain/annonce/10498876/Range-rover-sport-hse-2013.html","category":"4x4 tout terrain","views":"20"}]}],"request_example":{"body":{"input":{"category":"mes-favoris.html"},"version":1,"max_items":25},"curl":"curl -X POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_63192213b68f333666b99814/endpoints/generated_63192213b68f333666b99814_search/run \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Idempotency-Key: UNIQUE_REQUEST_ID\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"input\": {\n    \"category\": \"mes-favoris.html\"\n  },\n  \"version\": 1,\n  \"max_items\": 25\n}'"},"result":{"method":"GET","url":"https://api.cleanedweb.com/v1/catalog/public/apis/generated_63192213b68f333666b99814/endpoints/generated_63192213b68f333666b99814_search/result","note":"A run that does not end within wait_seconds answers 202. Read the result with the same API key and the same Idempotency-Key."},"links":{"page":"https://cleanedweb.com/catalog/marocannonces-com-listings-by-category-api/","markdown":"https://cleanedweb.com/catalog/marocannonces-com-listings-by-category-api/index.md","live_contract":"https://app.cleanedweb.com/api/catalog/apis/generated_63192213b68f333666b99814/endpoints/generated_63192213b68f333666b99814_search/contract","run_docs":"https://cleanedweb.com/docs/run-catalog-api/"}}],"links":{"page":"https://cleanedweb.com/catalog/marocannonces-com-listings-by-category-api/","markdown":"https://cleanedweb.com/catalog/marocannonces-com-listings-by-category-api/index.md","contract":"https://cleanedweb.com/catalog/marocannonces-com-listings-by-category-api/contract.json","catalog":"https://cleanedweb.com/catalog/","index":"https://cleanedweb.com/catalog/index.json","openapi":"https://cleanedweb.com/catalog/openapi.json"}}
