# Morocco Public Tenders Scraper (`jungle_synthesizer/marchespublics-morocco-public-tenders-scraper`) Actor

Extract live public procurement tenders from marchespublics.gov.ma, Morocco's national tender portal. Get reference numbers, buyer entities, deadlines, provisional guarantees, categories, and procedure types for every open consultation nationwide.

- **URL**: https://apify.com/jungle\_synthesizer/marchespublics-morocco-public-tenders-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Morocco Public Tenders Scraper — marchespublics.gov.ma

Pull live public procurement tenders from [marchespublics.gov.ma](https://www.marchespublics.gov.ma), Morocco's single national tender portal. Returns reference numbers, buyer entities, deadlines, provisional guarantees, categories, and procedure types for every open consultation nationwide — no filtering by buyer, category, or region required.

***

### Morocco Public Tenders Scraper Features

- Walks the entire live-consultation board instead of one search result at a time
- Returns the fields a bid-tracking workflow actually needs — buyer entity, procedure type, category, submission deadline, execution place, provisional guarantee (caution provisoire)
- Covers every buyer entity and every category (travaux / fournitures / services) in a single run — no partition filter to configure
- No account or login required — this is public tender data

***

### Who Uses Morocco Tender Data?

- **Contractors and bidders** — build a lead list of open Moroccan public tenders instead of checking the portal by hand
- **EU/Gulf firms bidding into Moroccan infrastructure** — track new consultations across every buyer entity nationwide
- **Market-intelligence teams** — monitor procurement activity by category or region
- **Compliance and due-diligence researchers** — cross-reference active tenders against a counterparty's bid history

***

### How Morocco Public Tenders Scraper Works

1. Set `maxItems` (or leave the default).
2. It reads the live-consultation board and pages through it until it has enough consultations.
3. For each consultation it visits the full detail page and pulls the complete record — object, buyer, category, procedure type, deadlines, provisional guarantee, execution place, and electronic-response requirements.
4. Every record lands in your dataset as clean, consistently-shaped JSON.

***

### Input

```json
{
  "maxItems": 10
}
```

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `maxItems` | integer | 10 | Maximum number of consultation records to return this run |
| `resumeCursor` | string | *(none)* | Cursor from a previous run's Output — continue where a large run stopped |

***

### Morocco Public Tenders Scraper Output Fields

```json
{
  "consultation_ref": "1025644",
  "organisation_acronym": "q1s",
  "reference": "22/2026/ANDA",
  "object": "Réalisation d'une étude portant sur l'élaboration d'un plan régional d'aménagement et de gestion aquacole...",
  "buyer_entity": "M4 / ANDA - AGENCE NATIONALE POUR LE DEVELOPPEMENT DE L'AQUACULTURE",
  "buyer_service": "M4 / ANDA - AGENCE NATIONALE POUR LE DEVELOPPEMENT DE L'AQUACULTURE",
  "procedure_type": "Appel d'offres ouvert",
  "category": "Services",
  "estimated_amount": null,
  "currency": "MAD",
  "caution_provisoire": 70000,
  "publication_date": null,
  "submission_deadline": "15/10/2026 10:00",
  "opening_session_date": "15/10/2026 10:00",
  "execution_place": "AGADIR IDA OU TANANE, INEZGANE-AIT MELLOUL, CHTOUKA-AIT BAHA, TAROUDANNT, TIZNIT, TATA",
  "lots": [],
  "electronic_response_required": false,
  "electronic_signature_required": false,
  "is_simplified_market": false,
  "reserved_for_sme": false,
  "dce_documents": [],
  "notice_status": "en cours",
  "awarded_supplier": null,
  "awarded_amount": null,
  "consultation_url": "https://www.marchespublics.gov.ma/index.php?page=entreprise.EntrepriseDetailsConsultation&refConsultation=1025644&orgAcronyme=q1s",
  "scraped_at": "2026-08-10T07:02:12.707Z"
}
```

| Field | Type | Description |
|-------|------|--------------|
| `consultation_ref` | string | Internal consultation reference (`refConsultation`) |
| `organisation_acronym` | string | Buyer organisation acronym (`orgAcronyme`) |
| `reference` | string | Publicly displayed reference (e.g. `22/2026`) |
| `object` | string | Object of the consultation, as published |
| `buyer_entity` | string | Public buyer (acheteur public) |
| `buyer_service` | string | Buyer service/department, where distinct from the buyer entity |
| `procedure_type` | string | Procurement procedure (e.g. Appel d'offres ouvert) |
| `category` | string | Travaux / Fournitures / Services |
| `estimated_amount` | number | Estimated budget, when published (rarely disclosed pre-award on this portal) |
| `currency` | string | Currency of monetary fields (MAD) |
| `caution_provisoire` | number | Provisional guarantee (caution provisoire) |
| `publication_date` | string | Publication date, when available |
| `submission_deadline` | string | Deadline for bid submission |
| `opening_session_date` | string | Bid-opening session date |
| `execution_place` | string | Place(s) of execution |
| `lots` | array | Lot breakdown, when the consultation is divided into lots |
| `electronic_response_required` | boolean | Whether an electronic response is required |
| `electronic_signature_required` | boolean | Whether an electronic signature is required |
| `is_simplified_market` | boolean | Whether this is a Marché Public Simplifié |
| `reserved_for_sme` | boolean | Whether the consultation is reserved for small/medium enterprises |
| `dce_documents` | array | Dossier de consultation (DCE) attachment references, when available |
| `notice_status` | string | Notice status (en cours / attribué / annulé) |
| `awarded_supplier` | string | Awarded supplier, once a consultation has been decided |
| `awarded_amount` | number | Awarded amount, once a consultation has been decided |
| `consultation_url` | string | Canonical source URL for this consultation |
| `scraped_at` | string | ISO-8601 timestamp when this record was scraped |

***

### Resuming a large crawl

Every run emits a `resumeCursor` in its Output. If a large crawl stops before it finishes — because it hit `maxItems`, your spend cap (`maxTotalChargeUsd`), or was aborted — start a new run with **the same input** plus that `resumeCursor` to continue. You are **not re-charged** for consultations the earlier run already delivered. Resume within your account's run-retention window — on the free tier, roughly your 10 most recent runs.

***

### FAQ

#### How do I scrape Moroccan public tenders from marchespublics.gov.ma?

Run this actor with a `maxItems` value. It walks the live-consultation board and returns the full record for each tender — buyer, category, deadlines, and provisional guarantee — as structured JSON.

#### Does this cover every buyer and category, or do I need to filter?

Every buyer entity and category is included by default — there's no filter to configure. The board is unfiltered by design.

#### Does this include tenders that have already been awarded or cancelled?

The current version covers the live-consultation board (open tenders). Award and cancellation notices are not yet included.

#### Is the estimated budget for a tender always available?

No — Moroccan public buyers generally don't disclose the estimated budget before a tender is decided, so `estimated_amount` is usually null for open consultations. The provisional guarantee (`caution_provisoire`) is published and included.

#### Does this require an account or subscription to the Moroccan portal?

No. This is public tender data — no account, no login, nothing to sign up for.

***

### Need More Features?

Need the award/cancellation registers, lot-level breakdowns, or a different lookup mode? [File an issue](https://console.apify.com/actors/issues) or get in touch.

### Why Use Morocco Public Tenders Scraper?

- **Nationwide coverage** — walks the whole live board instead of one search at a time, across every buyer and category.
- **Bid-tracking-ready fields** — deadlines, provisional guarantee, procedure type, and electronic-response requirements in one record.
- **Clean, consistent output** — every consultation follows the same schema.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `resumeCursor` (type: `string`):

Leave empty for a fresh crawl. To CONTINUE a previous run where it stopped — without paying again for records you already received — paste the `resumeCursor` value from that run's Output (the run's OUTPUT key). Resume promptly: the previous run's data expires with your account's retention window (free tier: your ~10 most recent runs).

## `maxItems` (type: `integer`):

Maximum number of records to scrape

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/marchespublics-morocco-public-tenders-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/marchespublics-morocco-public-tenders-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10
}' |
apify call jungle_synthesizer/marchespublics-morocco-public-tenders-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/marchespublics-morocco-public-tenders-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TkTPKW19xxC41Ywz9/builds/nUJ9ZLNck0CaHeYpU/openapi.json
