israel-gov-api

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Israel 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=10
Search by organization (ministry):
GET https://data.gov.il/api/3/action/package_search?fq=organization:MINISTRY_ID
Common organization IDs:
MinistryIDHebrew
Central Bureau of Statisticslamashalishka hamerkazit listatistika
Ministry of Transportationministry_of_transportmisrad hatahaburah
Ministry of Healthministry-healthmisrad habriut
Ministry of Educationministry_of_educationmisrad hachinuch
Israel Tax Authoritytaxes-authorityrashut hamisim
Israel Land Authoritythe_israel_lands_administrationrashut mekarkei yisrael
Ministry of Interiorinterior_affairsmisrad 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希伯来语
中央统计局lamashalishka hamerkazit listatistika
交通部ministry_of_transportmisrad hatahaburah
卫生部ministry-healthmisrad habriut
教育部ministry_of_educationmisrad hachinuch
以色列税务局taxes-authorityrashut hamisim
以色列土地管理局the_israel_lands_administrationrashut mekarkei yisrael
内政部interior_affairsmisrad 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_ID
Query tabular data (datastore):
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&limit=100
Filter by field values:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&filters={"field_name":"value"}&limit=100
Select 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=100
Full-text search within a resource:
GET https://data.gov.il/api/3/action/datastore_search?resource_id=RESOURCE_ID&q=search+term&limit=100
Important: The
datastore_search_sql
endpoint may be disabled on data.gov.il (often returns 403 Forbidden). Use
datastore_search
with
filters
,
fields
,
sort
,
q
,
limit
, and
offset
parameters instead.
Tips:
  • Field names are often in Hebrew -- use
    datastore_search
    with
    limit=1
    first to see field names
  • Use
    filters
    parameter with a JSON object for exact field matching (e.g.,
    filters={"city_code":"5000"}
    )
  • Use
    q
    parameter for full-text search across all fields
  • Large datasets: use
    limit
    and
    offset
    for pagination
  • 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
    offset=
    requests will start returning errors or empty pages.
  • For datasets above ~32k rows, switch to cursor paging on
    _id
    : sort by
    _id
    ascending and keep
    filters={"_id":">LAST_ID"}
    between calls. CKAN exposes the
    _id
    integer on every record.
  • The response
    total
    field is the count of all records in the resource (not in the page), so use it to plan how many pages you need.
  • records_format
    accepts
    objects
    (default JSON),
    lists
    (positional arrays),
    csv
    , or
    tsv
    .
    lists
    and
    csv
    are noticeably faster and cheaper for large pulls; reach for them when streaming or bulk-extracting.
