Advanced search queries in DataCite Commons

The DataCite Commons and DOI Fabrica user interfaces are based on Elasticsearch. Both use the Elasticsearch query string queries

To set up queries with the REST API, refer to the REST API documentation for queries and filtering.

How to Search

Field names

Queries by default search all fields, but a specific field can be provided in the query, e.g. https://commons.datacite.org?query=publicationYear:2016

For nested fields use the same format as in the REST API response, e.g. https://commons.datacite.org?query=creators.nameIdentifiers.nameIdentifierType:ORCID

Wildcards

Wildcards are supported, e.g. https://commons.datacite.org??query=creators.familyName:mil*

Boolean operators

By default, all terms are optional, as long as one term matches. Use + or - to specify terms that have to match or not match, respectively. For example https://commons.datacite.org?query=titles.title:climate%20+change

Ranges

For number and date fields, we can specify a range. Wildcards are supported e.g. https://commons.datacite.org?query=publicationYear:[2019%20TO%20*] or https://commons.datacite.org?query=view_count:[1000%20TO%201999]

It is possible to search any element from the DataCite metadata schema using the JSON API response format for the query, for example

Search the title:

titles.title:Mars

Run this search in DataCite Commons.

📘

The syntax you use for the query must match the elements in the JSON API (different to the XML). All the properties are listed in API the response below. More examples are listed in the examples section.

https://api.test.datacite.org/dois/10.17596/qf5s-pc52?affiliation=true

{
  "data": {
    "id": "10.70126/k7wk-rm36",
    "type": "dois",
    "attributes": {
      "doi": "10.70126/k7wk-rm36",
      "prefix": "10.70126",
      "suffix": "k7wk-rm36",
      "identifiers": [
        {
          "identifier": "https://schema.datacite.org/meta/kernel-4.4/example/datacite-example-full-v4.4.xml",
          "identifierType": "URL"
        }
      ],
      "alternateIdentifiers": [
        {
          "alternateIdentifierType": "URL",
          "alternateIdentifier": "https://schema.datacite.org/meta/kernel-4.4/example/datacite-example-full-v4.4.xml"
        }
      ],
      "creators": [
        {
          "name": "Miller, Elizabeth",
          "nameType": "Personal",
          "givenName": "Elizabeth",
          "familyName": "Miller",
          "affiliation": [
            "DataCite"
          ],
          "nameIdentifiers": [
            {
              "schemeUri": "https://orcid.org",
              "nameIdentifier": "https://orcid.org/0000-0001-5000-0007",
              "nameIdentifierScheme": "ORCID"
            }
          ]
        }
      ],
      "titles": [
        {
          "lang": "en-US",
          "title": "Full DataCite XML Example"
        },
        {
          "lang": "en-US",
          "title": "Demonstration of DataCite Properties.",
          "titleType": "Subtitle"
        }
      ],
      "publisher": "DataCite",
      "container": {},
      "publicationYear": 2014,
      "subjects": [
        {
          "lang": "en-US",
          "subject": "computer science",
          "schemeUri": "http://dewey.info/",
          "subjectScheme": "dewey",
          "classificationCode": "000"
        }
      ],
      "contributors": [
        {
          "name": "Starr, Joan",
          "givenName": "Joan",
          "familyName": "Starr",
          "affiliation": [
            "California Digital Library"
          ],
          "contributorType": "ProjectLeader",
          "nameIdentifiers": [
            {
              "schemeUri": "https://orcid.org",
              "nameIdentifier": "https://orcid.org/0000-0002-7285-027X",
              "nameIdentifierScheme": "ORCID"
            }
          ]
        }
      ],
      "dates": [
        {
          "date": "2021-01-26",
          "dateType": "Updated",
          "dateInformation": "Updated with 4.4 properties"
        },
        {
          "date": "2014",
          "dateType": "Issued"
        }
      ],
      "language": "en",
      "types": {
        "ris": "COMP",
        "bibtex": "misc",
        "citeproc": "article",
        "schemaOrg": "SoftwareSourceCode",
        "resourceType": "XML",
        "resourceTypeGeneral": "Software"
      },
      "relatedIdentifiers": [
        {
          "schemeUri": "https://github.com/citation-style-language/schema/raw/master/csl-data.json",
          "relationType": "HasMetadata",
          "relatedIdentifier": "https://data.datacite.org/application/citeproc+json/10.5072/example-full",
          "relatedIdentifierType": "URL",
          "relatedMetadataScheme": "citeproc+json"
        },
        {
          "relationType": "IsReviewedBy",
          "relatedIdentifier": "arXiv:0706.0001",
          "resourceTypeGeneral": "Text",
          "relatedIdentifierType": "arXiv"
        }
      ],
      "relatedItems": [
        {
          "titles": [
            {
              "title": "Physics letters B"
            }
          ],
          "volume": "776",
          "creators": [],
          "lastPage": "264",
          "firstPage": "249",
          "contributors": [],
          "relationType": "IsPublishedIn",
          "publicationYear": "2018",
          "relatedItemType": "Journal",
          "relatedItemIdentifier": {
            "relatedItemIdentifier": "0370-2693",
            "relatedItemIdentifierType": "ISSN"
          }
        }
      ],
      "sizes": [
        "4 kB"
      ],
      "formats": [
        "application/xml"
      ],
      "version": "4.2",
      "rightsList": [
        {
          "lang": "en-US",
          "rights": "Creative Commons Zero v1.0 Universal",
          "rightsUri": "https://creativecommons.org/publicdomain/zero/1.0/legalcode",
          "schemeUri": "https://spdx.org/licenses/",
          "rightsIdentifier": "cc0-1.0",
          "rightsIdentifierScheme": "SPDX"
        }
      ],
      "descriptions": [
        {
          "lang": "en-US",
          "description": "XML example of all DataCite Metadata Schema v4.4 properties.",
          "descriptionType": "Abstract"
        }
      ],
      "geoLocations": [
        {
          "geoLocationBox": {
            "eastBoundLongitude": "-68.211",
            "northBoundLatitude": "42.893",
            "southBoundLatitude": "41.090",
            "westBoundLongitude": "-71.032"
          },
          "geoLocationPlace": "Atlantic Ocean",
          "geoLocationPoint": {
            "pointLatitude": "31.233",
            "pointLongitude": "-67.302"
          },
          "geoLocationPolygon": [
            {
              "polygonPoint": {
                "pointLatitude": "41.991",
                "pointLongitude": "-71.032"
              }
            },
            {
              "polygonPoint": {
                "pointLatitude": "42.893",
                "pointLongitude": "-69.622"
              }
            },
            {
              "polygonPoint": {
                "pointLatitude": "41.991",
                "pointLongitude": "-68.211"
              }
            },
            {
              "polygonPoint": {
                "pointLatitude": "41.090",
                "pointLongitude": "-69.622"
              }
            },
            {
              "polygonPoint": {
                "pointLatitude": "41.991",
                "pointLongitude": "-71.032"
              }
            }
          ]
        }
      ],
      "fundingReferences": [
        {
          "awardTitle": "Full DataCite XML Example",
          "funderName": "National Science Foundation",
          "awardNumber": "CBET-106",
          "funderIdentifier": "https://doi.org/10.13039/100000001",
          "funderIdentifierType": "Crossref Funder ID"
        }
      ],
      "url": "https://example.org",
      "contentUrl": null,
      "metadataVersion": 0,
      "schemaVersion": "http://datacite.org/schema/kernel-4",
      }
    }
  }
}

