Identifications#

Summary#

Classes

Functions

get_identifications(**params)

Search identifications

get_identifications_by_id(identification_id, ...)

Get one or more identification records by ID

Module Contents#

pyinaturalist.v1.identifications.get_identifications(**params)#

Search identifications

Notes

Parameters:

Example

Get all of your own species-level identifications:

>>> response = get_identifications(user_login='my_username', rank='species')
>>> print([f"{i['user']['login']}: {i['taxon_id']} ({i['category']})" for i in response['results']])
[155043569] Species: 76465 (leading) added on 2021-02-15 10:46:27-06:00 by jkcook
[153668189] Species: 76465 (supporting) added on 2021-02-06 17:43:37+00:00 by jkcook
[147500725] Species: 1163860 (improving) added on 2020-12-24 23:52:30+00:00 by jkcook
...
Example Response
from datetime import datetime

from dateutil.tz import tzoffset

{
    'total_results': 873,
    'page': 1,
    'per_page': 2,
    'results': [
        {
            'id': 155554373,
            'uuid': '88031477-a183-46c6-8de3-06bac7b5f220',
            'user': {
                'id': 2115051,
                'login': 'jkcook',
                'spam': False,
                'suspended': False,
                'created_at': '2019-08-10T17:52:01+00:00',
                'login_autocomplete': 'jkcook',
                'login_exact': 'jkcook',
                'name': 'Jordan Cook',
                'name_autocomplete': 'Jordan Cook',
                'orcid': None,
                'icon': 'https://static.inaturalist.org/attachments/users/icons/2115051/thumb.jpeg?1591994381',
                'observations_count': 706,
                'identifications_count': 542,
                'journal_posts_count': 0,
                'activity_count': 1248,
                'species_count': 357,
                'universal_search_rank': 706,
                'roles': [],
                'site_id': 1,
                'icon_url': 'https://static.inaturalist.org/attachments/users/icons/2115051/medium.jpeg?1591994381',
            },
            'created_at': datetime(2021, 2, 18, 20, 31, 32, tzinfo=tzoffset(None, -21600)),
            'created_at_details': {
                'date': '2021-02-18',
                'day': 18,
                'month': 2,
                'year': 2021,
                'hour': 20,
                'week': 7,
            },
            'body': None,
            'category': 'supporting',
            'current': True,
            'flags': [],
            'own_observation': True,
            'taxon_change': None,
            'vision': False,
            'disagreement': False,
            'previous_observation_taxon_id': 60132,
            'spam': False,
            'taxon_id': 60132,
            'hidden': False,
            'current_taxon': True,
            'taxon': {
                'id': 60132,
                'rank': 'species',
                'rank_level': 10,
                'iconic_taxon_id': 47126,
                'ancestor_ids': [
                    47126,
                    211194,
                    47125,
                    47124,
                    47605,
                    47604,
                    201654,
                    632883,
                    632885,
                    48561,
                    60132,
                ],
                'is_active': True,
                'min_species_taxon_id': 60132,
                'min_species_ancestry': '47126,211194,47125,47124,47605,47604,201654,632883,632885,48561,60132',
            },
            'observation': 'TRUNCATED',
            'moderator_actions': [],
            'observed_on': None,
        },
        {
            'id': 155554077,
            'uuid': '12922da1-a203-46f2-b0f2-fd21917b4b07',
            'user': {
                'id': 2115051,
                'login': 'jkcook',
                'spam': False,
                'suspended': False,
                'created_at': '2019-08-10T17:52:01+00:00',
                'login_autocomplete': 'jkcook',
                'login_exact': 'jkcook',
                'name': 'Jordan Cook',
                'name_autocomplete': 'Jordan Cook',
                'orcid': None,
                'icon': 'https://static.inaturalist.org/attachments/users/icons/2115051/thumb.jpeg?1591994381',
                'observations_count': 706,
                'identifications_count': 542,
                'journal_posts_count': 0,
                'activity_count': 1248,
                'species_count': 357,
                'universal_search_rank': 706,
                'roles': [],
                'site_id': 1,
                'icon_url': 'https://static.inaturalist.org/attachments/users/icons/2115051/medium.jpeg?1591994381',
            },
            'created_at': datetime(2021, 2, 18, 20, 29, 6, tzinfo=tzoffset(None, -21600)),
            'created_at_details': {
                'date': '2021-02-18',
                'day': 18,
                'month': 2,
                'year': 2021,
                'hour': 20,
                'week': 7,
            },
            'body': None,
            'category': 'supporting',
            'current': True,
            'flags': [],
            'own_observation': True,
            'taxon_change': None,
            'vision': False,
            'disagreement': False,
            'previous_observation_taxon_id': 61340,
            'spam': False,
            'taxon_id': 61340,
            'hidden': False,
            'current_taxon': True,
            'taxon': {
                'id': 61340,
                'rank': 'species',
                'rank_level': 10,
                'iconic_taxon_id': 47126,
                'ancestor_ids': [
                    47126,
                    211194,
                    47125,
                    47124,
                    47605,
                    47604,
                    201654,
                    632883,
                    632885,
                    48561,
                    61340,
                ],
                'is_active': True,
                'min_species_taxon_id': 61340,
                'min_species_ancestry': '47126,211194,47125,47124,47605,47604,201654,632883,632885,48561,61340',
            },
            'observation': 'TRUNCATED',
            'moderator_actions': [],
            'observed_on': None,
        },
    ],
}
Return type:

