MERMAID provides programmatic access to its entire dataset via an Application Programming Interface (API). This API is the backbone of all MERMAID tools—including MERMAID Collect, MERMAID Explore, and the MERMAID R package mermaidr—and can also be used directly for building custom tools, dashboards, or workflows.
This documentation refers specifically to the production API hosted at: https://api.datamermaid.org/v1/
The API is built on a secure, scalable AWS-based stack, powered by a PostgreSQL database (via Amazon RDS) and developed using Django and the Django REST Framework.
It is actively used by:
All MERMAID code is free and open source, licensed to support transparency, reproducibility, and community-driven development.
Why use the API?
Use the MERMAID API if you want to:
Automate data exports and processing.
Access real-time, up-to-date MERMAID data without manual exports.
Build your own custom visualizations or apps using MERMAID data.
Integrate MERMAID data into third-party software (e.g., ArcGIS, R Shiny, Tableau)
Explore the API Docs
You can find a detailed API documentation, which includes:
A client file guide using Insomnia to test requests
Instructions for authentication using MERMAID login credentials
Resources to browse endpoints
Authentication
All API requests require authentication. You can either:
Use your MERMAID credentials to obtain a token
Or generate an API token (if available to your user type)
Common Endpoints for MERMAID Projects
Here are some frequently used endpoints related to MERMAID projects:
Observations: All observation in a transect for each survey method:
/projects/<project_id>/obstransectbeltfishs/
/projects/<project_id>/obsbenthiclits/
/projects/<project_id>/obsbenthicpits/
/projects/<project_id>/obscoloniesbleached/
/projects/<project_id>/obsquadratbenthicpercent/
/projects/<project_id>/obshabitatcomplexities/
Sample units: Aggregated metrics at the transect-level for each survey type:
/projects/<project_id>fishbelttransects
/projects/<project_id>/benthictransects/
/projects/<project_id>/quadratcollections/
Sample events: Aggregated metrics at the site/date-level for all survey types:
/projects/<project_id>/sampleevents/
Integration Examples
You can use the API in tools such as:
R: via
httr
,jsonlite
, ormermaidr
Python: using
requests
orpandas
Web apps: JavaScript
fetch()
or client-side libraries
Learn from Our Users
How Rare Automates Data from MERMAID to Their Dashboard
A standout example of how the MERMAID API is being used comes from Rare, which built an automated pipeline to extract coral reef monitoring data from its Fish Forever projects in MERMAID and feed it directly into their internal dashboard for streamlined analysis and reporting.
What it does:
Extracts data from the MERMAID API for projects tagged with “Rare,” including fish, coral, and photo quadrat data.
Transforms raw data into standardized formats using Python and Pandas, with full data validation.
Loads processed data into a PostgreSQL database, enabling real-time analytics and dashboarding.
Technologies used:
Apache Airflow: for robust, scheduled orchestration (daily at 2 AM)
Python with Pandas: for data transformation
SQLAlchemy: for secure and efficient database communication
Benefits:
Eliminates manual data downloads and prep
Keeps data fresh and analysis-ready with daily updates
Ensures consistency, error handling, and logging across projects
Scales across multiple projects and supports parallel processing
This pipeline is a powerful demonstration of how MERMAID’s API can be used to support data workflows.
This pipeline is available on GitHub, allowing other organizations to adopt or customize it for their own needs.
Related Resources
Need help getting started? Contact the MERMAID support team or explore the API docs to learn more.