City Nature Challenge API

To provide results via the API, a project needs to register with the City Nature Challenge. Please contact organizers at citynaturechallenge.org/contact to participate.

For projects that do not use iNaturalist, the CNC API is available to report results on the Live Results page of the City Nature Challenge website. The Live Results page is a real-time leaderboard that shows the number of observations, species, and participants for each city participating in the City Nature Challenge.

The results are gathered by calling on endpoints of participating organizations and projects. This documentation provides the format for the JSON body required by the CNC API.

Response Format

Below is a snippet that shows an example JSON response required by the CNC API:

{
  "project": {
    "id": "1",
    "title": "Los Angeles"
  },
  "observation_count": 1234,
  "species_count": 567,
  "observers_count": 890,
  "identifiers_count": 19,
  "research_grade_observations": 103,
  "most_observed_species": {
    "media": {
      "url": "https://inaturalist-open-data.s3.amazonaws.com/photos/623186374/large.jpg",
      "attribution": "(c) Zinogre, some rights reserved (CC BY-SA), uploaded by Zinogre"
    },
    "scientific_name": "Spilopelia chinensis",
    "common_name": "Spotted Dove",
    "count": 542
  }
}

Below is an example payload for a project that does not track most_observed_species or identifiers_count (both are set to null):

{
  "project": {
    "id": "2",
    "title": "San Francisco"
  },
  "observation_count": 10,
  "species_count": 4,
  "observers_count": 3,
  "identifiers_count": null,
  "research_grade_observations": 0,
  "most_observed_species": null
}

Fields

  • project: An object containing the following fields:
    • id (integer): The unique identifier of the project.
    • title (string): The name of the project.
  • observation_count (integer): The total number of observations made in the project.
  • species_count (integer): The total number of species observed in the project.
  • observers_count (integer): The total number of participants in the project.
  • identifiers_count (integer | null): The total number of identifiers in the project. If this number is not applicable to the project, set the value to null.
  • most_observed_species (object | null): An object describing the most observed species, or null if the project does not track this information. When present, it includes the following fields:
    • **media **: An object containing the following fields:
      • url (string): The URL of the media associated with the most observed species.
      • attribution (string): The attribution for the media, including the photographer's name and license information.
    • scientific_name (string): The scientific name of the most observed species.
    • common_name (string): The common name of the most observed species.
    • count (integer | null): The number of observations of the most observed species.