Skip to main content
All providers

Bahrain Open Data Portal

Open data portalsBH

data.gov.bh

Bahrain's national open-data portal: search the catalogue and query rows out of any dataset.

Capabilities (6)

GET /v1/data/datagovbh/catalogue-facets1 credit

Returns the catalogue-level facets (theme, keyword, publisher, licence, language and more), each with its distinct values and the number of datasets under them.

facet?where?refine?exclude?
GET /v1/data/datagovbh/dataset1 credit

Returns one dataset's full metadata record: titles, description, themes, keywords, publisher, licence, modified date, record count and the complete field schema with each column's name, label and type.

datasetselect?
GET /v1/data/datagovbh/dataset-facets1 credit

Returns the facetable columns of one dataset with every distinct value and its row count: a value histogram without downloading the rows.

datasetfacet?where?refine?exclude?
GET /v1/data/datagovbh/datasets1 credit

Returns the portal's datasets with their dataset_id, titles, description, themes, keywords, publisher, record count and field schema, plus a total_count for the whole catalogue.

where?refine?exclude?limit?offset?order_by?select?group_by?
GET /v1/data/datagovbh/records1 credit

Returns the actual rows of one dataset as JSON objects keyed by column name, with a total_count, and supports ODSQL filtering, sorting, field selection and server-side aggregation.

datasetwhere?refine?exclude?select?group_by?order_by?limit?offset?
GET /v1/data/datagovbh/records-export1 credit

Returns up to 1,000 rows of one dataset as a plain JSON array, bypassing the 100-row and 10,000-offset ceilings the records endpoint enforces.

datasetwhere?refine?exclude?select?order_by?

Response example

The shape of data from datagovbh/catalogue-facets (Catalogue facet values). A sample, not live data.

relhref
selfhttps://data.gov.bh/api/explore/v2.1/catalog/facets
sourcehttps://data.gov.bh/api/explore/v2.1/catalog

Ask with this source

A prompt for your agent that names this source and how to call it through the crw MCP.

  • Catalogue facet values

    Use Bahrain Open Data Portal (datagovbh) from fastCRW Pergamon, capability "Catalogue facet values" (catalogue-facets). You want to see how the whole portal is organised, or which theme and publisher values you can refine the dataset listing by. Example options: facet=publisher, where=search("petroleum"), refine=theme:"Agriculture". Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datagovbh" and capability "catalogue-facets". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Dataset detail

    Use Bahrain Open Data Portal (datagovbh) from fastCRW Pergamon, capability "Dataset detail" (dataset). You have a dataset_id and need its column names and types before writing a where, select or group_by clause. Example options: dataset=local-sales-of-petroleum-products, select=dataset_id,fields. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datagovbh" and capability "dataset". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Dataset facet values

    Use Bahrain Open Data Portal (datagovbh) from fastCRW Pergamon, capability "Dataset facet values" (dataset-facets). You want the legal values of a column (which years, which categories) before writing a refine or where clause against it. Example options: dataset=local-sales-of-petroleum-products, facet=year, where=quantity>1000. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datagovbh" and capability "dataset-facets". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Dataset catalogue

    Use Bahrain Open Data Portal (datagovbh) from fastCRW Pergamon, capability "Dataset catalogue" (datasets). You want to discover what Bahraini open datasets exist, or to find a dataset_id before querying records. Example options: where=search("petroleum"), refine=theme:"Agriculture", exclude=theme:"Agriculture". Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datagovbh" and capability "datasets". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

Licence

Bahrain Open Government Data License v1.0 (20 May 2025), the purpose-written national licence, read in full.

https://nea.gov.bh/Documents/OpenDataLicense.pdf

Attribution

Display this wherever you show the data. It arrives on every response as provenance.attribution_text.

Source: Bahrain Open Data Portal

Cache: up to 3600s