israel-gov-api
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIsrael Government API
以色列政府API
Instructions
使用说明
Step 1: Understand the Data Need
步骤1:明确数据需求
Ask the user:
- What topic? (transportation, health, education, economy, etc.)
- What geography? (national, specific city/region, specific address)
- What time period? (current, historical, time series)
- What format? (raw data, summary statistics, visualization)
询问用户:
- 主题是什么?(交通、医疗、教育、经济等)
- 地理范围?(全国、特定城市/地区、具体地址)
- 时间范围?(当前、历史、时间序列)
- 输出格式?(原始数据、汇总统计、可视化)
Step 2: Search for Datasets
步骤2:搜索数据集
Use the data.gov.il CKAN API to find relevant datasets:
Search by keyword:
GET https://data.gov.il/api/3/action/package_search?q=KEYWORD&rows=10Search by organization (ministry):
GET https://data.gov.il/api/3/action/package_search?fq=organization:MINISTRY_IDCommon organization IDs:
| Ministry | ID | Hebrew |
|---|---|---|
| Central Bureau of Statistics | lamas | halishka hamerkazit listatistika |
| Ministry of Transportation | ministry_of_transport | misrad hatahaburah |
| Ministry of Health | ministry-health | misrad habriut |
| Ministry of Education | ministry_of_education | misrad hachinuch |
| Israel Tax Authority | taxes-authority | rashut hamisim |
| Israel Land Authority | the_israel_lands_administration | rashut mekarkei yisrael |
| Ministry of Interior | interior_affairs | misrad hapnim |
使用data.gov.il的CKAN API查找相关数据集:
按关键词搜索:
GET https://data.gov.il/api/3/action/package_search?q=KEYWORD&rows=10按机构(部委)搜索:
GET https://data.gov.il/api/3/action/package_search?fq=organization:MINISTRY_ID常见机构ID:
| 部委 | ID | 希伯来语 |
|---|---|---|
| 中央统计局 | lamas | halishka hamerkazit listatistika |
| 交通部 | ministry_of_transport | misrad hatahaburah |
| 卫生部 | ministry-health | misrad habriut |
| 教育部 | ministry_of_education | misrad hachinuch |
| 以色列税务局 | taxes-authority | rashut hamisim |
| 以色列土地管理局 | the_israel_lands_administration | rashut mekarkei yisrael |
| 内政部 | interior_affairs | misrad hapnim |
Step 3: Retrieve and Query Data
步骤3:获取并查询数据
Once a dataset is found:
Get dataset details:
GET https://data.gov.il/api/3/action/package_show?id=DATASET_IDQuery tabular data (datastore):
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&limit=100Filter by field values:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&filters={"field_name":"value"}&limit=100Select specific fields and sort:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&fields=field1,field2&sort=field1 desc&limit=100Full-text search within a resource:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&q=search+term&limit=100Important: The endpoint may be disabled on data.gov.il (often returns 403 Forbidden). Use with , , , , , and parameters instead.
datastore_search_sqldatastore_searchfiltersfieldssortqlimitoffsetTips:
- Field names are often in Hebrew -- use with
datastore_searchfirst to see field nameslimit=1 - Use parameter with a JSON object for exact field matching (e.g.,
filters)filters={"city_code":"5000"} - Use parameter for full-text search across all fields
q - Large datasets: use and
limitfor paginationoffset - Date fields may be in various formats -- check dataset documentation
Pagination:
- Offset paging caps at roughly 32,000 records on the data.gov.il datastore. Above that, deep requests will start returning errors or empty pages.
offset= - For datasets above ~32k rows, switch to cursor paging on : sort by
_idascending and keep_idbetween calls. CKAN exposes thefilters={"_id":">LAST_ID"}integer on every record._id - The response field is the count of all records in the resource (not in the page), so use it to plan how many pages you need.
total - accepts
records_format(default JSON),objects(positional arrays),lists, orcsv.tsvandlistsare noticeably faster and cheaper for large pulls; reach for them when streaming or bulk-extracting.csv
找到数据集后:
获取数据集详情:
GET https://data.gov.il/api/3/action/package_show?id=DATASET_ID查询表格数据(数据存储):
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&limit=100按字段值筛选:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&filters={"field_name":"value"}&limit=100选择特定字段并排序:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&fields=field1,field2&sort=field1 desc&limit=100在资源内进行全文搜索:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&q=search+term&limit=100重要提示: data.gov.il上的端点可能已禁用(通常返回403 Forbidden)。请改用带有、、、、和参数的。
datastore_search_sqlfiltersfieldssortqlimitoffsetdatastore_search技巧:
- 字段名称通常为希伯来语——先使用并设置
datastore_search查看字段名称limit=1 - 使用参数搭配JSON对象进行精确字段匹配(例如:
filters)filters={"city_code":"5000"} - 使用参数对所有字段进行全文搜索
q - 大型数据集:使用和
limit进行分页offset - 日期字段可能有多种格式——查看数据集文档
分页说明:
- data.gov.il数据存储的偏移分页上限约为32000条记录。超过此数量后,使用深请求会开始返回错误或空页面。
offset= - 对于超过约32000行的数据集,切换到基于的游标分页:按
_id升序排序,并在调用之间保持_id。CKAN会为每条记录提供整数类型的filters={"_id":">LAST_ID"}。_id - 响应中的字段是资源中的总记录数(而非当前页面的记录数),因此可用于规划需要多少页。
total - 接受
records_format(默认JSON格式)、objects(位置数组)、lists或csv。在流式传输或批量提取时,tsv和lists格式明显更快、成本更低;在这些场景下优先选择它们。csv
Step 4: Analyze and Present
步骤4:分析与呈现
For the retrieved data:
- Summarize key findings in plain language
- Calculate basic statistics if requested (mean, median, trends)
- Suggest visualizations (bar chart, line graph, map) appropriate to the data
- Note data freshness (last update date) and any caveats
- Provide the direct link to the dataset on data.gov.il for reference
对于获取到的数据:
- 用通俗易懂的语言总结关键发现
- 如果有需求,计算基础统计数据(平均值、中位数、趋势)
- 根据数据类型建议合适的可视化方式(柱状图、折线图、地图)
- 注明数据的新鲜度(最后更新日期)及任何注意事项
- 提供data.gov.il上该数据集的直接链接供参考
Step 5: Cross-Reference (Advanced)
步骤5:交叉引用(进阶)
When combining multiple datasets:
- Identify common keys (city code, date, category code)
- Use Israeli administrative codes (CBS city codes) for geographic joins
- Note that field names across datasets may differ -- match by content not name
- Document data lineage: which datasets contributed to the analysis
当合并多个数据集时:
- 识别共同键(城市代码、日期、类别代码)
- 使用以色列行政代码(CBS城市代码)进行地理关联
- 注意不同数据集的字段名称可能不同——根据内容而非名称匹配
- 记录数据来源:哪些数据集为分析提供了数据
Commonly Requested Datasets
常见请求数据集
Resource IDs below were verified live on 2026-05-13 via . IDs on data.gov.il do change without notice. Always re-verify before quoting them to a user.
datastore_search?resource_id=<id>&limit=1| Dataset | Resource ID | Description |
|---|---|---|
| Private and commercial vehicles (vehicle registration) | | Full registry of private and commercial vehicle license plates with make, model, year. ~4.1M rows. |
| Public-transport vehicles | | Active license plates of public-transport vehicles (buses, taxis). ~65k rows. |
Education institutions ( | | Characteristics of educational institutions supervised by the Ministry of Education. ~120k rows. |
| Registered amutot (NGOs) | | Ministry of Justice registry of associations / non-profits. ~75k rows. |
For other domains (GTFS public transport, real-estate transactions, hospital quality, air quality), use to discover the current dataset, then to grab the active -- those IDs rotate when datasets are re-published year over year.
package_searchpackage_showresources[].id以下资源ID是在2026-05-13通过验证过的。data.gov.il上的ID可能会无通知变更。在向用户引用这些ID前,请务必重新验证。
datastore_search?resource_id=<id>&limit=1| 数据集 | 资源ID | 描述 |
|---|---|---|
| 私人和商用车辆(车辆登记) | | 私人和商用车辆牌照的完整注册表,包含品牌、型号、年份。约410万行。 |
| 公共交通车辆 | | 公共交通车辆(公交车、出租车)的有效牌照。约6.5万行。 |
教育机构( | | 教育部监管的教育机构特征信息。约12万行。 |
| 注册非营利组织(amutot) | | 司法部的协会/非营利组织注册表。约7.5万行。 |
对于其他领域(GTFS公共交通、房地产交易、医院质量、空气质量),使用发现当前数据集,然后使用获取有效的——这些ID会随着数据集每年重新发布而变更。
package_searchpackage_showresources[].idExamples
示例
Example 1: Find School Data (full chained workflow)
示例1:查找学校数据(完整链式流程)
User says: "I need data about schools in Tel Aviv"
Actions (do not skip the lookup steps -- resource IDs rotate):
- Discover candidate datasets:
curl -s "https://data.gov.il/api/3/action/package_search?q=mosdot&rows=5" - Inspect the chosen dataset and grab the active :
resources[].idcurl -s "https://data.gov.il/api/3/action/package_show?id=mosdot" \ | python3 -c "import sys,json; r=json.load(sys.stdin)['result']['resources']; [print(x['id'], x['format'], x.get('name','')) for x in r]" - Peek at field names with :
limit=1curl -s "https://data.gov.il/api/3/action/datastore_search?resource_id=5548fd63-5868-4053-ad81-98caddc5e232&limit=1" - Filter by Tel Aviv city code (5000) once you have the correct Hebrew field name (commonly ). Hebrew values must be percent-encoded:
סמל_ישובcurl -s "https://data.gov.il/api/3/action/datastore_search?resource_id=5548fd63-5868-4053-ad81-98caddc5e232&filters=%7B%22%D7%A1%D7%9E%D7%9C_%D7%99%D7%A9%D7%95%D7%91%22%3A%225000%22%7D&limit=100"
Result: Structured school list for Tel Aviv (count, types, sizes).
用户说:“我需要特拉维夫的学校数据”
操作步骤(请勿跳过查找步骤——资源ID会变更):
- 发现候选数据集:
curl -s "https://data.gov.il/api/3/action/package_search?q=mosdot&rows=5" - 检查选定的数据集并获取有效的:
resources[].idcurl -s "https://data.gov.il/api/3/action/package_show?id=mosdot" \ | python3 -c "import sys,json; r=json.load(sys.stdin)['result']['resources']; [print(x['id'], x['format'], x.get('name','')) for x in r]" - 使用查看字段名称:
limit=1curl -s "https://data.gov.il/api/3/action/datastore_search?resource_id=5548fd63-5868-4053-ad81-98caddc5e232&limit=1" - 一旦获取到正确的希伯来语字段名称(通常为),按特拉维夫城市代码(5000)筛选。希伯来语值必须进行百分比编码:
סמל_ישובcurl -s "https://data.gov.il/api/3/action/datastore_search?resource_id=5548fd63-5868-4053-ad81-98caddc5e232&filters=%7B%22%D7%A1%D7%9E%D7%9C_%D7%99%D7%A9%D7%95%D7%91%22%3A%225000%22%7D&limit=100"
结果:特拉维夫的结构化学校列表(数量、类型、规模)。
Example 2: Analyze Housing Prices
示例2:分析房价趋势
User says: "Show me housing price trends in Haifa"
Actions:
- or
package_search?q=nadlanto find the Tax Authority real-estate transactions dataset.q=%D7%A2%D7%A1%D7%A7%D7%90%D7%95%D7%AA - and grab the most recent year's resource id from
package_show?id=<slug>.resources[] - with the Haifa city code filter, sorted by transaction date descending.
datastore_search - Group by month, compute median price per square meter, calculate month-over-month percentage change.
Result: Monthly price trend for Haifa with analysis.
用户说:“展示海法的房价趋势”
操作步骤:
- 使用或
package_search?q=nadlan查找税务局的房地产交易数据集。q=%D7%A2%D7%A1%D7%A7%D7%90%D7%95%D7%AA - 使用并从
package_show?id=<slug>中获取最近一年的资源ID。resources[] - 使用并按海法城市代码筛选,按交易日期降序排序。
datastore_search - 按月分组,计算每平方米的中位数价格,计算月度环比变化百分比。
结果:海法的月度价格趋势及分析。
Example 3: Municipal Data Comparison
示例3:市政数据对比
User says: "Compare education spending across Israeli cities"
Actions:
- (budget + education in Hebrew, percent-encoded).
package_search?q=%D7%AA%D7%A7%D7%A6%D7%99%D7%91%20%D7%97%D7%99%D7%A0%D7%95%D7%9A - Pick a municipal-budget dataset, to retrieve the active resource id.
package_show - filtered to education-category rows; paginate via
datastore_searchcursor if the resource exceeds 32k rows._id - Normalize per capita using (CBS) population figures.
lamas
Result: Ranked comparison of education spending per student across major Israeli municipalities with data source and year.
用户说:“对比以色列各城市的教育支出”
操作步骤:
- 使用(希伯来语的“预算+教育”,已进行百分比编码)。
package_search?q=%D7%AA%D7%A7%D7%A6%D7%99%D7%91%20%D7%97%D7%99%D7%A0%D7%95%D7%9A - 选择一个市政预算数据集,使用获取有效的资源ID。
package_show - 使用筛选教育类别行;如果资源超过32000行,使用
datastore_search游标进行分页。_id - 使用(CBS)的人口数据按人均标准化。
lamas
结果:以色列主要城市的生均教育支出排名对比,包含数据源和年份。
Bundled Resources
捆绑资源
Scripts
脚本
- -- Search datasets, inspect resources, and run datastore queries against the data.gov.il CKAN API directly from the command line. Supports subcommands:
scripts/query_datagov.py,search,dataset,query. Run:orgspython scripts/query_datagov.py --help
- —— 直接从命令行搜索数据集、检查资源并针对data.gov.il的CKAN API运行数据存储查询。支持子命令:
scripts/query_datagov.py、search、dataset、query。运行:orgspython scripts/query_datagov.py --help
References
参考资料
- -- Complete endpoint catalog for the data.gov.il CKAN API including search parameters, datastore query syntax, and common organization IDs. Consult when constructing API calls or debugging query syntax.
references/ckan-api-reference.md
- —— data.gov.il的CKAN API完整端点目录,包括搜索参数、数据存储查询语法和常见机构ID。在构建API调用或调试查询语法时参考。
references/ckan-api-reference.md
Recommended MCP Servers
推荐MCP服务器
Pair this skill with an MCP server so your agent can call data.gov.il (or a derived dataset) directly as tools, without scripting HTTP calls.
| MCP | URL | What it gives you |
|---|---|---|
| https://agentskills.co.il/he/mcps/government-services/datagov-israel | Direct MCP tool access to the data.gov.il CKAN API (search, package_show, datastore_search). |
| https://agentskills.co.il/he/mcps/government-services/data-gov-il | Alternative MCP wrapping the same data.gov.il CKAN API. |
| https://agentskills.co.il/he/mcps/government-services/israel-vehicles | Pre-scoped MCP for the vehicle registration dataset (license-plate lookup, make/model/year). |
| https://agentskills.co.il/he/mcps/government-services/israel-amutot | Pre-scoped MCP for the Ministry of Justice amutot (NGO) registry. |
| https://agentskills.co.il/he/mcps/government-services/israel-elections | Pre-scoped MCP for Israeli election results data. |
When this skill walks the user through a query, prefer the dedicated MCP if it's installed; fall back to the raw CKAN API otherwise.
将此技能与MCP服务器搭配使用,你的Agent可以直接调用data.gov.il(或衍生数据集)作为工具,无需编写HTTP调用脚本。
| MCP | URL | 功能 |
|---|---|---|
| https://agentskills.co.il/he/mcps/government-services/datagov-israel | 直接通过MCP工具访问data.gov.il的CKAN API(搜索、package_show、datastore_search)。 |
| https://agentskills.co.il/he/mcps/government-services/data-gov-il | 包装同一data.gov.il CKAN API的替代MCP。 |
| https://agentskills.co.il/he/mcps/government-services/israel-vehicles | 针对车辆登记数据集的预限定MCP(牌照查询、品牌/型号/年份)。 |
| https://agentskills.co.il/he/mcps/government-services/israel-amutot | 针对司法部非营利组织(amutot)注册表的预限定MCP。 |
| https://agentskills.co.il/he/mcps/government-services/israel-elections | 针对以色列选举结果数据的预限定MCP。 |
当此技能引导用户完成查询时,如果已安装专用MCP则优先使用;否则回退到原始CKAN API。
Gotchas
注意事项
- Israeli government data APIs (data.gov.il) frequently change URLs and endpoint structures without notice. Agents may hardcode endpoints that worked last month but now return 404. Re-verify resource IDs with before quoting them.
package_show - The data.gov.il API returns data with Hebrew column headers by default. Agents may fail to parse responses that contain non-ASCII header names in JSON or CSV output.
- Hebrew filter values and parameters must be UTF-8 percent-encoded. Raw Hebrew in URLs breaks several HTTP clients (some
qbuilds, oldercurlversions, certain proxies). Example: search for "רכב" asrequests; filter on "חיפה" asq=%D7%A8%D7%9B%D7%91.filters=%7B%22city%22%3A%22%D7%97%D7%99%D7%A4%D7%94%22%7D - Rate limiting on gov.il APIs is strict and undocumented. Agents that make rapid sequential requests will be blocked. Always add delays between API calls.
- A 403 response with body is the data.gov.il WAF terminating your session. This is distinct from an auth 403. Recovery: back off exponentially (10s, 30s, 60s), drop any session cookies, and retry with a fresh
Security Violation. Do not retry tight-loop, the WAF will extend the block.User-Agent - Many government datasets have date fields in DD/MM/YYYY format (Israeli convention), not ISO 8601. Agents may parse "01/02/2026" as February 1st instead of January 2nd.
- Offset paging caps around 32k records. For larger pulls, use cursor paging on (sort by
_idascending, filter_idgreater than last seen)._id
- 以色列政府数据API(data.gov.il)经常无通知更改URL和端点结构。Agent可能硬编码了上个月可用但现在返回404的端点。在引用资源ID前,请务必使用重新验证。
package_show - data.gov.il API默认返回带有希伯来语列标题的数据。Agent可能无法解析JSON或CSV输出中包含非ASCII标题名的响应。
- 希伯来语筛选值和参数必须进行UTF-8百分比编码。URL中的原始希伯来语会导致多个HTTP客户端出错(部分
q版本、旧版curl、某些代理)。示例:搜索“רכב”时使用requests;筛选“חיפה”时使用q=%D7%A8%D7%9B%D7%91。filters=%7B%22city%22%3A%22%D7%97%D7%99%D7%A4%D7%94%22%7D - gov.il API的速率限制严格且未公开说明。快速连续发送请求的Agent会被封禁。请务必在API调用之间添加延迟。
- 返回带有内容的403响应,是data.gov.il的WAF终止了你的会话。这与授权403不同。恢复方法:指数退避(10秒、30秒、60秒),删除所有会话Cookie,使用新的
Security Violation重试。请勿循环重试,否则WAF会延长封禁时间。User-Agent - 许多政府数据集的日期字段采用DD/MM/YYYY格式(以色列惯例),而非ISO 8601。Agent可能会将“01/02/2026”解析为2月1日而非1月2日。
- 偏移分页上限约为32000条记录。对于更大规模的数据提取,使用基于的游标分页(按
_id升序排序,筛选_id大于最后一条记录的ID)。_id
Reference Links
参考链接
| Source | URL | What to Check |
|---|---|---|
| data.gov.il portal | https://data.gov.il | Browse Israeli open data catalog, organizations, datasets |
| CKAN API reference | https://docs.ckan.org/en/latest/api/ | |
| data.gov.il dataset list | https://data.gov.il/dataset | Discover available datasets by organization and tag |
| Central Bureau of Statistics | https://www.cbs.gov.il | Upstream source for many data.gov.il statistics |
| Bank of Israel data | https://www.boi.org.il | Financial and monetary datasets not on data.gov.il |
| 来源 | URL | 查看内容 |
|---|---|---|
| data.gov.il门户 | https://data.gov.il | 浏览以色列开放数据目录、机构、数据集 |
| CKAN API参考 | https://docs.ckan.org/en/latest/api/ | |
| data.gov.il数据集列表 | https://data.gov.il/dataset | 按机构和标签发现可用数据集 |
| 中央统计局 | https://www.cbs.gov.il | data.gov.il许多统计数据的上游来源 |
| 以色列银行数据 | https://www.boi.org.il | data.gov.il上没有的金融和货币数据集 |
Troubleshooting
故障排除
Error: "Dataset not found"
错误:“Dataset not found”(未找到数据集)
Cause: Search terms too specific or in wrong language
Solution: Try broader Hebrew keywords. Government data is primarily in Hebrew.
原因:搜索词过于具体或语言错误
解决方案:尝试更宽泛的希伯来语关键词。政府数据主要为希伯来语。
Error: "Datastore not available"
错误:“Datastore not available”(数据存储不可用)
Cause: Not all resources have the datastore (queryable) API enabled
Solution: Download the CSV/Excel resource directly and process locally.
原因:并非所有资源都启用了可查询的data store API
解决方案:直接下载CSV/Excel资源并在本地处理。
Error: "403 Forbidden" on SQL queries
错误:SQL查询返回“403 Forbidden”
Cause: The endpoint may be disabled by data.gov.il
Solution: Use with , , , and parameters instead. For example:
datastore_search_sqldatastore_searchfiltersfieldssortqdatastore_search?resource_id=ID&filters={"city":"Haifa"}&fields=field1,field2&sort=field1 desc&limit=100原因:data.gov.il可能已禁用端点
解决方案:改用带有、、和参数的。例如:
datastore_search_sqlfiltersfieldssortqdatastore_searchdatastore_search?resource_id=ID&filters={"city":"Haifa"}&fields=field1,field2&sort=field1 desc&limit=100Error: "Hebrew field names"
错误:“Hebrew field names”(希伯来语字段名称)
Cause: Most government datasets have Hebrew column names
Solution: First query with limit=1 to see all field names, then construct targeted queries.
原因:大多数政府数据集使用希伯来语列名
解决方案:先使用limit=1查询查看所有字段名称,然后构建针对性查询。