# iNaturalist observation histogram API

Get iNaturalist observation histograms with taxon, place and date filters via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as interval, output, raw, and retrieve structured data including selected time-bucket interval and source time-bucket key for seasonal summaries, and filtered charts, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/inaturalist/inaturalist-observation-histogram-api/8f0552b0-ab94-4d5f-9f7d-e487c971124e/
API ID: 8f0552b0-ab94-4d5f-9f7d-e487c971124e
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/inaturalist/v1/histogram
Page update time: 2026-12-03T02:48:12.024Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:48:11.050Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## iNaturalist Observation Histogram API

Use taxon, place, project, observer and date filters as needed. interval defaults to month\_of\_year; date\_field defaults to observed or can be created for uploaded dates. Month-of-year buckets differ from consecutive calendar months.

## What You Can Build

- **Seasonal summaries**: Compare counts using the selected bucket interval and date basis.
- **Filtered charts**: Keep the taxon and place scope attached to every series.

## Returned Data

| Field | Meaning |
| --- | --- |
| `interval` | Selected time-bucket interval |
| `date_field` | Observed or uploaded date basis |
| `buckets[].key` | Source time-bucket key |
| `buckets[].count` | Observation count in the source bucket |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "iNaturalist observation histogram API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "taxon_id": {
          "type": "string",
          "description": "Taxon id(s)."
        },
        "taxon_name": {
          "type": "string",
          "description": "Taxon name."
        },
        "place_id": {
          "type": "string",
          "description": "Place id(s)."
        },
        "project_id": {
          "type": "string",
          "description": "Project id(s)."
        },
        "user": {
          "type": "string",
          "description": "Observer username(s)."
        },
        "quality_grade": {
          "type": "string",
          "description": "research, needs_id or casual."
        },
        "observed_from": {
          "type": "string",
          "description": "Observed on or after (YYYY-MM-DD)."
        },
        "observed_to": {
          "type": "string",
          "description": "Observed on or before."
        },
        "interval": {
          "type": "string",
          "description": "Bucket size (default month_of_year).",
          "enum": [
            "year",
            "month",
            "week",
            "day",
            "hour",
            "month_of_year",
            "week_of_year"
          ]
        },
        "date_field": {
          "type": "string",
          "description": "Observed or uploaded date (default observed).",
          "enum": [
            "observed",
            "created"
          ]
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "applied_filters": {
      "type": "object",
      "properties": {
        "date_field": {
          "type": "string"
        },
        "interval": {
          "type": "string"
        },
        "taxon_id": {
          "type": "string"
        }
      }
    },
    "buckets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer"
          },
          "key": {
            "type": "string"
          }
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "credits_used": {
      "type": "integer"
    },
    "date_field": {
      "type": "string"
    },
    "fetched_at": {
      "type": "string"
    },
    "interval": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/inaturalist/v1/histogram?interval=month_of_year&output=json&raw=0&taxon_id=48662' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "applied_filters": {
    "date_field": "observed",
    "interval": "month_of_year",
    "taxon_id": "48662"
  },
  "buckets": [
    {
      "count": 10188,
      "key": "1"
    },
    {
      "count": 9671,
      "key": "2"
    },
    {
      "count": 16486,
      "key": "3"
    },
    {
      "count": 26579,
      "key": "4"
    },
    {
      "count": 24468,
      "key": "5"
    },
    {
      "count": 37062,
      "key": "6"
    },
    {
      "count": 97131,
      "key": "7"
    },
    {
      "count": 132151,
      "key": "8"
    },
    {
      "count": 106022,
      "key": "9"
    },
    {
      "count": 67244,
      "key": "10"
    },
    {
      "count": 28477,
      "key": "11"
    },
    {
      "count": 12478,
      "key": "12"
    }
  ],
  "cached": false,
  "credits_used": 1,
  "date_field": "observed",
  "fetched_at": "2026-11-19T12:26:30.206Z",
  "interval": "month_of_year",
  "total": 12
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Does month_of_year identify one specific calendar month?
It groups by month of the year. Use interval=month for consecutive month buckets and retain your date filters.

### How do I group by upload date?
Set date_field=created; observed is the default.

### Which value gives a bucket’s observation count?
Use buckets[].count and keep the top-level metadata separate from the bucket values.

### Can observation counts be read as numbers of organisms?
No. They count source observation records in the selected scope, not a population census.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/inaturalist/inaturalist-observation-histogram-api/8f0552b0-ab94-4d5f-9f7d-e487c971124e/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
