Advanced Search on OSF

The OSF Search interface offers a few options for filtering search results. However, with knowledge of some specific search syntax, you can do even more powerful searching of OSF using specific metadata fields.

Advanced Search Basics

All of the following queries can be added to the search bar on the OSF search page (https://osf.io/search/). It is also possible to formulate these queries directly into the browser’s address bar. This section outlines basic information about using advanced search syntax. The next section describes the specific search parameters that can be used.

Using the Search Page

When adding the advanced search parameters to the search page, the parameter must be followed by a colon and then the search term with no spaces:

resource_type_general:dataset

search screen showing advanced query: resource_type_general:dataset

The search results shown above are limited to only those objects that are tagged as "dataset" in the resource type metadata field (a list of all of the parameters that can be searched is in the next section).

Search Via URL

Any of the query parameters described in this document can also be launched in a similar way: add ?q= at the end of the search URL, then the parameter followed by a colon and the term (such as resource_type_general:dataset).

The same query can be launched directly into the browser at:

https://osf.io/search/?q=resource_type_general:dataset

Phrase Searching

Quotation marks can be used to surround a phrase containing multiple words. 

description:"randomized trial"

search screen showing advanced query: description:"randomized trial"

Without the quotation marks, the search would be for the term randomized in the description and the word trial appearing anywhere in the object. 

search screen showing advanced query: description:randomized trial

The second set of results is much larger and may include many items not relevant to the query. When searching for any name or phrase it is good practice to use quotation marks to reduce non-relevant items in results.

Combining Parameters

More than one query can be combined by using the Boolean operators AND, OR, and NOT

  • AND: retrieves only objects meeting all parameters
  • OR: retrieves object with any of the parameters
  • NOT: retrieves objects that do not have the parameter following the operator

Boolean operators must be entered as ALL CAPS.

For example:

affiliated_institutions:”University of Maryland” NOT affiliated_institutions:Baltimore

search screen showing advanced query: affiliated_institutions:"University of Maryland" NOT affiliated_institutions:Baltimore

will retrieve objects affiliated with the University of Maryland, but not the University of Maryland, Baltimore.

Queries of different parameters can be also combined:

resource_type_general:dataset AND funder_name:”National Science Foundation”

search screen showing advanced query: resource_type_general:dataset AND funder_name:"National Science Foundation"

Combined parameters can also be searched directly in the browser address bar the same way with %20 added in place of blank spaces and %22 in place of quotation marks:

https://osf.io/search/?q=affiliated_institutions:%22University%20of%20Maryland%22%20NOT%20affiliated_institutions:Baltimore

Advanced queries can also be combined with general keyword searches by combining terms without any specific parameter:

affiliated_institutions:”Center For Open Science” metadata

search screen showing advanced query: affiliated_institutions:"Center For Open Science" metadata

The default for this combination is to imply the Boolean operator OR between terms. The search above, for example, would return all objects affiliated with the Center For Open Science, OR any other object (whether from COS or not) that has a match with the term “metadata” resulting in a very large set of objects. 

If instead, only items affiliated with the Center For Open Science that also match the term “metadata” are desired, the Boolean AND operator can be added:

affiliated_institutions:”Center For Open Science” AND metadata

search screen showing advanced query: affiliated_institutions:"Center For Open Science AND metadata

This query returns a much smaller number of results since only those objects meeting both search terms are selected.

Advanced Search Parameters

These basic rules can be used to search using any of the parameters described below. Search terms should be added directly after the colon at the end of the parameter name with no spaces (e.g. contributors.fullname:Smith).

Affiliated Institution

OSF objects affiliated with Member Institutions can be searched for using the following prefix:
affiliated_institutions:
For example, a search for objects affiliated with the Center For Open Science can be found by using:
affiliated_institutions:”Center For Open Science”
The search above uses quotation marks around the exact name of the institution. A search could also be done in this case and retrieve the same results:
affiliated_institutions:Open
This is because no other affiliated institution uses “Open” in their name. If an institution has a unique name this kind of simple searching may work, however, to be sure that you are not retrieving incorrect results, you may want to put the full name of the institution in quotation marks. A list of the full names of Institutions as they appear in the OSF database is on the OSF Institutions home page.

Contributor

The OSF search has a filter to show user accounts in results. Names of contributors can also be added to queries as filters to show only materials the user contributed to, rather than the contributor’s account:
contributors.fullname:
The “.fullname” suffix must be used to search by name. 

Funder/Award Information

OSF metadata includes optional fields for funder’s names and identifiers as well as grant award titles and numbers. These are optional fields, so this information may not be included in all records. However, this type of search will guarantee that results are relevant.
The following fields are available for search:
funder_name:
funder_identifier:
award_title:
award_number:
Funder names and identifiers are taken from the Crossref Funder Registry, found at: https://www.crossref.org/services/funder-registry/. As with other terms, you may need to enclose a name in quotation marks to get specific results. A search for “National” alone may retrieve results from many organizations, while a search for “Randy” may only match one (Randy Shaver Cancer Research and Community Fund). 
Crossref funder identifiers are unique and should be sufficient to find the correct results. Although these identifiers are not directly added in metadata interfaces in OSF they are added to records when funders are matched to a Crossref entry.
Award names and titles are unique to specific grant awards and are therefore a free-text field.

Resource Type

Resource type refers to the specific type of material in an OSF object. The terms come from a list determined by DataCite and include things like datasets, conference papers, and journal articles, as well as more generic categories like image or text. These terms can be applied to projects and registrations as well as individual files. A full list of terms are found in an appendix to this document. Terms from the list must be input exactly as they appear on the list. For example, conference proceedings must be input as “ConferenceProceeding” exactly.
The parameter for resource types is:
resource_type_general:

Title, Description, or Tags

Most results from a normal OSF search will be from matches to the title, description or keywords. You can specify where these terms occur though with an advanced query:
title:
description:
tags:
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.