ncbi.nlm.nih.gov/pmc/oai/oai.cgi - OAI-PMH Service

Q

How to use the OAI-PMH Service at ncbi.nlm.nih.gov/pmc/oai/oai.cgi?

✍: FYIcenter.com

A

The OAI-PMH Service at ncbi.nlm.nih.gov/pmc/oai/oai.cgi allows to use OAI-PMH protocol to access metadata of all items in the PubMed Central (PMC) archive, as well as to the full text of a subset of these items.

Query parameters supported by ncbi.nlm.nih.gov/pmc/oai/oai.cgi are:

verb - Required. The verb of the query action: ListIdentifiers, ListSets, ...
from - Optional. The start date of the DOI registration date range.
until - Optional. The end date of the DOI registration date range.
set - Optional. The container of DOI records.
identifier - Optional. The identifier of a single record.
metadataPrefix - Required for ListIdentifiers and ListRecords. The Metadata Format code.
resumptionToken - Optional. The next page token returned from the last call.

PMC only 4 OAI verbs, Identify, ListMetadataFormats, ListSets, ListRecords, and ListIdentifiers.

1. Identify - Returns information about the OAI-PMH Service.

2. ListMetadataFormats - Returns a list for supported data formats, which are: oai_dc, pmc and pmc_fm.

3. ListSets - Returns a list of sets that act as containers of DOI records.

4. ListIdentifiers - Returns a list of DOIs.

5. ListRecords - Returns a list of DOI records.

Here is an example of downloading identifiers updated on 2022-10-01:

fyicenter$ curl 'https://ncbi.nlm.nih.gov/pmc/oai/oai.cgi?verb=ListIdentifiers&from=2022-10-01&until=2022-10-01&metadataPrefix=oai_dc'

<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
  <responseDate>2022-10-14T01:09:49Z</responseDate>
  <request verb="ListIdentifiers" from="2022-10-01" metadataPrefix="oai_dc" 
    until="2022-10-01">https:/www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi</request>
  <ListIdentifiers>
    <header>
      <identifier>oai:pubmedcentral.nih.gov:6794671</identifier>
      <datestamp>2022-10-01</datestamp>
      <setSpec>jrsocmed</setSpec>
    </header>
    <header>
      <identifier>oai:pubmedcentral.nih.gov:6794673</identifier>
      <datestamp>2022-10-01</datestamp>
      <setSpec>jrsocmed</setSpec>
    </header>
    <header>
      <identifier>oai:pubmedcentral.nih.gov:6794674</identifier>
      <datestamp>2022-10-01</datestamp>
      <setSpec>jrsocmed</setSpec>
    </header>
    ...
    <header>
      <identifier>oai:pubmedcentral.nih.gov:7483116</identifier>
      <datestamp>2022-10-01</datestamp>
      <setSpec>amjph</setSpec>
    </header>
    <resumptionToken>oai%3Apubmedcentral.nih.gov%3A7483117!2022-10-01!2022-10-01!oai_dc!</resumptionToken>
  </ListIdentifiers>
</OAI-PMH>

Here is an example of getting the record of a given identifier in PMC front matter format.

fyicenter$ curl 'https://www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi?verb=GetRecord&identifier=oai:pubmedcentral.nih.gov:152494&metadataPrefix=pmc_fm'

<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
  <responseDate>2022-10-14T01:36:35Z</responseDate>
  <request verb="GetRecord" identifier="oai:pubmedcentral.nih.gov:152494" 
    metadataPrefix="pmc_fm">https:/www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi</request>
  <GetRecord>
    <record>
      <header>
        <identifier>oai:pubmedcentral.nih.gov:152494</identifier>
        <datestamp>2003-05-26</datestamp>
        <setSpec>aac</setSpec>
      </header>
      <metadata>
        <article xmlns="https://dtd.nlm.nih.gov/ns/archiving/2.3/" 
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xmlns:mml="http://www.w3.org/1998/Math/MathML" 
          xmlns:xlink="http://www.w3.org/1999/xlink" 
          xsi:schemaLocation="https://dtd.nlm.nih.gov/ns/archiving/2.3/ https://dtd.nlm.nih.gov/archiving/2.3/xsd/archivearticle.xsd" 
          article-type="research-article">
          <front>
            <journal-meta>
              <journal-id journal-id-type="nlm-ta">Antimicrob Agents Chemother</journal-id>
              <journal-id journal-id-type="publisher-id">aac</journal-id>
              <journal-title>Antimicrobial Agents and Chemotherapy</journal-title>
              <issn pub-type="ppub">0066-4804</issn>
              <issn pub-type="epub">1098-6596</issn>
              <publisher>
                <publisher-name>American Society for Microbiology</publisher-name>
              </publisher>
            </journal-meta>
            <article-meta>
              <article-id pub-id-type="accession">PMC152494</article-id>
              <article-id pub-id-type="pmcid">PMC152494</article-id>
              <article-id pub-id-type="pmc-uid">152494</article-id>
              <article-id pub-id-type="pmid">12654674</article-id>
              <article-id pub-id-type="publisher-id">0514</article-id>
              <article-id pub-id-type="doi">10.1128/AAC.47.4.1382-1390.2003</article-id>
              <article-categories>
                <subj-group subj-group-type="heading">
                  <subject>Mechanisms of Resistance</subject>
                </subj-group>
              </article-categories>
              <title-group>
                <article-title>Epidemiology of Rifampin ADP-Ribosyltransferase (<italic>arr-2</italic>) and Metallo-β-Lactamase (<italic>bla</italic><sub>IMP-4</sub>) Gene Cassettes in Class 1 Integrons in <italic>Acinetobacter</italic> Strains Isolated from Blood Cultures in 1997 to 2000</article-title>
              </title-group>
              <contrib-group>
                <contrib contrib-type="author">
                  <name>
                    <surname>Houang</surname>
                    <given-names>Elizabeth T. S.</given-names>
                  </name>
                  <xref ref-type="aff" rid="aff1">1</xref>
                  <xref ref-type="corresp" rid="cor1">*</xref>
                </contrib>
                <contrib contrib-type="author">
                  <name>
                    <surname>Chu</surname>
                    <given-names>Yiu-Wai</given-names>
                  </name>
                  <xref ref-type="aff" rid="aff1">2</xref>
                </contrib>
...
              </contrib-group>
              <pub-date pub-type="ppub">
                <month>4</month>
                <year>2003</year>
              </pub-date>
              <volume>47</volume>
              <issue>4</issue>
              <fpage>1382</fpage>
              <lpage>1390</lpage>
              <history>
                <date date-type="accepted">
                  <day>23</day>
                  <month>1</month>
                  <year>2003</year>
                </date>
              </history>
              <copyright-statement>Copyright © 2003, American Society for Microbiology</copyright-statement>
              <copyright-year>2003</copyright-year>
              <abstract>
                <p>We characterized two new gene cassettes in an <italic>Acinetobacter</italic> isolate: ...</p>
                <p> </p>
              </abstract>
            </article-meta>
          </front>
        </article>
      </metadata>
    </record>
  </GetRecord>
</OAI-PMH>

Here is an example of getting the record of a given identifier in PMC full-text XML format.

fyicenter$ curl 'https://www.ncbi.nlm.nih.gov/pmc/oai/oai.cgi?verb=GetRecord&identifier=oai:pubmedcentral.nih.gov:152494&metadataPrefix=pmc'

 

Other DOI Tools and Resources

PMC FTP Service - ID Map Download

PubMed Central (PMC) DOI Database

⇑⇑ DOI - Frequently Asked Questions

2023-01-08, 397👍, 0💬