Learning Resources Logo

Learning Resources Database

Sample URIs | Query Parameters

Making calls to the NLM Learning Resources API is simple.
The API returns JSON and is easily parsed with a few lines of jQuery your web pages. See sample code for more details.

The Base URI is https://learn.nlm.nih.gov.

Sample URIs

Sample URI Use case
/rest/learning-resources/all Retrieves all learning resources.
/rest/subjects/all Retrieves all subjects used to categorize learning resources.
/rest/learning-resources/L00079080 Retrieves one learning resource by identifier.
/rest/learning-resources/search?query=“Searching PubMed” Searches the title, description, and subjects of learning resources for the string ‘Searching PubMed’.
/rest/learning-resources/search?subjects=S019080,S020080 Retrieves learning resources by subject identifier(s).

Query Parameters

These parameters apply to the /rest/learning-resources endpoint.

Parameter Name Description Valid Value(s) Use Case
query A human-readable term used for searching learning resources, such as “Drugs”, or “PubMed Central” Any search term Returns learning resources based on matches in the title, description, and subject fields.
subjects An identifier starting with the letter ‘S’ that is associated with a subject area of a learning resource Any valid subject identifier from the subjects retrieval endpoint. Retrieves learning resources that have been tagged with one or more subjects.

Output for retrieving all resources

https://learn.nlm.nih.gov/rest/learning-resources/all

{

"learningResources": [

{

    "ui": "L00003080",
    "name": "PubMed Basics (tri-fold)",
    "content": "http://nnlm.gov/training/resources/pmtri.pdf",
    "description": "A tri-fold brochure providing basic search instructions for PubMed, provided by the National Network of Libraries of Medicine (NN/LM).",
    "format": 

{

    "uri": "https://learn.nlm.nih.gov/rest/formats/F003014",
    "name": "PDF",
    "type": "Pamphlet",
    "ui": "F003014"

},

"runTime": "",
"archivedYN": "N",
"dateCreated": "Sun, 01 Jun 2014 00:00:00 EST",
"dateUpdated": "Mon, 01 Jun 2015 00:00:00 EST",
"subjects": [

        {
            "uri": "https://learn.nlm.nih.gov/rest/subjects/S019080",
            "name": "PubMed",
            "ui": "S019080"
        }
    ]

},
{
//lots more!!
},
...
]
}

Output for retrieving all subjects

https://learn.nlm.nih.gov/rest/subjects/all

{

    "Subjects": 

[

{

    "uri": "https://learn.nlm.nih.gov/rest/subjects/S031066",
    "name": "Bioinformatics",
    "ui": "S031066"

},
{

    "uri": "https://learn.nlm.nih.gov/rest/subjects/S032067",
    "name": "Clinical Medicine",
    "ui": "S032067"

},
{

    "uri": "https://learn.nlm.nih.gov/rest/subjects/S001067",
    "name": "ClinicalTrials.gov",
    "ui": "S001067"

},
...
]

}

Output for retrieving one learning resource

https://learn.nlm.nih.gov/rest/learning-resources/L00079080

{

    "ui": "L00079080",
    "name": "Branching Out: The MeSH Vocabulary",
    "content": "https://www.nlm.nih.gov/bsd/disted/video/index.html",
    "description": "An 11-minute video provides an introduction to the scope, structure and use of the Medical Subject Headings (MeSH) in PubMed.",
    "format": 

{

    "uri": "https://learn.nlm.nih.gov/rest/formats/F008020",
    "name": "MP4 Video",
    "type": "Video Tutorial",
    "ui": "F008020"

},
"runTime": "11",
"archivedYN": "N",
"dateCreated": "Fri, 15 Nov 2013 00:00:00 EST",
"dateUpdated": "Tue, 01 May 2012 00:00:00 EST",
"subjects": 
[

{

    "uri": "https://learn.nlm.nih.gov/rest/subjects/S013077",
    "name": "Medical Subject Headings (MeSH)",
    "ui": "S013077"

},

        {
            "uri": "https://learn.nlm.nih.gov/rest/subjects/S019080",
            "name": "PubMed",
            "ui": "S019080"
        }
    ]

}