jpndlpy is a requests wrapper library for obtaining book information from the Japan National Diet Library.
jpndlpy is gets information from opensearch provided by the Japan National Diet Library, and The obtained data is converted to json format.
How to install jpndlpy
$ python setup.py install
$ pip3 install jpndlpy
How to Use
sample code
jndlclient = JapanNdlClient()
response = jndlclient.search_text(title="test", cnt=1, from_date="2018-1-22")
print(response.to_json())
Reference | Contents | Match criteria | multi |
---|---|---|---|
dpid | Data Provider ID | Perfect match | able |
dpgroupid | Data Provider Group ID | Perfect match | disable |
any | Search for all items | Partial Match | able |
title | Title | Partial Match | able |
creator | Creator | Partial Match | able |
publisher | Publisher | Partial Match | able |
ndc | Classification(NDC) | Forward Match | disable |
from_date | Start Publication date(YYYY-MM-DD) | disable | |
until_date | Finished publication date | disable | |
cnt | Output record upper limit | disable | |
idx | Record acquisition start position | disable | |
isbn | isbn | disable | |
mediatype | Type | Perfect match | able |
No | Data Provider Group ID | Data Provider Group ID's Contents |
---|---|---|
1 | Digitalcontents | |
2 | Catalogue | |
3 | Site | Site Information |
4 | Reference | |
5 | Science | Natural Science |
6 | Humanities | |
7 | Library | |
8 | Child | |
9 | Ndl |
symbol | Type |
---|---|
1 | Book |
2 | Articles/White Papper |
3 | Newspaper |
4 | Children's Book |
5 | Reference Document |
6 | Digital Document |
7 | Other |
8 | Document for handicapped people |
9 | legislation Information |
-
Api document: http://iss.ndl.go.jp/information/api/