IdentificationController

class pyinaturalist.controllers.IdentificationController(client)

Bases: BaseController

Controller for Identification requests

Methods

__call__(identification_id, **params) Identification | None

Get a single identification by ID

Example

>>> client.identifications(16227955)
Parameters:

identification_id (int) – A single identification ID

Return type:

Identification | None

__init__(client)
from_ids(identification_ids, **params) Paginator[Identification]

Get one or more identifications by ID

Notes

Examples

>>> ids = client.identifications.from_ids(700305837).all()
>>> ids = client.identifications.from_ids([700305837, 700306322]).all()
Parameters:

identification_ids (int | Iterable[int]) – One or more identification IDs

Return type:

Paginator[Identification]

search(current_taxon, own_observation, is_change, taxon_active, observation_taxon_active, id, ...) Paginator[Identification]

Search identifications

Notes

Parameters:
  • current_taxon (bool | None) – ID’s taxon is the same it’s observation’s taxon

  • own_observation (bool | None) – ID was added by the observer

  • is_change (bool | None) – ID was created as a results of a taxon change

  • taxon_active (bool | None) – ID’s taxon is currently an active taxon

  • observation_taxon_active (bool | None) – Observation’s taxon is currently an active taxon

  • id (int | Iterable[int] | None) – Identification ID

  • rank (str | Iterable[str] | None) – ID’s taxon must have this rank # Multiple choice

  • observation_rank (str | Iterable[str] | None) – Observation’s taxon must have this rank # Multiple choice

  • user_id (int | Iterable[int] | str | Iterable[str] | None) – Identifier must have this user ID

  • user_login (str | Iterable[str] | None) – Identifier must have this user login

  • current (bool | None) – Most recent Identification on a observation by a user

  • category (Union[Literal['improving', 'supporting', 'leading', 'maverick'], Iterable[Literal['improving', 'supporting', 'leading', 'maverick']], None]) – Type of identification

  • place_id (int | Iterable[int] | None) – Observation must occur in this place

  • quality_grade (Union[Literal['casual', 'needs_id', 'research'], Iterable[Literal['casual', 'needs_id', 'research']], None]) – Observation must have this quality grade

  • taxon_id (int | Iterable[int] | None) – Identification taxa must match the given taxa or their descendants

  • observation_taxon_id (int | Iterable[int] | None) – Observation taxa must match the given taxa or their descendants

  • iconic_taxon_id (int | Iterable[int] | None) – Identification iconic taxon ID

  • observation_iconic_taxon_id (int | Iterable[int] | None) – Observation iconic taxon ID

  • lrank (str | None) – Identification taxon must have this rank or higher

  • hrank (str | None) – Identification taxon must have this rank or lower

  • observation_lrank (str | None) – Observation taxon must have this rank or higher

  • observation_hrank (str | None) – Observation taxon must have this rank or lower

  • without_taxon_id (int | Iterable[int] | None) – Exclude Identifications of these taxa and their descendants

  • without_observation_taxon_id (int | Iterable[int] | None) – Exclude Identifications of observations of these taxa and their descendants

  • d1 (date | datetime | str | None) – Must be observed on or after this date

  • d2 (date | datetime | str | None) – Must be observed on or before this date

  • observation_created_d1 (date | datetime | str | None) – Observation must be created on or after this date

  • observation_created_d2 (date | datetime | str | None) – Observation must be created on or before this date

  • observed_d1 (date | datetime | str | None) – Observation must be observed on or after this date

  • observed_d2 (date | datetime | str | None) – Observation must be observed on or before this date

  • id_above (int | None) – Must have an ID above this value

  • id_below (int | None) – Must have an ID below this value

  • page (int | None) – Page number of results to return

  • per_page (int | None) – Number of results to return in a page. The maximum value is generally 200, unless otherwise noted

  • order (Optional[Literal['asc', 'desc']]) – Sort order

  • order_by (str | None) – Field to sort on

  • count_only (bool | None) – Only return a count of results; alias for per_page=0

  • reverse (bool | None) – Reverse the order of results; alias for order='descending'

  • only_id (bool | None) – Return only the record IDs

Return type:

Paginator[Identification]

Example

Get all of your own species-level identifications:

>>> ids = client.identifications.search(user_login='my_username', rank='species').all()