找到数据集后:
获取数据集详情:
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上的
datastore_search_sql
端点可能已禁用(通常返回403 Forbidden)。请改用带有
filters
fields
sort
q
limit
offset
参数的
datastore_search
技巧:
  • 字段名称通常为希伯来语——先使用
    datastore_search
    并设置
    limit=1
    查看字段名称
  • 使用
    filters
    参数搭配JSON对象进行精确字段匹配(例如:
    filters={"city_code":"5000"}
  • 使用
    q
    参数对所有字段进行全文搜索
  • 大型数据集:使用
    limit
    offset
    进行分页
  • 日期字段可能有多种格式——查看数据集文档
分页说明:
  • data.gov.il数据存储的偏移分页上限约为32000条记录。超过此数量后,使用深
    offset=
    请求会开始返回错误或空页面。
  • 对于超过约32000行的数据集,切换到基于
    _id
    的游标分页:按
    _id
    升序排序,并在调用之间保持
    filters={"_id":">LAST_ID"}
    。CKAN会为每条记录提供整数类型的
    _id
  • 响应中的
    total
    字段是资源中的总记录数(而非当前页面的记录数),因此可用于规划需要多少页。
  • records_format
    接受
    objects
    (默认JSON格式)、
    lists
    (位置数组)、
    csv
    tsv
    。在流式传输或批量提取时,
    lists
    csv
    格式明显更快、成本更低;在这些场景下优先选择它们。

Step 4: Analyze and Present

步骤4:分析与呈现

For the retrieved data:
  1. Summarize key findings in plain language
  2. Calculate basic statistics if requested (mean, median, trends)
  3. Suggest visualizations (bar chart, line graph, map) appropriate to the data
  4. Note data freshness (last update date) and any caveats
  5. Provide the direct link to the dataset on data.gov.il for reference
对于获取到的数据:
  1. 用通俗易懂的语言总结关键发现
  2. 如果有需求,计算基础统计数据(平均值、中位数、趋势)
  3. 根据数据类型建议合适的可视化方式(柱状图、折线图、地图)
  4. 注明数据的新鲜度(最后更新日期)及任何注意事项
  5. 提供data.gov.il上该数据集的直接链接供参考

Step 5: Cross-Reference (Advanced)

步骤5:交叉引用(进阶)

When combining multiple datasets:
  1. Identify common keys (city code, date, category code)
  2. Use Israeli administrative codes (CBS city codes) for geographic joins
  3. Note that field names across datasets may differ -- match by content not name
  4. Document data lineage: which datasets contributed to the analysis
当合并多个数据集时:
  1. 识别共同键(城市代码、日期、类别代码)
  2. 使用以色列行政代码(CBS城市代码)进行地理关联
  3. 注意不同数据集的字段名称可能不同——根据内容而非名称匹配
  4. 记录数据来源:哪些数据集为分析提供了数据

Commonly Requested Datasets

常见请求数据集

Resource IDs below were verified live on 2026-05-13 via
datastore_search?resource_id=<id>&limit=1
. IDs on data.gov.il do change without notice. Always re-verify before quoting them to a user.
DatasetResource IDDescription
Private and commercial vehicles (vehicle registration)
053cea08-09bc-40ec-8f7a-156f0677aff3
Full registry of private and commercial vehicle license plates with make, model, year. ~4.1M rows.
Public-transport vehicles
cf29862d-ca25-4691-84f6-1be60dcb4a1e
Active license plates of public-transport vehicles (buses, taxis). ~65k rows.
Education institutions (
mosdot
)
5548fd63-5868-4053-ad81-98caddc5e232
Characteristics of educational institutions supervised by the Ministry of Education. ~120k rows.
Registered amutot (NGOs)
be5b7935-3922-45d4-9638-08871b17ec95
Ministry of Justice registry of associations / non-profits. ~75k rows.
For other domains (GTFS public transport, real-estate transactions, hospital quality, air quality), use
package_search
to discover the current dataset, then
package_show
to grab the active
resources[].id
-- those IDs rotate when datasets are re-published year over year.
以下资源ID是在2026-05-13通过
datastore_search?resource_id=<id>&limit=1
验证过的。data.gov.il上的ID可能会无通知变更。在向用户引用这些ID前,请务必重新验证。
数据集资源ID描述
私人和商用车辆(车辆登记)
053cea08-09bc-40ec-8f7a-156f0677aff3
私人和商用车辆牌照的完整注册表,包含品牌、型号、年份。约410万行。
公共交通车辆
cf29862d-ca25-4691-84f6-1be60dcb4a1e
公共交通车辆(公交车、出租车)的有效牌照。约6.5万行。
教育机构(
mosdot
5548fd63-5868-4053-ad81-98caddc5e232
教育部监管的教育机构特征信息。约12万行。
注册非营利组织(amutot)
be5b7935-3922-45d4-9638-08871b17ec95
司法部的协会/非营利组织注册表。约7.5万行。
对于其他领域(GTFS公共交通、房地产交易、医院质量、空气质量),使用
package_search
发现当前数据集,然后使用
package_show
获取有效的
resources[].id
——这些ID会随着数据集每年重新发布而变更。

Examples

示例

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):
  1. Discover candidate datasets:
    curl -s "https://data.gov.il/api/3/action/package_search?q=mosdot&rows=5"
  2. Inspect the chosen dataset and grab the active
    resources[].id
    :
    curl -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]"
  3. Peek at field names with
    limit=1
    :
    curl -s "https://data.gov.il/api/3/action/datastore_search?resource_id=5548fd63-5868-4053-ad81-98caddc5e232&limit=1"
  4. 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会变更):
  1. 发现候选数据集:
    curl -s "https://data.gov.il/api/3/action/package_search?q=mosdot&rows=5"
  2. 检查选定的数据集并获取有效的
    resources[].id
    curl -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]"
  3. 使用
    limit=1
    查看字段名称:
    curl -s "https://data.gov.il/api/3/action/datastore_search?resource_id=5548fd63-5868-4053-ad81-98caddc5e232&limit=1"
  4. 一旦获取到正确的希伯来语字段名称(通常为
    סמל_ישוב
    ),按特拉维夫城市代码(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:
  1. package_search?q=nadlan
    or
    q=%D7%A2%D7%A1%D7%A7%D7%90%D7%95%D7%AA
    to find the Tax Authority real-estate transactions dataset.
  2. package_show?id=<slug>
    and grab the most recent year's resource id from
    resources[]
    .
  3. datastore_search
    with the Haifa city code filter, sorted by transaction date descending.
  4. Group by month, compute median price per square meter, calculate month-over-month percentage change.
Result: Monthly price trend for Haifa with analysis.
用户说:“展示海法的房价趋势”
操作步骤:
  1. 使用
    package_search?q=nadlan
    q=%D7%A2%D7%A1%D7%A7%D7%90%D7%95%D7%AA
    查找税务局的房地产交易数据集。
  2. 使用
    package_show?id=<slug>
    并从
    resources[]
    中获取最近一年的资源ID。
  3. 使用
    datastore_search
    并按海法城市代码筛选,按交易日期降序排序。
  4. 按月分组,计算每平方米的中位数价格,计算月度环比变化百分比。
结果:海法的月度价格趋势及分析。

Example 3: Municipal Data Comparison

示例3:市政数据对比

User says: "Compare education spending across Israeli cities"
Actions:
  1. package_search?q=%D7%AA%D7%A7%D7%A6%D7%99%D7%91%20%D7%97%D7%99%D7%A0%D7%95%D7%9A
    (budget + education in Hebrew, percent-encoded).
  2. Pick a municipal-budget dataset,
    package_show
    to retrieve the active resource id.
  3. datastore_search
    filtered to education-category rows; paginate via
    _id
    cursor if the resource exceeds 32k rows.
  4. Normalize per capita using
    lamas
    (CBS) population figures.
Result: Ranked comparison of education spending per student across major Israeli municipalities with data source and year.
用户说:“对比以色列各城市的教育支出”
操作步骤:
  1. 使用
    package_search?q=%D7%AA%D7%A7%D7%A6%D7%99%D7%91%20%D7%97%D7%99%D7%A0%D7%95%D7%9A
    (希伯来语的“预算+教育”,已进行百分比编码)。
  2. 选择一个市政预算数据集,使用
    package_show
    获取有效的资源ID。
  3. 使用
    datastore_search
    筛选教育类别行;如果资源超过32000行,使用
    _id
    游标进行分页。
  4. 使用
    lamas
    (CBS)的人口数据按人均标准化。
结果:以色列主要城市的生均教育支出排名对比,包含数据源和年份。

Bundled Resources

捆绑资源

Scripts

脚本

  • scripts/query_datagov.py
    -- Search datasets, inspect resources, and run datastore queries against the data.gov.il CKAN API directly from the command line. Supports subcommands:
    search
    ,
    dataset
    ,
    query
    ,
    orgs
    . Run:
    python scripts/query_datagov.py --help
  • scripts/query_datagov.py
    —— 直接从命令行搜索数据集、检查资源并针对data.gov.il的CKAN API运行数据存储查询。支持子命令:
    search
    dataset
    query
    orgs
    。运行:
    python scripts/query_datagov.py --help

References

参考资料

  • references/ckan-api-reference.md
    -- 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调用或调试查询语法时参考。

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.
MCPURLWhat it gives you
datagov-israel
https://agentskills.co.il/he/mcps/government-services/datagov-israelDirect MCP tool access to the data.gov.il CKAN API (search, package_show, datastore_search).
data-gov-il
https://agentskills.co.il/he/mcps/government-services/data-gov-ilAlternative MCP wrapping the same data.gov.il CKAN API.
israel-vehicles
https://agentskills.co.il/he/mcps/government-services/israel-vehiclesPre-scoped MCP for the vehicle registration dataset (license-plate lookup, make/model/year).
israel-amutot
https://agentskills.co.il/he/mcps/government-services/israel-amutotPre-scoped MCP for the Ministry of Justice amutot (NGO) registry.
israel-elections
https://agentskills.co.il/he/mcps/government-services/israel-electionsPre-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调用脚本。
MCPURL功能
datagov-israel
https://agentskills.co.il/he/mcps/government-services/datagov-israel直接通过MCP工具访问data.gov.il的CKAN API(搜索、package_show、datastore_search)。
data-gov-il
https://agentskills.co.il/he/mcps/government-services/data-gov-il包装同一data.gov.il CKAN API的替代MCP。
israel-vehicles
https://agentskills.co.il/he/mcps/government-services/israel-vehicles针对车辆登记数据集的预限定MCP(牌照查询、品牌/型号/年份)。
israel-amutot
https://agentskills.co.il/he/mcps/government-services/israel-amutot针对司法部非营利组织(amutot)注册表的预限定MCP。
israel-elections
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
    package_show
    before quoting them.
  • 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
    q
    parameters must be UTF-8 percent-encoded. Raw Hebrew in URLs breaks several HTTP clients (some
    curl
    builds, older
    requests
    versions, certain proxies). Example: search for "רכב" as
    q=%D7%A8%D7%9B%D7%91
    ; filter on "חיפה" as
    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
    Security Violation
    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
    User-Agent
    . Do not retry tight-loop, the WAF will extend the block.
  • 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
    _id
    (sort by
    _id
    ascending, filter
    _id
    greater than last seen).
  • 以色列政府数据API(data.gov.il)经常无通知更改URL和端点结构。Agent可能硬编码了上个月可用但现在返回404的端点。在引用资源ID前,请务必使用
    package_show
    重新验证。
  • data.gov.il API默认返回带有希伯来语列标题的数据。Agent可能无法解析JSON或CSV输出中包含非ASCII标题名的响应。
  • 希伯来语筛选值和
    q
    参数必须进行UTF-8百分比编码。URL中的原始希伯来语会导致多个HTTP客户端出错(部分
    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调用之间添加延迟。
  • 返回带有
    Security Violation
    内容的403响应,是data.gov.il的WAF终止了你的会话。这与授权403不同。恢复方法:指数退避(10秒、30秒、60秒),删除所有会话Cookie,使用新的
    User-Agent
    重试。请勿循环重试,否则WAF会延长封禁时间。
  • 许多政府数据集的日期字段采用DD/MM/YYYY格式(以色列惯例),而非ISO 8601。Agent可能会将“01/02/2026”解析为2月1日而非1月2日。
  • 偏移分页上限约为32000条记录。对于更大规模的数据提取,使用基于
    _id
    的游标分页(按
    _id
    升序排序,筛选
    _id
    大于最后一条记录的ID)。

Reference Links

参考链接

SourceURLWhat to Check
data.gov.il portalhttps://data.gov.ilBrowse Israeli open data catalog, organizations, datasets
CKAN API referencehttps://docs.ckan.org/en/latest/api/
package_search
,
package_show
,
datastore_search
signatures
data.gov.il dataset listhttps://data.gov.il/datasetDiscover available datasets by organization and tag
Central Bureau of Statisticshttps://www.cbs.gov.ilUpstream source for many data.gov.il statistics
Bank of Israel datahttps://www.boi.org.ilFinancial 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/
package_search
package_show
datastore_search
签名
data.gov.il数据集列表https://data.gov.il/dataset按机构和标签发现可用数据集
中央统计局https://www.cbs.gov.ildata.gov.il许多统计数据的上游来源
以色列银行数据https://www.boi.org.ildata.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
datastore_search_sql
endpoint may be disabled by data.gov.il Solution: Use
datastore_search
with
filters
,
fields
,
sort
, and
q
parameters instead. For example:
datastore_search?resource_id=ID&filters={"city":"Haifa"}&fields=field1,field2&sort=field1 desc&limit=100
原因:data.gov.il可能已禁用
datastore_search_sql
端点 解决方案:改用带有
filters
fields
sort
q
参数的
datastore_search
。例如:
datastore_search?resource_id=ID&filters={"city":"Haifa"}&fields=field1,field2&sort=field1 desc&limit=100

Error: "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查询查看所有字段名称,然后构建针对性查询。