OPEN API

Home OPEN API
General Description

Description of National Palace Museum's open polices

The Taiwanese government's open data-related endeavors involve making raw data datasets publicly available as well as providing related application program interfaces (APIs) to allow open data to be supplied to the public in an application and dynamic processing-friendly manner. Accordingly, the National Palace Museum (NPM) adopts the Advanced Action Plan for the Disclosure of Government Information formulated by the National Development Council to regulate the NPM's Open API services.

Applying for an API Key

All APIs provided on this website require an API key for verification. Therefore, prior to using these APIs, users must request for an API key by clicking on the right side of this screen. An e-mail notification will subsequently be sent to the users once their application is approved.

Instructions

This website uses the RESTful Web API. Accordingly, users may obtain open data from this website by using HTTP GET and return their results by using the JSON format.

Verification

When using API services offered by this website, users must enter the API key in the HTTP Header every time. The numeric portion of the apiKey is the users'API Key. An example of the apiKey format is shown below: 6fc459ea-ee9a-3ca4-8e43-db77e1603333.

Definition

{SRU}:The root URL of the API services provided on this website.

https://openapi.npm.gov.tw/v1/rest/

An example of the service structures

https://openapi.npm.gov.tw/v1/rest/collection/search/04000975?limit=2&offset=10&lang=eng

{SRU}: https://openapi.npm.gov.tw/v1/rest/

Service Path:https://openapi.npm.gov.tw/v1/rest/collection/search/04000967

Input:?limit=2&offset=10&lang=eng

Return

{
    "status": 200,
    "result": [
        {
            "Serial_No": "04000967",
            "ArticleSubject": "Evening Outing by Torchlight",
            "CateGory": "Painting",
            "Slogan": "Song dynasty",
            "art_room": ""
        }
    ],
    "error": null
}

statusHttp Status Code

resultservice return result

error error message; return "null" when there is no error message