說明 Usage

最後修改:2023/10/19

使用規範:

本 API 採「政府資料開放授權條款-第1版

回傳格式說明:

  • 回傳格式為 JSON。
  • 查詢網址為 https://portal.taibif.tw/api/{version}/{type}/{mode}?{parameter},其中:
    • {version}:API 版本,此版本為 v2 。
    • {type}:查詢資料種類,目前提供 occurrence、dataset 與 publisher 。
    • {mode}:限出現紀錄 (occurrence) 資料類型查詢,目前提供 detail_occ(轉釋欄位 + 基本欄位 + 常用欄位資料回傳)與 raw_occ(原始資料回傳)。
      各自的差別請看出現紀錄查詢類型說明。
    • {parameter}:查詢參數
    • 網址範例:
    資料種類{type}範例
    occurrence (detail_occ) https://portal.taibif.tw/api/v2/occurrence/detail_occ?{parameter}=
    occurrence (raw_occ) https://portal.taibif.tw/api/v2/occurrence/raw_occ?{parameter}=
    dataset https://portal.taibif.tw/api/v2/dataset?{parameter}=
    publisher https://portal.taibif.tw/api/v2/publisher?{parameter}=
  • 分頁參數說明:

    參數名稱 {parameter} 說明範例
    rows每頁回傳筆數。預設為 100 筆,1000 筆為上限 https://portal.taibif.tw/api/v2/occurrence/detail_occ?rows=100
    offset 起始回傳資料位置。預設為 0 。 https://portal.taibif.tw/api/v2/occurrence/detail_occ?offset=0
  • 如有建議或額外需求,歡迎聯絡我們

出現紀錄 Occurrence API

查詢方式:

用途參數名稱 {parameter}查詢網址
取得出現紀錄資料請看回傳欄位說明/api/v2/occurrence/