Examples

1. Search the for a specific publisher

publisher:DataCite

Run the publisher example search in DataCite Commons.

2. Search for a single DOI

To search for a specific DOI use the DOI field in the metadata.

doi:10.11570/18.0006

Run the example DOI search in DataCite Commons.

3. Search the affiliation

In this case include both the parent and child elements from the schema and use a period (.) to separate the different levels in your search query.


 },
  "creators": [
    {
      "name": "Bloggs, Jane",
      "nameType": "Personal",
      "givenName": "Jane",
      "familyName": "Bloggs",
      "affiliation": "DataCite",
      "nameIdentifiers": [
        {

creators.affiliation.name:DataCite

Run the example affiliation search in DataCite Commons.

4. Use quotes

To search for an exact string, for example, an author’s name, include the text between quotation marks, the search looks for the the exact string contained within the quotes.

titles.title:"CrowdoMeter Tweets"

Run the example search using quotation marks in DataCite Commons.

5. Using operators ( e.g AND OR + -)

Building more complex queries can be done with different syntax including AND OR + - (AND / OR must be capitalised)

Search for all works using the AND operator.

types.resourceTypeGeneral:Software AND types.resourceType:XML

Run the example query using the AND boolean in DataCite Commons.

Search for works using the "AND" and "OR" booleans.

publisher:DataCite AND types.resourceTypeGeneral:(Text OR Dataset)

Run the example query using the AND / OR booleans in DataCite Commons.

6. Wildcards

To run a broader search you can include the wildcard (*)

Search for all works with the subject robot*

subjects.subject:robot*

Run the example query using the wildcard in DataCite Commons

7. Longer queries

Combine numerous elements to limit the search results. In this example the creators and the relatedIdentifier properties are used to build the query:

creators:

"creators": [
    {
      "name": "Fenner, Martin",
      "nameType": "Personal",
      "givenName": "Martin",
      "familyName": "Fenner",
      "affiliation": [],
      "nameIdentifiers": [
        {
          "nameIdentifier": "https://orcid.org/0000-0003-1419-2405",
          "nameIdentifierScheme": "ORCID"
        }
      ]
    }
  ],

relatedIdentifiers:

"relatedIdentifiers": [
    {
      "relationType": "HasPart",
      "relatedIdentifier": "10.5438/6423",
      "relatedIdentifierType": "DOI"
    },
creators.name:"Fenner, Martin" AND relatedIdentifiers.relationType:hasPart

Run this longer query example combining 2 elements in DataCite Commons.