Dict[str, Any]

Returns:

Response dict containing identification records

pyinaturalist.v1.identifications.get_identifications_by_id(identification_id, **params)#

Get one or more identification records by ID

Notes

Example

>>> get_identifications_by_id(155554373)
Example Response
from datetime import datetime

from dateutil.tz import tzoffset

{
    'total_results': 873,
    'page': 1,
    'per_page': 2,
    'results': [
        {
            'id': 155554373,
            'uuid': '88031477-a183-46c6-8de3-06bac7b5f220',
            'user': {
                'id': 2115051,
                'login': 'jkcook',
                'spam': False,
                'suspended': False,
                'created_at': '2019-08-10T17:52:01+00:00',
                'login_autocomplete': 'jkcook',
                'login_exact': 'jkcook',
                'name': 'Jordan Cook',
                'name_autocomplete': 'Jordan Cook',
                'orcid': None,
                'icon': 'https://static.inaturalist.org/attachments/users/icons/2115051/thumb.jpeg?1591994381',
                'observations_count': 706,
                'identifications_count': 542,
                'journal_posts_count': 0,
                'activity_count': 1248,
                'species_count': 357,
                'universal_search_rank': 706,
                'roles': [],
                'site_id': 1,
                'icon_url': 'https://static.inaturalist.org/attachments/users/icons/2115051/medium.jpeg?1591994381',
            },
            'created_at': datetime(2021, 2, 18, 20, 31, 32, tzinfo=tzoffset(None, -21600)),
            'created_at_details': {
                'date': '2021-02-18',
                'day': 18,
                'month': 2,
                'year': 2021,
                'hour': 20,
                'week': 7,
            },
            'body': None,
            'category': 'supporting',
            'current': True,
            'flags': [],
            'own_observation': True,
            'taxon_change': None,
            'vision': False,
            'disagreement': False,
            'previous_observation_taxon_id': 60132,
            'spam': False,
            'taxon_id': 60132,
            'hidden': False,
            'current_taxon': True,
            'taxon': {
                'id': 60132,
                'rank': 'species',
                'rank_level': 10,
                'iconic_taxon_id': 47126,
                'ancestor_ids': [
                    47126,
                    211194,
                    47125,
                    47124,
                    47605,
                    47604,
                    201654,
                    632883,
                    632885,
                    48561,
                    60132,
                ],
                'is_active': True,
                'min_species_taxon_id': 60132,
                'min_species_ancestry': '47126,211194,47125,47124,47605,47604,201654,632883,632885,48561,60132',
            },
            'observation': 'TRUNCATED',
            'moderator_actions': [],
            'observed_on': None,
        },
        {
            'id': 155554077,
            'uuid': '12922da1-a203-46f2-b0f2-fd21917b4b07',
            'user': {
                'id': 2115051,
                'login': 'jkcook',
                'spam': False,
                'suspended': False,
                'created_at': '2019-08-10T17:52:01+00:00',
                'login_autocomplete': 'jkcook',
                'login_exact': 'jkcook',
                'name': 'Jordan Cook',
                'name_autocomplete': 'Jordan Cook',
                'orcid': None,
                'icon': 'https://static.inaturalist.org/attachments/users/icons/2115051/thumb.jpeg?1591994381',
                'observations_count': 706,
                'identifications_count': 542,
                'journal_posts_count': 0,
                'activity_count': 1248,
                'species_count': 357,
                'universal_search_rank': 706,
                'roles': [],
                'site_id': 1,
                'icon_url': 'https://static.inaturalist.org/attachments/users/icons/2115051/medium.jpeg?1591994381',
            },
            'created_at': datetime(2021, 2, 18, 20, 29, 6, tzinfo=tzoffset(None, -21600)),
            'created_at_details': {
                'date': '2021-02-18',
                'day': 18,
                'month': 2,
                'year': 2021,
                'hour': 20,
                'week': 7,
            },
            'body': None,
            'category': 'supporting',
            'current': True,
            'flags': [],
            'own_observation': True,
            'taxon_change': None,
            'vision': False,
            'disagreement': False,
            'previous_observation_taxon_id': 61340,
            'spam': False,
            'taxon_id': 61340,
            'hidden': False,
            'current_taxon': True,
            'taxon': {
                'id': 61340,
                'rank': 'species',
                'rank_level': 10,
                'iconic_taxon_id': 47126,
                'ancestor_ids': [
                    47126,
                    211194,
                    47125,
                    47124,
                    47605,
                    47604,
                    201654,
                    632883,
                    632885,
                    48561,
                    61340,
                ],
                'is_active': True,
                'min_species_taxon_id': 61340,
                'min_species_ancestry': '47126,211194,47125,47124,47605,47604,201654,632883,632885,48561,61340',
            },
            'observation': 'TRUNCATED',
            'moderator_actions': [],
            'observed_on': None,
        },
    ],
}
Parameters:

identification_id (Union[int, Iterable[int]]) – Get taxa with this ID. Multiple values are allowed.

Return type:

Dict[str, Any]

Returns:

Response dict containing identification records