出現紀錄查詢類型

  • 出現紀錄資料類型查詢 {mode} 說明:
  • 定義名稱描述欄位名稱
    轉釋資料TaiBIF 針對特定欄位資料做清理 (例如統一格式等)共 33 個欄位:taibifOccurrenceID、basisOfRecord、scientificName、taxonGroup、taxonRank、scientificNameID、isPreferredName、taxonBackbone、taicolTaxonID、gbifAcceptedID、kingdom、phylum、class、order、family、genus、eventDate、year、month、day、geodeticDatum、verbatimSRS、decimalLongitude、decimalLatitude、coordinateUncertaintyInMeters、countryCode、country、county、habitatReserve、wildlifeReserve、occurrenceStatus、selfProduced、license
    基本資料出現紀錄相關的重要欄位共 18 個欄位:originalScientificName、occurrenceID、dataGeneralizations、coordinatePrecision、locality、organismQuantity、organismQuantityType、datasetName、datasetShortName、typeStatus、recordedBy、recordNumber、preservation、catalogNumber、taibifCreatedDate、taibifModifiedDate、associatedMedia、mediaLicense
    常用資料出現紀錄相關的次要欄位共 5 個欄位: gbifID、taibifDatasetID、gbifDatasetID、establishmentMeans、issue
    原始資料資料上傳者所提供的資料
  • 各查詢類型的回傳欄位說明:
  • 類型 {mode}回傳內容回傳欄位
    detail_occ轉釋資料 + 基本資料 + 常用資料共回傳 56 個欄位
    raw_occ原始資料資料上傳者所提供的所有資料

    參數說明

    參數名稱 {parameter}中文欄位名型態detail_occ 可查詢raw_occ 可查詢範例補充說明與限定搜尋字彙
    基本資訊
    occurrenceID資料發布者提供資料辨識碼IDhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?occurrenceID=HAST-127359
    gbifIDGBIF 資料辨識碼IDhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?gbifID=3415055547僅限有公開至GBIF的資料集
    taibifOccurrenceIDTaiBIF 資料辨識碼IDhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?taibifOccurrenceID=hast-1186
    basisOfRecord紀錄類型Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?basisOfRecord=HumanObservation
    taibifModifiedDateTaiBIF 更新日期Date單一日期:https://portal.taibif.tw/api/v2/occurrence/detail_occ?taibifModifiedDate=2023-05-23
    兩個日期之間:https://portal.taibif.tw/api/v2/occurrence/detail_occ?taibifModifiedDate=2022-01-01,2023-05-24
    taibifDatasetIDTaiBIF 資料集 IDUUIDhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?taibifDatasetID=e6413726-2db3-4561-a4c1-55871eab9e4c
    gbifDatasetIDGBIF 資料集 IDUUIDhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?gbifDatasetID=233783dc-e13a-4770-9d24-797590ff8716
    datasetName資料集名稱Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?datasetName=Sea turtle
    occurrenceStatus觀測狀態Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?occurrenceStatus=present
    物種資訊
    scientificName拉丁學名Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?scientificName=chelonia
    https://portal.taibif.tw/api/v2/occurrence/detail_occ?scientificName=Collix ghosha
    taxonGroup類群種類Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?taxonGroup=insects物種類群,目前提供:plants, fungi, bacteria, insects, fishes, reptiles, amphibians, birds, mammals, others. 如有別的類群需求請聯絡我們。
    taicolTaxonID臺灣物種名錄物種編碼 taxonIDStringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?taicolTaxonId=t0096596
    kingdomStringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?kingdom=Plantae
    phylumStringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?phylum=Tracheophyta
    classStringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?class=Elasmobranchii
    orderStringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?order=Magnoliales
    familyStringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?family=Erebidae
    genusStringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?genus=Grevillea
    taxonRank分類階層Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?taxonRank=order
    establishmentMeans類群當地原生性Stringhttps://portal.taibif.tw/api/v2/occurrence/raw_occ?establishmentMeans=nativenative, nativeReintroduced, introduced, introducedAssistedColonisation, vagrant, uncertain
    時間資訊
    eventDate觀測日期Date單一日期:https://portal.taibif.tw/api/v2/occurrence/detail_occ?eventDate=2022-01-01
    兩個日期之間:https://portal.taibif.tw/api/v2/occurrence/detail_occ?eventDate=2022-01-01,2022-03-31
    year觀測年Numeric單一年份:https://portal.taibif.tw/api/v2/occurrence/detail_occ?year=2022
    兩個年份之間:https://portal.taibif.tw/api/v2/occurrence/detail_occ?year=2020,2022
    month觀測月Numerichttps://portal.taibif.tw/api/v2/occurrence/detail_occ?month=3
    地理資訊
    country國家Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?country=Taiwan
    county臺灣縣市String單一縣市:https://portal.taibif.tw/api/v2/occurrence/detail_occ?county=Lienchiang County
    多選:https://portal.taibif.tw/api/v2/occurrence/detail_occ?county=Kaohsiung City,Taitung County
    decimalLatitude緯度String緯度之間:https://portal.taibif.tw/api/v2/occurrence/detail_occ?decimalLatitude=-22.24829&decimalLatitude=-14.21675
    經緯度之間:https://portal.taibif.tw/api/v2/occurrence/detail_occ?decimalLongitude=121&decimalLatitude=22
    方形:https://portal.taibif.tw/api/v2/occurrence/detail_occ?decimalLongitude=120&decimalLongitude=121&decimalLatitude=22&decimalLatitude=24
    decimalLongitude經度String格式同上
    coordinateUncertaintyInMeters原始座標誤差(公尺)Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?coordinateUncertaintyInMeters=500
    其他資訊
    issue資料問題Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?issue=Taxon Match NoneTaxon Match None, Coordinate Invalid, Recorded Date Invalid
    license觀測紀錄授權Stringhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?license=CC0CC0, CC-BY, CC-BY-NC, NA
    selfProducedTaiBIF IPT 來源的資料Booleanhttps://portal.taibif.tw/api/v2/occurrence/detail_occ?selfProduced=TRUETRUE, FALSE

    其他回傳欄位說明:

    回傳欄位說明型態
    基本資訊
    originalScientificName原始紀錄物種String
    taibifCreatedDate資料建立日期String
    datasetShortName資料集名稱String
    物種資訊
    isPreferredNameTaiCOL 上的俗名String
    gbifAcceptedIDGBIF TaxonIDString
    scientificNameID物種名稱代碼String
    taxonBackbone物種 Backbone 來源String
    時間資訊
    dayNumeric
    地理資訊
    geodeticDatum座標系統String
    verbatimSRS空間參考系統String
    dataGeneralizations座標是否有模糊化String
    coordinatePrecision座標模糊化程度String
    locality出現地String
    habitatReserve自然生態保護區String
    wildlifeReserve野生動物保護區String
    countryCode國家代碼String
    標本相關
    typeStatus模式標本String
    preservation保存方式String
    catalogNumber館藏號String
    其他資訊
    recordedBy記錄(採集)者String
    recordNumber採集號String
    organismQuantity數量String
    organismQuantityType數量單位String
    associatedMedia多媒體連結String
    mediaLicense多媒體授權String

    更多範例

    使用情境範例
    取得所有有臺灣點位的哺乳類資料https://portal.taibif.tw/api/v2/occurrence/detail_occ?country=Taiwan&taxonGroup=mammals
    取得某觀測日期的300筆資料https://portal.taibif.tw/api/v2/occurrence/detail_occ?rows=300&eventDate=2022-01-01

    資料集 Datset API

    查詢方式:

    用途參數名稱 {parameter}查詢網址
    取得資料集資訊datasetName, taibifDatasetID, publisherID, publisherName, author, publicationDate, datasetModifiedDate, gbifDatasetID, license, core, source/api/v2/dataset/

    查詢參數說明:

    參數名稱 {parameter}說明範例限定搜尋字彙
    datasetName資料集名稱,關鍵字模糊查詢https://portal.taibif.tw/api/v2/dataset?datasetName=海龜
    taibifDatasetIDTaiBIF 資料集 IDhttps://portal.taibif.tw/api/v2/datasettaibifDatasetID=e7b6eb08-1380-40c7-9a2e-60d2ac9b00c2
    publisherID同 GBIF 發布單位 IDhttps://portal.taibif.tw/api/v2/dataset?publisherID=7c07cec1-2925-443c-81f1-333e4187bdea
    publisherName發布單位名稱,關鍵字模糊查詢https://portal.taibif.tw/api/v2/dataset?publisherName=Taiwan
    author發布者https://portal.taibif.tw/api/v2/dataset?author=Li
    publicationDate資料集發布日期單一日期:https://portal.taibif.tw/api/v2/dataset?publicationDate=2020-07-30
    兩個日期之間:https://portal.taibif.tw/api/v2/dataset?publicationDate=2013-08-12,2020-07-01
    datasetModifiedDate資料集更新日期https://portal.taibif.tw/api/v2/dataset?datasetModifiedDate=2020-07-30
    gbifDatasetIDGBIF 資料集 IDhttps://portal.taibif.tw/api/v2/dataset?gbifDatasetID=233783dc-e13a-4770-9d24-797590ff8716
    license資料授權格式https://portal.taibif.tw/api/v2/dataset?license=CC0
    https://portal.taibif.tw/api/v2/dataset?license=CC-BY
    CC0, CC-BY, CC-BY-NC, NA
    core資料核心集https://portal.taibif.tw/api/v2/dataset?core=OCCURRENCESAMPLINGEVENT, OCCURRENCE, CHECKLIST, METADATA, OTHER

    回傳欄位說明:

    使用 Dataset API 回傳欄位包含查詢參數,總共 15 個欄位。
    回傳欄位說明型態
    datasetShortName資料集在 IPT 上的 short nameString
    doi數位物件識別號(Digital Object Identifier)String
    numberRecord資料集紀錄數量String
    numberOccurrence資料集出現紀錄筆數String
    source資料集來源,無特別標註表示此資料集僅發佈至 IPTString

    發布單位 Publisher API

    查詢方式:

    用途參數名稱 {parameter}查詢網址
    取得發布單位資訊publisherName, publisherID, countryCode/api/v2/publisher/

    查詢參數說明:

    參數名稱{parameter}說明範例
    publisherName單位名稱,關鍵字模糊查詢https://portal.taibif.tw/api/v2/publisher?publisherName=Forestry
    publisherID於 TaiBIF 註冊的發布單位列表,同 GBIF 發布單位 IDhttps://portal.taibif.tw/api/v2/publisher?publisherID=e506ec0c-b3c5-4c3d-ae69-ebc56596fc52
    countryCode發布單位國家代碼,使用 ISO 3166-1 兩碼https://portal.taibif.tw/api/v2/publisher?countryCode=TW

    其他回傳欄位說明:

    使用 Publisher API 回傳欄位包含查詢參數,總共 8 個欄位。
    回傳欄位說明型態
    description發布單位描述String
    administrativeContact發布單位聯絡人String
    countryOrArea發布單位國家String
    installations裝置String
    technicalContact技術聯絡人String