# Israel Open Data (data.gov.il) API Exporter + Change Monitor (`inder-studio/il-open-data`) Actor

Search Israel's official open-data portal and export any table as clean JSON, CSV or Excel, with a change monitor for new rows.

- **URL**: https://apify.com/inder-studio/il-open-data.md
- **Developed by:** [Inder Studio](https://apify.com/inder-studio) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## Israel Open Data (data.gov.il) API Exporter + Change Monitor

Export any table from **data.gov.il**, the Israeli government's official open-data portal, as clean JSON, CSV or Excel. You can also **monitor a table for new or changed rows** on a schedule. Hebrew is fully supported (מאגרי מידע ממשלתיים).

It uses only the portal's **official CKAN API** (`/api/3/action/...`). There is no HTML scraping, no login and no API key.

### What can I do with it?

- **Find data:** search 1,000+ government datasets (transport, education, health, localities, environment, municipalities and more) in Hebrew or English. You get titles, publishers, licences and the Resource IDs of each table.
- **Export a table:** get every row of any queryable table, or a filtered subset.
  - Pages through the 1,000-row API limit automatically.
  - Retries when the API has a temporary error.
- **Clean output:**
  - Spaces are trimmed and empty strings become `null`.
  - Numeric text becomes numbers. Codes with leading zeros stay text.
  - Optional Latin (ASCII) column names, e.g. `שם_ישוב` → `shm_yshvb`, for BI tools and code.
- **Change monitor (`onlyNewRecords`):** schedule a daily run and receive **only rows that are new or changed** since the last run, for example new driving schools, new licences, new localities or updated records.
  - Rows the Actor has seen before are skipped (and would not be billed once pay-per-event pricing is on).
  - Pair it with Apify's built-in integrations (email, Slack, webhooks, Google Sheets, Make, Zapier) to get alerts.

### Quick start

**1. Find a table**

```json
{ "mode": "searchDatasets", "query": "בתי ספר", "maxResults": 20 }
```

Each result lists `resources[]` with `resourceId` and `hasTable`. Only `hasTable: true` resources can be exported row by row. For the others, use the file `url`.

**2. Export it**

```json
{ "mode": "getRecords", "resourceId": "5c78e9fa-c2e2-4771-93ff-7f400a12f7ba", "maxRecords": 5000, "asciiFieldNames": true }
```

**Filter by exact column value** (column names as in the source, usually Hebrew):

```json
{ "mode": "getRecords", "resourceId": "5c78e9fa-c2e2-4771-93ff-7f400a12f7ba", "filters": { "שם_נפה": "חיפה" } }
```

**Export all tables in a dataset** by name:

```json
{ "mode": "getRecords", "datasetId": "driving_shcool", "addSourceInfo": true }
```

**Monitor for changes** (schedule it daily):

```json
{ "mode": "getRecords", "resourceId": "<id>", "onlyNewRecords": true, "monitorName": "my-alert" }
```

- The first run saves a baseline and outputs every row.
- Later runs output only new or changed rows.
- The monitor supports tables of up to 300,000 rows after filters.

### Output examples

Dataset search item:

```json
{ "datasetId": "71426c53-…", "datasetName": "driving_shcool", "title": "בתי ספר לנהיגה", "organization": "משרד התחבורה והבטיחות בדרכים",
  "license": "Creative Commons Attribution", "modified": "2026-11-13T03:35:10", "url": "https://data.gov.il/dataset/driving_shcool",
  "resources": [{ "resourceId": "3f06e2f2-…", "name": "בתי ספר לנהיגה", "format": "CSV", "hasTable": true }] }
```

Record (with `asciiFieldNames`):

```json
{ "sml_yshvb": 3400, "shm_yshvb": "חברון", "shm_yshvb_lvazy": null, "sml_nph": 77, "shm_nph": "חברון", "lshkh": "ירושלים" }
```

Download the results as JSON, CSV, Excel, XML or HTML from the Output tab, or fetch them with the Apify API.

### Input reference

| Field | Mode | Meaning |
|---|---|---|
| `mode` | both | `searchDatasets` or `getRecords` (default) |
| `query`, `organization`, `maxResults` | search | Catalog keywords, an optional publisher slug, and a result cap |
| `resourceId` / `datasetId` | records | One table, or all queryable tables in a dataset |
| `q` | records | Full-text match in any column |
| `filters` | records | Exact match per column (JSON) |
| `fields`, `sort` | records | Choose columns and sort order |
| `maxRecords` | records | Row cap for the run (default 1,000) |
| `onlyNewRecords`, `monitorName` | records | Change monitor |
| `cleanValues`, `asciiFieldNames`, `addSourceInfo` | records | Output cleaning options |

### Pricing

**Pricing today:** this Actor is free. You pay only the Apify platform usage of your run. We plan to switch to pay per event at the prices below. This section will say so when it changes.

Planned pay-per-event prices (not active yet):

- A small fee per run.
- A fee per row or dataset item that is actually saved.
- Unchanged rows skipped by the change monitor would be free.

The current prices will be shown on the Actor's Pricing tab once pay per event is on.

### Licence, attribution and disclaimer

- Data comes from data.gov.il, the Israeli Government open-data portal, through its official API.
- Most datasets allow commercial reuse **with attribution** ("Source: data.gov.il"). A dataset's own licence takes precedence, so check the `license` field in search mode and https://data.gov.il/terms-of-use.
- Don't use the data in ways that harm privacy, such as cross-matching records to identify people.
- Data is provided as-is from public records and may contain errors or delays.
- This Actor is independent and is not affiliated with or endorsed by the Government of Israel.

### Local development

```bash
npm install
npm test            # unit tests + live calls to the public API (no Apify account needed)
```

# Actor input Schema

## `mode` (type: `string`):

Search the catalog, or export the rows of a table.

## `query` (type: `string`):

Words to search for in dataset titles and descriptions. Hebrew or English, e.g. "בתי ספר" or "vehicles". Leave empty for the newest datasets.

## `organization` (type: `string`):

Limit to one publisher, using its slug from the data.gov.il URL, e.g. "ministry_of_transport".

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

Stop after this many datasets.

## `resourceId` (type: `string`):

ID of one table (resource). Find it in a dataset page URL on data.gov.il or in the output of searchDatasets. Example: 5c78e9fa-c2e2-4771-93ff-7f400a12f7ba (list of localities).

## `datasetId` (type: `string`):

Export every queryable table in a dataset. Ignored when Resource ID is set.

## `q` (type: `string`):

Only return rows containing this text in any column.

## `filters` (type: `object`):

JSON object of column -> value, e.g. {"שם_נפה": "חיפה"}. Column names must match the original (Hebrew) names.

## `fields` (type: `array`):

Return only these columns (original names). Leave empty for all.

## `sort` (type: `string`):

Column name with optional " desc", e.g. "\_id desc".

## `maxRecords` (type: `integer`):

Stop after this many rows in total.

## `onlyNewRecords` (type: `boolean`):

Remember every row seen (as a short hash, in a named key-value store in your account) and on later runs output only rows that are new or changed. The first run saves a baseline and outputs everything. Schedule the Actor daily to get alerts on new companies, recalls, licences and more. The whole table is still read each run, but you only pay for rows that are output.

## `monitorName` (type: `string`):

Use different names to keep separate baselines for different tasks or filters.

## `cleanValues` (type: `boolean`):

Trim spaces, turn empty strings into null and numeric text into numbers (codes with leading zeros stay text).

## `asciiFieldNames` (type: `boolean`):

Transliterate Hebrew column names to simple Latin snake_case, handy for spreadsheets, BI tools and code.

## `addSourceInfo` (type: `boolean`):

Add \_resourceId, \_resourceName and \_datasetTitle to every row.

## Actor input object example

```json
{
  "mode": "getRecords",
  "query": "תחבורה",
  "maxResults": 50,
  "resourceId": "5c78e9fa-c2e2-4771-93ff-7f400a12f7ba",
  "maxRecords": 25,
  "onlyNewRecords": false,
  "monitorName": "default",
  "cleanValues": true,
  "asciiFieldNames": false,
  "addSourceInfo": false
}
```

# 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 = {
    "query": "תחבורה",
    "resourceId": "5c78e9fa-c2e2-4771-93ff-7f400a12f7ba"
};

// Run the Actor and wait for it to finish
const run = await client.actor("inder-studio/il-open-data").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 = {
    "query": "תחבורה",
    "resourceId": "5c78e9fa-c2e2-4771-93ff-7f400a12f7ba",
}

# Run the Actor and wait for it to finish
run = client.actor("inder-studio/il-open-data").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 '{
  "query": "תחבורה",
  "resourceId": "5c78e9fa-c2e2-4771-93ff-7f400a12f7ba"
}' |
apify call inder-studio/il-open-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,inder-studio/il-open-data"
        }
    }
}
```

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/pAQTtlqXosgTxu0K4/builds/eM4ndfZtHHAWtoyom/openapi.json
