DIRLINE API offers a RESTful Web Service API that allows users to search the DIRLINE database with keywords. Using this API, software developers can smoothly integrate DIRLINE data into their own applications.
To handle large volume of return results, this web service search starts with an initial search and is followed by subsequent requests. The initial search returns a query summary with a unique identifier in the <TemporaryFile> tag. This unique identifier is used as a parameter in subsequent requests to reference the current search. The subsequent search returns the records in a specified range.
The DIRLINE Web Service API is free of charge. Neither registration or licensing is required. If you build an interface using the DIRLINE Web Service API, please indicate that the information is from DIRLINE or the National Library of Medicine. If you have questions about the DIRLINE Web Service API, please contact us.
Required Parameters for Initial Search Requests
Parameter Name | Description |
---|---|
db | Database to search. The valid database name is dirline. Please note that the database name must be in lowercase. |
keyword | The keyword submitted to the web
service. Spaces should be replaced by '+' signs. Special characters should be replaced with a "%" followed by their ASCII code in hexadecimal. |
Search for spinal cord injury in the DIRLINE database.
URL for initial
search:
http://dirgate.nlm.nih.gov/cgi-bin/sis/search/x?dbs+dirline:spinal+cord+injury
Search Result: Click here (Please allow your browser to show blocked content by right clicking on the information bar.)
Search Result Example: Click here (Please allow your browser to show blocked content by right clicking on the information bar.)
DIRLINE API Response Format:
Descriptions of Tags
Tag Name | Description |
---|---|
QueryResult | Basic node that contains the response. |
Count | Total number of records returned in the current search. |
DispMax | Maximum records displayed for each subsequent search. Default value = 20. |
Id | List of DOCNOs. |
TemporaryFile | A unique identifier that specifies the current search. Used in the subsequent search. Session will expire after 30 minutes of inactivity. |
Translation | Description of this search. |
http://dirgate.nlm.nih.gov/cgi-bin/sis/search/g?<TemporaryFile>:<n>
Required Parameters for Subsequent Requests
Parameter Name | Description |
---|---|
TemporaryFile | The unique identifier returned in the initial search tag <TemporaryFile> which refers to the current search. Expires in 30 minutes. |
n | n indicates to start at the (n+1)th record and display the following 20 records. Note: n starts at 0. |
Base
URL:
http://dirgate.nlm.nih.gov/cgi-bin/sis/search/g?./temp/~7wiTBN:0
Search Result: Click here (Please allow your browser to show blocked content by right clicking on the information bar.)
DIRLINE API Response Format:
Description of Tags
Tag Name | Description |
---|---|
DocSumSet | Basic node that contains the response. |
Id | List of DOCNOs. |
DocSum | Document Summary. |
DOCNO | Document Number. |
na | Name. |
ac | Acronym. |
A DIRLINE full record can be requested in either DIRLINE API Response format or HTML format.
URL for requesting a full record
in the DIRLINE API Response format
http://dirgate.nlm.nih.gov/cgi-bin/sis/search/z?dbs+<db>:@term+@DOCNO+<DOCNO>
URL for requesting a full record
in the HTML format
http://dirgate.nlm.nih.gov/cgi-bin/sis/search/r?dbs+<db>:@term+@DOCNO+<DOCNO>
Required Parameters for Full Record Request
Parameter Name | Description |
---|---|
db | Database to search. The valid database name is dirline. Please note that the database name must be in lowercase. |
DOCNO | The record DOCNO. |
Base URL: http://dirgate.nlm.nih.gov/cgi-bin/sis/search/r?dbs+dirline:@term+@DOCNO+NLM/80125
Search Result: Click here
Retrieve a full record NLM/80125 from the DIRLINE database in the DIRLINE API Response format.Base URL: http://dirgate.nlm.nih.gov/cgi-bin/sis/search/z?dbs+dirline:@term+@DOCNO+NLM/80125
Search Result: Click here (Please allow your browser to show blocked content by right clicking on the information bar.)
DIRLINE API Response Format:
Description of Tags
Tag Name | Description |
---|---|
DocList | Basic node that contains the response. |
Doc | Node for each returned record. |
DOCNO | Document Number. |
na | Title. |
ad | Address. |
tel | Telephone. |
site | Other Offices. |
des | Description. |
ab | Abstract. |
pb | Publications. |
gn | General Notes. |
fx | Cross Reference. |
nt | Type of Organization. |
sa | Supported by. |
lun | Limitations on Use. |
rg | National Network of Libraries of Medicine Region. |
mh | MeSH Headings. |
kw | Keywords. |
ho | Holdings. |
id | ID. |
saf | Services and Facilities. |
si | Source ID. |
ac | Acronym. |
lr | Last Reviewed. |
url | Web Address. |