Most queries sent to our XML API will use HTTPS. HTTPS querying requires either a member or registered query services account email address.
Examples
DOI-to-metadata query:
https://doi.crossref.org/servlet/query?pid=email@address.com&id=10.1577/H02-043
DOI-to-metadata query requesting UNIXSD results:
https://doi.crossref.org/servlet/query?pid=username:password&format=unixsd&id=10.1577/H02-043
DOI-to-metadata queries may also be supplied using this format:
https://doi.crossref.org/search/doi?pid=email or username:password&doi=10.1577/H02-043
XML query:
https://doi.crossref.org/servlet/query?usr=username&pwd=password&format=unixref&qdata=<?xml version="1.0"?><query_batch version="2.0"...
where:
- usr is your Crossref-supplied username.
- pwd is your Crossref password.
- pid is your Crossref-supplied username and password (included as username:password) or a registered query services account email address.
- format is the desired results format ( xsd_xml | unixref | unixsd)
- qdata is the query data (XML is the recommended format)
- id is a Crossref DOI
XML querying
An XML query must contain complete and valid query XML. Multiple queries may be included in a single XML file, the <query> element is repeatable. For best results, do not exceed 5 queries per HTTP XML query request.
Multiple queries in a single request
http://doi.crossref.org/servlet/query?usr=username&pwd=password&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>support@crossref.org</email_address><doi_batch_id>ABC_123_fff</doi_batch_id> </head> <body> <query key="query1" enable-multiple-hits="true" 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><query key="query2" enable-multiple-hits="true"><unstructured_citation>Hungate, B. A., & Hampton, H. M. (2012). Ecosystem services: Valuing ecosystems for climate. Nature Climate Change, 2(3), 151-152.</unstructured_citation></query></body></query_batch>
HTTPS XML query example
http://doi.crossref.org/servlet/query?usr=username&pwd=password&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>support@crossref.org</email_address><doi_batch_id>ABC_123_fff</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>
HTTPS XML query with an unstructured (formatted) citation:
http://doi.crossref.org/servlet/query?usr=<USERNAME>&pwd=<PASSWORD>&format=unixref&qdata=<?xml version = "1.0" encoding="UTF-8"?><query_batch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xmlns="http://www.crossref.org/qschema/2.0" xsi:schemaLocation="http://www.crossref.org/qschema/2.0 http://www.crossref.org/qschema/crossref_query_input2.0.xsd"><head><email_address>your@email.org</email_address><doi_batch_id>01032012</doi_batch_id></head><body><query key="q1" enable-multiple-hits="true"><unstructured_citation>Hungate, B. A., & Hampton, H. M. (2012). Ecosystem services: Valuing ecosystems for climate. Nature Climate Change, 2(3), 151-152.</unstructured_citation></query></body></query_batch>
HTTPS XML query with URL encoding
http://doi.crossref.org/servlet/query?usr=username&pwd=password&qdata=%3C?xml%20version=%221.0%22?%3E%3Cquery_batch%20version=%222.0%22%20xsi:schemaLocation=%22http://www.crossref.org/qschema/2.0%20http://www.crossref.org/qschema/crossref_query_input2.0.xsd%22%20xmlns=%22http://www.crossref.org/qschema/2.0%22%20xmlns:xsi=%22http://www.w3.org/2001/XMLSchema-instance%22%3E%3Chead%3E%3Cemail_address%3Esupport@crossref.org%3C/email_address%3E%3Cdoi_batch_id%3EABC_123_fff%3C/doi_batch_id%3E%20%3C/head%3E%20%3Cbody%3E%20%3Cquery%20key=%221178517%22%20enable-multiple-hits=%22false%22%20forward-match=%22false%22%3E%3Cissn%20match=%22optional%22%3E15360075%3Cissn%3Cjournal_title%20match=%22exact%22%3EAmerican%20Journal%20of%20Bioethics%3C/journal_title%3E%3Cauthor%20match=%22fuzzy%22%20search-all-authors=%22false%22%3EAgich%3C/author%3E%3Cvolume%20match=%22fuzzy%22%3E1%3C/volume%3E%3Cissue%3E1%3C/issue%3E%3Cfirst_page%3E50%3C/first_page%3E%3Cyear%3E2001%3C/year%3E%3Carticle_title%3EThe%20Salience%20of%20Narrative%20for%20Bioethics%3C/article_title%3E%3C/query%3E%3C/body%3E%3C/query_batch%
Note that some reserved characters must be URL encoded:
Character | Name | URL code |
---|---|---|
; | %3B | |
/ | Slash, virgule, separatrix, or solidus | %2F |
? | Question mark | %3F |
: | Colon | %3A |
@ | At sign | %40 |
= | Equals sign | %3D |
& | Ampersand | %26 |
lf | line feed | %0A |
Comments
0 comments
Please sign in to leave a comment.