CrossRef system interfaces (for machines) > Using HTTP to Query

Using HTTP to Query

The most common method of submitting queries to CrossRef is to have an automated service interact with the CrossRef system using the HTTP interface. CrossRef strongly recommends that you group between 5 and 20 queries into a single request. This helps reduce the network transaction load on CrossRef resources. These transactions use a simple HTTP GET request with the results being returned immediately to the caller. Queries may also be processed off line in batch mode.

Synchronous HTTP queries

Synchronous queries are performed using a URL with encoded parameters as follows:

http://doi.crossref.org/servlet/query?usr=<USERNAME>&pwd=<PASSWORD>&format=unixref&qdata=|Proc.%20Natl%20Acad.%20Sci.%20USA|Zhou|94|24|13215|1997|||

http://doi.crossref.org/servlet/query?pid=<USERNAME>:<PASSWORD>&id=10.1577/H02-043

http://doi.crossref.org/servlet/query?pid=<EMAIL>&id=10.1577/H02-043

where:

 

HTTP queries may be submitted in piped format or as XML (recommended). XML queries can be submitted by HTTP by appending query XML to a HTTP request.Show Example

XML Query:

<?xml version="1.0"?>
<query_batch version="2.0"
       xsi:schemaLocation="http://www.crossref.org/qschema/2.0 http://www.crossref.org/qschema/crossref_query_input2.0.xsd"
       xmlns="http://www.crossref.org/qschema/2.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <head>
    <email_address>crossref@rsc.org</email_address>
    <doi_batch_id>RSC_fl_1178517_1178538</doi_batch_id>
 </head>
 <body>
    <query key="1178517" enable-multiple-hits="false" forward-match="false">
        <issn match="optional">15360075<issn
       <journal_title match="exact">American Journal of Bioethics</journal_title>
         <author match="fuzzy" search-all-authors="false">Agich</author>
         <volume match="fuzzy">1</volume>
          <issue>1</issue>
         <first_page>50</first_page>
        <year>2001</year>
         <article_title>The Salience of Narrative for Bioethics</article_title>
        </query>
 </body>
</query_batch>

HTTP XML query:

http://doi.crossref.org/servlet/query?usr=<USERNAME>&pwd=<PASSWORD>&format=unixref&qdata=<?xml version="1.0"?><query_batch version="2.0" xsi:schemaLocation="http://www.crossref.org/qschema/2.0 http://www.crossref.org/qschema/crossref_query_input2.0.xsd" xmlns="http://www.crossref.org/qschema/2.0"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><head><email_address>crossref@rsc.org</email_address><doi_batch_id>RSC_fl_1178517_1178538</doi_batch_id></head><body><query key="1178517" enable-multiple-hits="false" forward-match="false"><issn match="optional">15360075</issn><journal_title match="exact">American Journal of Bioethics</journal_title><author match="fuzzy" search-all-authors="false">Agich</author><volume match="fuzzy">1</volume><issue>1</issue><first_page>50</first_page><year>2001</year><article_title>The Salience of Narrative for Bioethics</article_title></query></body> </query_batch>

To place multiple queries in one request, include them in the qdata parameter separated by %0A, as shown here:

http://doi.crossref.org/servlet/query?usr=<USERNAME>&pwd=<PASSWORD>&qdata=|%20Natl%20Acad.%20Sci.%20USA|Zhou|94|24|13215|1997|||%0A|J.%20Mol.%20Biol.|Hagerman|260|||1996|||

Encoding

Certain characters cannot be passed in a URL without causing problems. The following table lists those characters that must be URL-encoded.
 

Character

Name

URL code

;

Semicolon

%3B

/

Slash, virgule, separatrix, or solidus

%2F

?

Question mark

%3F

:

Colon

%3A

@

At sign

%40

=

Equals sign

%3D

&

Ampersand

%26

lf

line feed

%0A

Notes:  

HTTP Query Performance

There are several drawbacks to submitting synchronous HTTP queries:

 

persistent link to this page link


CrossRef logo

support@crossref.org