# Bahrain Tender Board Monitor (`mohamedbr/my-actor-9`) Actor

Watches the Bahrain Tender Board and reports only NEW tenders: initial bond, document fees, contract duration and closing / opening dates — never the same tender twice. For contractors bidding in Bahrain. Part of Mohamed Bourim's 12 MENA monitors on Apify.

- **URL**: https://apify.com/mohamedbr/my-actor-9.md
- **Developed by:** [Mohamed Bourim](https://apify.com/mohamedbr) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 tender records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bahrain Tender Board Monitor — Live Tenders with Bond, Fees & Deadlines (مناقصات البحرين)

**Every live Bahrain government tender, with the numbers bid teams actually decide on.** This Actor collects public tenders from Bahrain's official Tender Board portal [tenderboard.gov.bh](https://www.tenderboard.gov.bh) — the full tender number, purchasing authority, and **all four key dates** (published, purchase-before, closing, opening) — enriched from each tender's own detail page with the **initial bond (BD)**, **tender fees**, contract duration, full description and the inquiries contact.

Other Gulf tender tools bundle Bahrain into a regional scrape or skip it entirely. This Actor is dedicated to the Tender Board's own feed, reads every field from the authoritative source, and verifies each detail page against the list identity before merging it.

### What you get

One record per published tender (~460 live at any time, newest first):

| Field | Description |
|---|---|
| `tenderId` | Full Tender Number — the portal's own identity, e.g. `562/2026/BTB (BP/018/2026)` |
| `tenderNumber` / `paReference` | Core number (`562/2026/BTB`) and the authority's reference (`BP/018/2026`) |
| `subject` | What is being procured |
| `tenderType` | `Internal` or `External` |
| `purchasingAuthority` | Issuing ministry/company, e.g. `Bahrain Polytechnic`, `Bapco Refining` |
| `publishedDate` / `purchaseBeforeDate` / `closingDate` / `openingDate` | All four key dates, ISO format |
| `invitationMethod` | e.g. `Public (LOCAL GCC)` |
| `initialBondBD` | Initial bond in Bahraini dinars; `null` when the tender states *Not Applicable* — never zero-filled |
| `bidValidityDays` | Bid / initial-bond validity period in days |
| `tenderFeesBD` | Tender document fees (BD) |
| `contractDuration` | As published, e.g. `1 Year` |
| `alternateBidAllowed` / `smeOnly` | Booleans as published |
| `description` | Full tender description from the detail page |
| `inquiriesContact` | Who to contact at the authority, as published |
| `detailUrl` | The official detail page the record was read from |

### Monitor mode

Set **onlyNew** and the Actor returns only tenders that are new since your last run with the same filters — the baseline is kept per filter set in a persistent store, a failed run never marks tenders as seen, and every successful run refreshes the baseline (even a plain sweep). Schedule it daily and you have a live feed of Bahrain procurement in your sector.

### Inputs

| Input | Description |
|---|---|
| `tenderNumber` | Only tenders whose full Tender Number contains this text |
| `buyerKeyword` | Only tenders whose purchasing authority contains this text |
| `keyword` | Only tenders whose subject contains this text |
| `tenderType` | `all`, `Internal` or `External` |
| `maxResults` | Maximum tenders to return (newest first, default 50) |
| `onlyNew` | Monitor mode: only tenders new since your last run |
| `includeDetails` | Enrich from detail pages (default on; turn off for a fast dates-only sweep) |

### Pricing

Pay per event: **$0.05 per run start + $0.02 per tender record** ($20 / 1,000 records). Platform usage is included.

# Actor input Schema

## `tenderNumber` (type: `string`):

Only tenders whose full Tender Number contains this text (e.g. 562/2026/BTB). Empty = all.

## `buyerKeyword` (type: `string`):

Only tenders whose purchasing authority contains this text (e.g. Bapco). Empty = all.

## `keyword` (type: `string`):

Only tenders whose subject contains this text. Empty = all.

## `tenderType` (type: `string`):

all, Internal or External.

## `maxResults` (type: `integer`):

Maximum number of tenders to return (newest first).

## `onlyNew` (type: `boolean`):

Return only tenders not seen in previous runs with the same filters.

## `includeDetails` (type: `boolean`):

Fetch each tender's detail page for bond, fees, opening date, description and contact (verified against the list identity before merging).

## Actor input object example

```json
{
  "tenderNumber": "",
  "buyerKeyword": "",
  "keyword": "",
  "tenderType": "all",
  "maxResults": 50,
  "onlyNew": false,
  "includeDetails": true
}
```

# Actor output Schema

## `tenders` (type: `string`):

Structured tender records (dates, bond, fees, buyer, 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("mohamedbr/my-actor-9").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("mohamedbr/my-actor-9").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 '{}' |
apify call mohamedbr/my-actor-9 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mohamedbr/my-actor-9"
        }
    }
}
```

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/xIbc2PYkl360QHicI/builds/fRe79mcg6lyEzJ0Ib/openapi.json
