### XML Deposit Examples Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Examples of XML deposits for registering content with Crossref. These examples illustrate different deposit types, including full deposits, partial deposits, and registered content deposits. ```xml Journal of Examples 1234-5678 9876-5432 1 01 15 2023 2023 An Example Article John Doe University of Examples 01 15 2023 1 10 Example Publisher 10.1000/example.article.1 http://example.com/article/1 ``` -------------------------------- ### Crossref XML Deposit Examples Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Provides examples of XML files for different types of Crossref deposits, including full deposits, partial deposits for resources, funding information, license information, and CrossMark. ```XML Full Deposits: - [Full deposit](examples/full.xml) - [Full deposit with CrossMark](examples/full-crossmark.xml) Partial Deposits: - [Partial deposit of additional resource links](examples/partial-resources.xml) - [Partial deposit of funding information without CrossMark](examples/partial-funders.xml) - [Partial deposit of license information without CrossMark](examples/partial-licenses.xml) - [Partial deposit of a CrossMark with license and funding information](examples/partial-crossmark.xml) ``` -------------------------------- ### Install Crossref API Library Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb Installs the crossrefapi Python library using pip. This is a prerequisite for using the library in your Python projects. ```bash !pip install crossrefapi ``` -------------------------------- ### Crossref API Metadata Licensing FAQ Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Answers frequently asked questions regarding the licensing of metadata retrieved from Crossref APIs, including interpretations of license start dates, applicability, and content versions. ```APIDOC Crossref API Metadata Licensing: Q: What license applies to the metadata retrieved by the [Crossref APIs to support key performance indicators (KPIs) for funding agencies](funder_kpi_api.html)? A: Crossref asserts no claims of ownership to individual items of bibliographic metadata and associated Digital Object Identifiers (DOIs) acquired through the use of the Crossref Free Services. Individual items of bibliographic metadata and associated DOIs may be cached and incorporated into the user's content and systems. Q: What does it mean if a `` element has no `start_date` attribute? A: This should be interpreted to mean that the `` applies from the earliest publication date. Q: What does is mean if there is no `applies_to` attribute for the `` element? A: This should be interpreted to mean that the `license_ref` applies to **all** the `` elements in the record. Q: What does it mean if the `` element doesn't have a `content_version` attribute? A: This should be interpreted to mean that any `` elements point to the version of record ('vor') Q: What does it mean if there is no correspondence between existing `` `applies_to` attributes and existing `` `content_version` attributes? A: This probably means the publisher made a mistake depositing the metadata. ``` -------------------------------- ### Crossref API Query Examples Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Examples of common queries to the Crossref REST API, demonstrating filtering by publication date, license, funder, award number, and archive partner. Also includes examples for searching members and facets. ```HTTP https://api.crossref.org/prefixes/10.1016/works?filter=from-pub-date:2010-01,until-pub-date:2010-01 ``` ```HTTP https://api.crossref.org/funders/10.13039/100000001/works?filter=license.url:http://creativecommons.org/licenses/by/3.0/ ``` ```HTTP https://api.crossref.org/prefixes/10.6064/works?filter=license.url:http://creativecommons.org/licenses/by/3.0/,from-pub-date:2010-02,until-pub-date:2013-02 ``` ```HTTP https://api.crossref.org/funders/10.13039/100000015/works?filter=license.url:http://creativecommons.org/licenses/by/3.0/,license.delay:365 ``` ```HTTP https://api.crossref.org/works?filter=archive:CLOCKSS ``` ```HTTP https://api.crossref.org/members?query=hind ``` ```HTTP https://api.crossref.org/v1/works?facet=license:*&filter=member:78&rows=0 ``` ```HTTP https://api.crossref.org/works?facet=license:*&filter=issn:2090-8091 ``` ```HTTP https://api.crossref.org/works?filter=award.number:1F31MH11745,award.funder:10.13039/100000025 ``` ```HTTP https://api.crossref.org/v1.0/works?filter=has-references:true,reference-visibility:open&facet=publisher-name:*&rows=0 ``` -------------------------------- ### Crossref API Example Free Form Search Query Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Demonstrates how to perform a free-form search query to find works that include specific keywords, such as 'renear' and 'ontologies'. ```APIDOC https://api.crossref.org/works?query=renear+ontologies ``` -------------------------------- ### Crossref API Example Query with URI Parameters Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Provides an example of constructing a query using URI parameters, specifically filtering for works associated with a funder ID, including ORCID, and limiting the results. ```APIDOC https://api.crossref.org/funders/100000015/works?query=global+state&filter=has-orcid:true&rows=1 ``` -------------------------------- ### Inefficient Crossref API Query Examples Source: https://github.com/crossref/rest-api-doc/blob/master/api_tips.md Illustrates common but inefficient ways to query the Crossref API, which lead to slower performance and less accurate results. ```HTTP http://api.crossref.org/works?query.author="Josiah Carberry"&filter=from-pub-date:2008-08-13,until-pub-date:2008-08-13&query.container-title="Journal of Psychoceramics"&query="Toward a Unified Theory of High-Energy Metaphysics"&order=score&sort=desc ``` ```HTTP http://api.crossref.org/works?query="Toward a Unified Theory of High-Energy Metaphysics, Josiah Carberry 2008-08-13" ``` -------------------------------- ### Crossref API Multiple Filter Example Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Demonstrates how to specify multiple filters in a single query, with AND semantics for different filters and OR semantics for the same filter applied multiple times. ```APIDOC /works?filter=is-update:true,from-pub-date:2014-03-03,funder:10.13039/100000001,funder:10.13039/100000050 ``` -------------------------------- ### Crossref API Example Field Queries Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Illustrates how to use field-specific queries on the `/works` route to match metadata in particular fields, such as querying the author field for specific names. ```APIDOC https://api.crossref.org/works?query.author=richard+feynman # Combining field queries: https://api.crossref.org/works?query.bibliographic=room+at+the+bottom&query.author=richard+feynman ``` -------------------------------- ### Crossref REST API - Authentication and Authorization Source: https://github.com/crossref/rest-api-doc/blob/master/README.md This section details authentication mechanisms for the Crossref REST API, specifically for 'Plus' users. It covers the use of tokens in the `Authorization` header and provides a curl example. ```APIDOC Authentication: - added info for "Plus" users on use of token in `Authorization` header (v60) - add curl example for use of token (v61) - updated Plus token name to new recommendation (v65) ``` -------------------------------- ### Multiple Licenses During Embargo Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Illustrates how multiple `` elements with different `start_date` attributes can be used to represent a sequence of licenses, including periods of proprietary access followed by open or dual licenses. This approach clearly defines the licensing terms over time. ```APIDOC http://www.psychoceramics.org/license_v1.html http://www.psychoceramics.org/non_commercial_license_v1.html http://www.psychoceramics.org/commercial_license_v1.html ``` -------------------------------- ### Crossref API Select Parameter Example Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Shows how to use the `select` parameter to retrieve only specific elements from Crossref metadata records, improving API call efficiency by reducing data transfer. ```APIDOC https://api.crossref.org/works?sample=10&select=DOI,title ``` -------------------------------- ### Crossref Licensing: Version Specific Licenses Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Demonstrates how to apply different licenses to specific versions of a resource, such as 'Version of Record' (VOR) and 'Author Accepted Manuscript' (AM), using `applies_to` and `content_version` attributes. ```XML http://www.psychoceramics.org/license_v1.html http://creativecommons.org/licenses/by/3.0/deed.en_US http://www.psychoceramics.org/fulltext/vor/10.5555/12345678 http://www.psychoceramics.org/fulltext/am/10.5555/12345678 ``` -------------------------------- ### Crossref Reference Distribution Options Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Enables the open distribution of references for DOIs. Setting `` to 'any' makes references available without restriction through all Crossref APIs and bulk metadata dumps. ```APIDOC APIDOC: Element: Attribute: reference_distribution_opts Value: "any" Description: Distributes references openly through all Crossref APIs and bulk metadata dumps. Requires setting for each DOI deposit where open reference availability is desired. Schema Documentation: http://www.crossref.org/help/schema_doc/4.3.6/4_3_6.html#reference_distribution_opts.att ``` -------------------------------- ### Embargoes with License References Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Demonstrates how to use the `start_date` attribute on the `` element to specify when a license becomes active, indicating an embargo period. The `start_date` must be in `YYYY-MM-DD` format. This allows publishers to indicate future license changes and the duration of proprietary access before an open license takes effect. ```APIDOC http://www.psychoceramics.org/license_v1.html http://creativecommons.org/licenses/by/3.0/deed.en_US ``` -------------------------------- ### Crossref API Conventions Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Defines the conventions used in this document, following RFC 2119 for terms like MUST, SHOULD, and MAY, to specify requirements and recommendations for metadata submission and API usage. ```APIDOC Conventions: 1. MUST - Absolute requirement for meeting best practice. 2. MUST NOT - Absolute prohibition for meeting best practice. 3. SHOULD - Recommended, but valid reasons may exist to ignore. 4. SHOULD NOT - Not recommended, but acceptable or useful in particular circumstances. 5. MAY - Optional; implementation may choose to include or omit. ``` -------------------------------- ### HTTP HEAD Requests for Existence Check Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Explains how to use HTTP HEAD requests to efficiently check for the existence of a singleton resource without retrieving its metadata. This is faster than GET requests. ```curl curl --head "https://api.crossref.org/members/98" curl --head "https://api.crossref.org/journals/1549-7712" ``` -------------------------------- ### Crossref REST API Documentation Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Documentation for the Crossref REST API, including endpoints for retrieving metadata, registering content, and managing DOIs. This section details API usage, parameters, and response formats. ```APIDOC Crossref REST API Documentation: This document outlines the usage of the Crossref REST API for accessing and managing bibliographic metadata. Endpoints: 1. **Metadata Retrieval** * `GET /works/{doi}`: Retrieves metadata for a specific work identified by its DOI. * **Parameters**: * `doi` (string, required): The Digital Object Identifier of the work. * **Returns**: * JSON object containing the work's metadata. * **Example**: `GET https://api.crossref.org/works/10.1000/xyz123` 2. **Content Registration** * `POST /works`: Registers new works with Crossref. * **Parameters**: * `Content-Type`: `application/vnd.crossref.api+json` * Request Body: JSON object conforming to the Crossref submission schema. * **Returns**: * `200 OK` or `201 Created` on successful registration. * Error details on failure. * **Example**: ```json { "message": { "title": "Example Work Title", "author": [ { "given": "Jane", "family": "Doe" } ], "publisher": "Example Publisher", "journal_issue": { "issue": "1", "year": 2023 }, "created": { "date-parts": [[2023, 1, 1]] }, "DOI": "10.1234/example.doi", "type": "journal-article" } } ``` 3. **Funder Information** * `GET /funders`: Retrieves a list of registered funders. * **Parameters**: * `query` (string, optional): Search term for funders. * `rows` (integer, optional): Number of results per page. * `start` (integer, optional): Starting index for pagination. * **Returns**: * JSON object containing a list of funder records. 4. **Crossmark Data** * `GET /crossmark/{doi}`: Retrieves Crossmark data for a specific DOI. * **Parameters**: * `doi` (string, required): The Digital Object Identifier. * **Returns**: * JSON object with Crossmark information. Error Handling: * `400 Bad Request`: Invalid input or malformed request. * `404 Not Found`: Resource not found. * `401 Unauthorized`: Authentication required. * `500 Internal Server Error`: Server-side error. Rate Limiting: * The API enforces rate limits to ensure fair usage. Check Crossref documentation for current limits. ``` -------------------------------- ### License Data Structure Source: https://github.com/crossref/rest-api-doc/blob/master/api_format.md Details the structure for license information, including content version, delay in days, start date, and URL. ```APIDOC License: "content-version": String (Required) - Either `vor` (version of record,) `am` (accepted manuscript,) `tdm` (text and data mining) or `unspecified` "delay-in-days": Number (Required) - Number of days between the publication date of the work and the start date of this license start: [Partial Date](#partial-date) (Required) - Date on which this license begins to take effect URL: URL (Required) - Link to a web page describing this license ``` -------------------------------- ### Crossref License and Free-to-Read Metadata Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md This section details the use of `` and `` elements in Crossref metadata to indicate content licensing and availability status. The `` element can specify date ranges for gratis access. ```APIDOC Crossref Metadata Elements: url - Specifies the license applicable to the content. - An empty element indicating content is available 'gratis'. - Attributes: - start_date: The date from which content is gratis (YYYY-MM-DD). - end_date: The date until which content is gratis (YYYY-MM-DD). Usage Scenarios: 1. Restrictive license with payment: http://tinypublisher.org/licenses/proprietary.html 2. Restrictive license, no payment: http://tinypublisher.org/licenses/proprietary.html 3. Unrestrictive license with payment: http://creativecommons.org/licenses/by/3.0/deed.en_US 4. Unrestrictive license, no payment: http://creativecommons.org/licenses/by/3.0/deed.en_US Interpretation of : - With start_date and end_date: Gratis during the specified period. - With only start_date: Gratis from start_date onwards. - With only end_date: Gratis from publication date up to end_date. - Without attributes: Gratis from publication date onwards. - Not present: No assumption of gratis access. ``` -------------------------------- ### Get API URL for a Query Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb Demonstrates how to retrieve the underlying REST API URL generated for a specific query, useful for debugging. ```python from crossref.restful import Works works = Works() works.query('zika').url ``` -------------------------------- ### DOI Registration at Acceptance Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md This section outlines the requirement to assign and register DOIs as early as possible, specifically upon manuscript acceptance, to comply with funder mandates for timely notification of publications. ```APIDOC DOI Registration Process: Requirement: Assign and register DOIs for manuscripts upon acceptance. Purpose: To notify funders and institutions of impending publications promptly, as required by certain mandates (e.g., HEFCE). Timing: Registration should occur as soon as the manuscript is accepted, even before online availability. ``` -------------------------------- ### Crossref Metadata Distribution Options Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Configures the distribution of bibliographic metadata for DOIs. Setting `` to 'any' ensures maximum availability via Crossref APIs and data dumps, subject to opt-outs for bulk distribution. ```APIDOC APIDOC: Element: Attribute: metadata_distribution_opts Value: "any" Description: Ensures bibliographic metadata is maximally available via Crossref APIs and data dumps. Subject to opt-outs for bulk distribution APIs and data dumps. Schema Documentation: http://www.crossref.org/help/schema_doc/4.3.6/4_3_6.html#metadata_distribution_opts.att ``` -------------------------------- ### Crossref API Dot Filter Example Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Illustrates the use of dot filters to apply criteria to related record types, such as filtering works based on award number and funding agency. ```APIDOC /works?filter=award.number:CBET-0756451,award.funder:10.13039/100000001 ``` -------------------------------- ### Crossref License Reference Element Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Demonstrates the usage of the `` element for specifying content licensing information in the Crossref REST API. This element is crucial for funders tracking the public availability of research results and publications. ```APIDOC http://creativecommons.org/licenses/by/3.0/deed.en_US http://www.psychoceramics.org/license_v1.html http://www.psychoceramics.org/non_commercial_license_v1.html http://www.psychoceramics.org/commercial_license_v1.html ``` -------------------------------- ### Crossref Licensing: Complex Assertions with Dates and Versions Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Illustrates a more complex scenario where licenses are applied based on version, date, and content type, including embargo periods and specific licenses for Text and Data Mining (TDM). ```XML http://www.psychoceramics.org/license_v1.html http://www.psychoceramics.org/open_license.html http://www.psychoceramics.org/nc_tdm_license.html http://www.psychoceramics.org/fulltext/vor/10.5555/12345678 http://www.psychoceramics.org/fulltext/am/10.5555/12345678 http://www.psychoceramics.org/fulltext/tdm/10.5555/12345678.xml ``` -------------------------------- ### Integrate Funding Data with Crossref Funders API Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb This example shows how to retrieve a funder ID from the Crossref Funders API using a funder name, and then use that ID to find works associated with that funder. ```python from crossref.restful import Funders funders=Funders() funder_name="NIH" funder_id=next(iter(funders.query(funder_name)))['id'] funder_id ``` ```python import datetime works=Works() today = datetime.date.today().isoformat() works_with_funding_data = [w for w in works.filter(from_online_pub_date='2017-01-01', funder=funder_id)] print(len(works_with_funding_data)) ``` ```python next(iter(works_with_funding_data)) ``` -------------------------------- ### Find Crossref Works with Affiliations Published Today Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb This example shows how to find Crossref works that have affiliation data and were published online today. It filters works by the 'has_affiliation' parameter and the online publication date. ```python import datetime works=Works() today = datetime.date.today().isoformat() works_with_affiliations = [w for w in works.filter(from_online_pub_date=today, has_affiliation='true')] print(len(works_with_affiliations)) ``` -------------------------------- ### Crossref Resource Element for Full Text Links Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Details the usage of the `` element within the Crossref metadata schema to record URIs pointing to the full text of a publication. It explains how to use the `mime_type` attribute to specify different content representations (e.g., PDF, XML) and how this facilitates features like multiple resolution and text and data mining. ```APIDOC Crossref Metadata Schema - Resource Element: - Used to record HTTP URIs pointing to publisher's landing pages or full-text content. - Can be used multiple times to support multiple resolutions, search engine indexing, and CrossCheck indexing. - Supports the `mime_type` attribute to specify different representations of the full text (e.g., 'application/pdf', 'application/xml', 'text/plain'). - Example: http://example.com/fulltext.pdf http://example.com/fulltext.xml Related Elements: - : Can be used to group related resources. Notes: - Recording a resource pointing to full text does not guarantee accessibility. - Publishers may choose to deposit full-text resources only after an embargo period ends, but care must be taken to avoid perceived non-compliance. ``` -------------------------------- ### Crossref Funding Data Deposit Requirements Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Details the mandatory and recommended practices for depositing funding information with Crossref. This includes recording funder names, Open Funder Registry identifiers, and award numbers. It also covers the integration of funding data with CrossMark records and licensing information. ```APIDOC Crossref Funder Data Deposit: Requirements for Members: - Must record funder information in Crossref deposits. - Must deposit funder identifiers corresponding to funder names from the Open Funder Registry. - Should record award numbers when possible. - Should deposit Funding Data within CrossMark records if implementing or planning to implement CrossMark within two years. - Should record licensing information via a URI specifying the license. - If no licensing information, should record a placeholder URI and update it later. - Should record full text links to readable versions (VOR and AM). - Should record full text links for Text and Data Mining (TDM) representations. - Should map licensing information to specific resource versions when multiple versions are recorded. - Should record full text links to archived versions identified by Crossref DOI. - Should record archive arrangements with third-party organizations. Enhancing Metadata Utility: - Should consider participating in CrossMark for updates, errata, corrigenda, retractions, and withdrawals. - Should consider depositing abstracts using Crossref's JATS abstract element support. - Should consider collecting and depositing ORCIDs for publication authors. - Should consider making bibliographic metadata and references maximally available by overriding Crossref opt-outs using `` and `` elements. - Should consider assigning and registering DOIs at acceptance to alert funders of relevant publications. Funding Information Specifics: - Supports recording funding information via the Funding Data program. - Utilizes the Open Funder Registry for standardized funder names and identifiers. - Crossref does not define standards for award numbers due to practice variations. Deposit Specifications: 1. Must include funder information. 2. Must not deposit funder names without attempting to map them to Open Funder Registry identifiers. 3. Should include award numbers when possible. 4. Should deposit Funder Data as part of a CrossMark record if participating in CrossMark. - Ensures Funding Data is available in machine-readable format and via a standard UI. - Ensures maximal reusability via a CC Zero license waiver. - Publishers do not need to have implemented CrossMark to deposit Funder metadata via CrossMark. ``` -------------------------------- ### Get Member Prefixes Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb Extracts the DOI prefixes associated with a specific Crossref member from their record. ```python prefixes = [p['value'] for p in pub['prefix']] prefixes ``` -------------------------------- ### Get DOIs Registered by Year Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb Retrieves a breakdown of DOIs registered by a specific Crossref member, categorized by the year of issuance. ```python dois_by_year = pub['breakdowns']['dois-by-issued-year'] dois_by_year ``` -------------------------------- ### Initialize Crossref Works API Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb Imports the Works class from the crossref.restful library and creates an instance of the Works object for making API requests. ```python from crossref.restful import Works works = Works() ``` -------------------------------- ### Crossref REST API Overview Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Provides an overview of the Crossref REST API, its purpose, and how to use it. It also includes a deprecation notice and links to the new API documentation and support resources. ```APIDOC Project: /crossref/rest-api-doc # Crossref REST API ## DEPRECATION NOTICE The Crossref REST API has been updated to use Elasticsearch instead of Solr -- read more about that project [here](https://www.crossref.org/blog/behind-the-scenes-improvements-to-the-rest-api/). This documentation is **deprecated**. Documentation for the new API can still be found at [https://api.crossref.org/](https://api.crossref.org/), and issues should be reported to us via the [community forum](https://community.crossref.org/) or support@crossref.org. ## Preamble The Crossref REST API is one of [a variety of tools and APIs](https://www.crossref.org/services/metadata-delivery/) that allow anybody to search and reuse our members' metadata in sophisticated ways. If you read nothing else, please at least look at the [API TIPs](https://github.com/CrossRef/rest-api-doc/blob/master/api_tips.md) document and the ["Etiquette" section](https://github.com/CrossRef/rest-api-doc#etiquette) of this document. It will save you (and us) much heartburn. ## Meta ### Frequency of indexing Records typically appear in the REST API within 20 minutes of their having been successfully deposited with Crossref. Summary information (e.g. counts, etc.) are processed in batch every 24 hours. ### Learning about performance or availability problems We record and report service issues on our [status page](https://status.crossref.org). You might want to check this to see if we are already aware of a problem before you report it. We also post notice of any ongoing performance problems with our services on our twitter feeds at [CrossrefOrg](https://twitter.com/CrossrefOrg) and [CrossrefSupport](https://twitter.com/@CrossrefSupport). ### Reporting performance or availability problems Report performance/availability at our [support site](https://support.crossref.org/hc/en-us). ### Reporting bugs, requesting features Please report bugs with the API or the documentation on our [issue tracker](https://gitlab.com/crossref/issues). ### Documentation License Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. ### Metadata License Crossref asserts no claims of ownership to individual items of bibliographic metadata and associated Digital Object Identifiers (DOIs) acquired through the use of the Crossref Free Services. Individual items of bibliographic metadata and associated DOIs may be cached and incorporated into the user's content and systems. ### Privacy We also have a [privacy policy](https://www.crossref.org/privacy/). ### Libraries You might be able to avoid reading all this documentation if you instead use one of the several excellent libraries that have been written for the Crossref REST API. For example: - [crossref-commons](https://gitlab.com/crossref/crossref_commons_py) (Python, developed by Crossref) - [habanero](https://github.com/sckott/habanero) (Python) - [serrano](https://github.com/sckott/serrano) (Ruby) - [rcrossref](https://github.com/ropensci/rcrossref) (R) - [crossrefapi](https://github.com/fabiobatalha/crossrefapi) (Python) - [crossref-rs](https://github.com/MattsSe/crossref-rs) (rust) - [pitaya](https://github.com/naustica/Pitaya) (Julia) If you know of another library you would like to see listed here, please let us know about it via the [issue tracker](https://gitlab.com/crossref/issues). ``` -------------------------------- ### Reading Compressed Archives in Python Source: https://github.com/crossref/rest-api-doc/blob/master/api_tips.md Demonstrates how to read files directly from compressed archives (like .tar.gz) without full decompression, which is useful for handling large snapshot files efficiently. ```Python import tarfile # Assuming 'snapshot.tar.gz' is a compressed archive containing data files with tarfile.open('snapshot.tar.gz', 'r:gz') as tar: # Iterate through members of the archive for member in tar.getmembers(): if member.isfile(): # Get a file-like object for a specific file within the archive f = tar.extractfile(member) if f: # Read content from the file-like object content = f.read().decode('utf-8') # Process the content (e.g., load into a database) print(f"Processing {member.name}...") # Example: process_data(content) f.close() ``` -------------------------------- ### Crossref API Query Optimization Source: https://github.com/crossref/rest-api-doc/blob/master/api_tips.md Demonstrates efficient query construction for the Crossref API, focusing on using `query.bibliographic` and limiting results. ```HTTP http://api.crossref.org/works?query.bibliographic="Toward a Unified Theory of High-Energy Metaphysics, Josiah Carberry 2008-08-13"&rows=2 ``` -------------------------------- ### Crossref REST API - Rate Limiting and Usage Source: https://github.com/crossref/rest-api-doc/blob/master/README.md This section covers information related to rate limiting and usage guidelines for the Crossref REST API. It includes details on rate limit headers, polite pool usage, and the distinction between `offset` and `cursor` for pagination. ```APIDOC Rate Limiting and Usage: - document rate limit headers (v32) - guidance on when to use `offset` vs `cursor` (v33) - document use of head reqeusts to determine `existence` (v35) - document `sample` max = 100, clarify cursors only work on some routes (v41) - add info about new "polite pool" (v54) - clarify how to parse `X-Rate-Limit-Limit-Interval` (v62) ``` -------------------------------- ### Crossref Archive Locations Metadata Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md This section describes the use of the `` element to record third-party archiving arrangements for content. Publishers can specify multiple archive organizations. ```APIDOC Crossref Archive Metadata: ... - Specifies where the content is archived or intended to be archived. - The 'name' attribute should use values from the Crossref deposit schema vocabulary. Example: Reference: For the latest list of possible archive location values, refer to the Crossref deposit schema documentation for the element. ``` -------------------------------- ### Crossref REST API - Libraries and Tools Source: https://github.com/crossref/rest-api-doc/blob/master/README.md This section lists libraries and tools that can be used to interact with the Crossref REST API. It includes a mention of the Pitaya Julia library. ```APIDOC Libraries: - add section on libraries (v49) - Added link to Pitaya Julia library (v68) ``` -------------------------------- ### Initialize Crossref Members API Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb Imports the Members class from the crossref.restful library and initializes a Members object for making API requests. ```python from crossref.restful import Members members = Members() ``` -------------------------------- ### Initialize Crossref Works Client Source: https://github.com/crossref/rest-api-doc/blob/master/demos/crossref-api-demo.ipynb Initializes the Works client from the crossrefapi library. This client is used to make requests to the Crossref API for works data. ```python from crossref.restful import Works works = Works() ``` -------------------------------- ### Crossref REST API Main Documentation Link Source: https://github.com/crossref/rest-api-doc/blob/master/rest_api.md Provides a link to the primary documentation for the Crossref REST API, which has been relocated. ```MARKDOWN [We have moved the main documentation page.](https://github.com/CrossRef/rest-api-doc) ``` -------------------------------- ### CrossMark Service Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md Provides a standard mechanism for alerting researchers to updates for published documents, including corrections, errata, retractions, and withdrawals. It signals publisher commitment to scholarly record integrity and offers a user interface for viewing Funder Data and licensing information. ```APIDOC APIDOC: Service: CrossMark Description: Standard mechanism for alerting researchers to document updates (corrections, errata, retractions, withdrawals) and maintaining scholarly record integrity. Also provides a cross-publisher user interface for Funder Data and licensing information. Support Site: http://crossmarksupport.crossref.org/ ``` -------------------------------- ### Crossref API Versioning Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Details the Crossref API's semantic versioning scheme, including major and minor version increments, backward compatibility, and support policies. Explains how to access specific major versions using version-specific routes. ```APIDOC API Versioning: The syntax of the API can vary independently of the result representations. Major version changes can break backwards compatibility. Crossref supports the latest two major releases simultaneously, with legacy major releases supported for no more than nine months. Minor version increments are backwards compatible. Client applications should not have dependencies on minor versions. Crossref maintains the latest minor version for the two most recent major versions. To tie an implementation to a specific major version, use version-specific routes. The default route redirects to the most recent version. Example for accessing version v1: https://api.crossref.org/v1/works ``` -------------------------------- ### Crossref API Polite Usage Guidelines Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Guidelines for polite usage of the Crossref REST API to ensure service reliability. This includes caching data, monitoring response times, and specifying a User-Agent header with contact information. ```APIDOC User-Agent Header Format: GroovyBib/1.1 (https://example.org/GroovyBib/; mailto:GroovyBib@example.org) BasedOnFunkyLib/1.4 Query Parameter Format: https://api.crossref.org/works?filter=has-full-text:true&mailto=GroovyBib@example.org ``` -------------------------------- ### Crossref Registered Content DOI Registration Source: https://github.com/crossref/rest-api-doc/blob/master/funder_kpi_metadata_best_practice.md This section outlines the requirements and optional metadata for registering DOIs for 'registered content'. This content type is for accepted manuscripts not yet publicly available online, allowing publishers to inform funders and institutions. The DOI resolves to a Crossref-controlled landing page with customizable elements. ```APIDOC Crossref Registered Content DOI Requirements: - MUST include a DOI. - MUST include a date of acceptance. - MUST include the publisher name. - MUST be replaced with full metadata when content is made public. - SHOULD include an 'intent to publish statement' (default provided if not supplied). - MAY include a logo for the landing page. - MAY include a custom 'intent to publish statement'. - SHOULD include funder information and Open Funder Registry identifiers. - SHOULD include ORCIDs. - SHOULD include license information. - SHOULD include author affiliation information. - MAY include the publication title. - MAY include the item title (e.g., article title). Landing Page Customizations: - Custom 'intent to publish' statement. - Publisher logo. - Display of optional extra metadata (funder IDs, ORCIDs, license info). - CrossMark for rescinded acceptances. Default Intent to Publish Statement: "The DOI {DOI} has been registered for content that was accepted for publication by {publisher name} on {date_of_acceptance}. When this content is available, the publisher will update this DOI, at which point it will automatically redirect you to the copy on the publisher's site." ``` -------------------------------- ### Crossref API Resource Components with Identifiers Source: https://github.com/crossref/rest-api-doc/blob/master/README.md Demonstrates how to use resource components in conjunction with identifiers to retrieve specific metadata. This includes fetching details for DOIs, funder IDs, prefixes, member IDs, types, and ISSNs. ```APIDOC /works/{doi} - returns metadata for the specified Crossref DOI. /funders/{funder_id} - returns metadata for specified funder **and** its suborganizations /prefixes/{owner_prefix} - returns metadata for the DOI owner prefix /members/{member_id} - returns metadata for a Crossref member /types/{type_id} - returns information about a metadata work type /journals/{issn} - returns information about a journal with the given ISSN ```