collection module

collection module API:

  • search

Example usage:

from pygbif import collection as coll
coll.search(query="insect")
coll.search(name="Insects;Entomology", limit=2)
coll.search(numberSpecimens = "0,100", limit=1)
coll.search(institutionKey = "6a6ac6c5-1b8a-48db-91a2-f8661274ff80")
coll.search(query = "insect", country = ["US","GB"])

collection API

collection.search(name=None, fuzzyName=None, preservationType=None, contentType=None, numberSpecimens=None, accessionStatus=None, personalCollection=None, sourceId=None, source=None, code=None, alternativeCode=None, contact=None, institutionKey=None, country=None, city=None, gbifRegion=None, machineTagNamespace=None, machineTagName=None, machineTagValue=None, identifier=None, identifierType=None, active=None, displayOnNHCPortal=None, masterSourceType=None, replacedBy=None, sortBy=None, sortOrder=None, offset=None, limit=None, **kwargs)

Search for collections in GRSciColl.

Parameters:
  • q – [str] Simple full text search parameter. The value for this parameter can be a simple word or a phrase. Wildcards are not supported

  • name – [str] Name of a GrSciColl institution or collection

  • fuzzyName – [str] It searches by name fuzzily so the parameter doesn’t have to be the exact name

  • preservationType – [str] Preservation type of a GrSciColl collection. Accepts multiple values

  • contentType – [str] Content type of a GrSciColl collection. See here for accepted values: https://techdocs.gbif.org/en/openapi/v1/registry#/Collections/listCollections

  • numberSpecimens – [str] Number of specimens. It supports ranges and a ‘*’ can be used as a wildcard

  • accessionStatus – [str] Accession status of a GrSciColl collection. Available values: INSTITUTIONAL, PROJECT

  • personalCollection – [bool] Flag for personal GRSciColl collections

  • sourceId – [str] sourceId of MasterSourceMetadata

  • source – [str] Source attribute of MasterSourceMetadata. Available values: DATASET, ORGANIZATION, IH_IRN

  • code – [str] Code of a GrSciColl institution or collection

  • alternativeCode – [str] Alternative code of a GrSciColl institution or collection

  • contact – [str] Filters collections and institutions whose contacts contain the person key specified

  • institutionKey – [str] Keys of institutions to filter by

  • country – [str] Filters by country given as a ISO 639-1 (2 letter) country code

  • city – [str] Filters by the city of the address. It searches in both the physical and the mailing address

  • gbifRegion – [str] Filters by a gbif region. Available values: AFRICA, ASIA, EUROPE, NORTH_AMERICA, OCEANIA, LATIN_AMERICA, ANTARCTICA

  • machineTagNamespace – [str] Filters for entities with a machine tag in the specified namespace

  • machineTagName – [str] Filters for entities with a machine tag with the specified name (use in combination with the machineTagNamespace parameter)

  • machineTagValue – [str] Filters for entities with a machine tag with the specified value (use in combination with the machineTagNamespace and machineTagName parameters)

  • identifier – [str] An identifier of the type given by the identifierType parameter, for example a DOI or UUID

  • identifierType – [str] An identifier type for the identifier parameter. Available values: URL, LSID, HANDLER, DOI, UUID, FTP, URI, UNKNOWN, GBIF_PORTAL, GBIF_NODE, GBIF_PARTICIPANT, GRSCICOLL_ID, GRSCICOLL_URI, IH_IRN, ROR, GRID, CITES, SYMBIOTA_UUID, WIKIDATA, NCBI_BIOCOLLECTION, ISIL, CLB_DATASET_KEY

  • active – [bool] Active status of a GrSciColl institution or collection

  • displayOnNHCPortal – [bool] Flag to show this record in the NHC portal

  • masterSourceType – [str] The master source type of a GRSciColl institution or collection. Available values: GRSCICOLL, GBIF_REGISTRY, IH

  • replacedBy – [str] Key of the entity that replaced another entity

  • sortBy – [str] Field to sort the results by. It only supports the fields contained in the enum. Available values: NUMBER_SPECIMENS

  • sortOrder – [str] Sort order to use with the sortBy parameter. Available values: ASC, DESC

  • offset – [int] Determines the offset for the search results

  • limit – [int] Controls the number of results in the page. Default 20

  • kwargs – Further named arguments passed on to requests.get

Returns:

A dictionary

Usage::

from pygbif import collection as coll coll.search(query=”insect”) coll.search(name=”Insects;Entomology”, limit=2) coll.search(numberSpecimens = “0,100”, limit=1) coll.search(institutionKey = “6a6ac6c5-1b8a-48db-91a2-f8661274ff80”) coll.search(query = “insect”, country = [“US”,”GB”])