GET units
Operation ID: getUnits
Auth: unknown
Description
Returns all Macrostrat units matching search criteria. Units represent individual rock layers or stratigraphic units within columns.
Parameters (24)
(number, query, optional)
Numerical age in millions of years before present (Ma)
(number, query, optional)
Numerical age (Ma) - must be used with age_top and be greater than age_top
(number, query, optional)
Numerical age (Ma) - must be used with age_bottom and be less than age_bottom
(integer, query, optional)
A valid column ID
(string, query, optional)
A column type
(string, query, optional)
Specific environment name
(string, query, optional)
General environments
(integer, query, optional)
Specific environment ID from /defs/environments
(string, query, optional)
Groups of environments
(string, query, optional)
Desired output format (json, csv, geojson, geojson_bare, topojson, topojson_bare)
Constraints: {'enum': ['json', 'csv', 'geojson', 'geojson_bare', 'topojson', 'topojson_bare']}
(integer, query, optional)
A chronostratigraphic time interval ID from /defs/intervals
(string, query, optional)
Chronostratigraphic time interval name (e.g., Permian, Cretaceous)
(number, query, optional)
Decimal degree latitude, WGS84
(string, query, optional)
Specific lithology name (e.g., shale, sandstone, limestone)
(string, query, optional)
General lithologies (sedimentary, igneous, metamorphic)
(integer, query, optional)
ID of a lithology from /defs/lithologies
(string, query, optional)
Groups of lithologies (e.g., carbonate, siliciclastic)
(number, query, optional)
Decimal degree longitude, WGS84
(integer, query, optional)
A Macrostrat project ID (1=North America, 3=eODP, 5=New Zealand, etc.)
(string, query, optional)
Response detail level (short or long)
Constraints: {'enum': ['short', 'long']}
(integer, query, optional)
A valid section ID
(string, query, optional)
A fuzzy stratigraphic name to match units to (e.g., Mancos, Dakota)
(string, query, optional)
A single or comma-separated list of stratigraphic IDs from /defs/strat_names
(integer, query, optional)
A valid unit ID
Examples (8)
| Title | Type | URL | Action |
|---|---|---|---|
| Get Cretaceous units from San Juan Basin column | sdk_extracted |
https://macrostrat.org/api/units?col_id={column_id}&interval_name=Cretaceous |
|
| Get marine units for Phanerozoic in North America | sdk_extracted |
https://macrostrat.org/api/units?environ_class=marine&interval_name=Phanerozoic&project_id=1 |
|
| Find units by geographic coordinates for Nashville TN | sdk_extracted |
https://macrostrat.org/api/units?lat=36.1627&lng=-86.7816 |
|
| Get all units (basic request) | curl |
https://macrostrat.org/api/units?format=json&response=short |
|
| Search units by geographic location and lithology | curl |
https://macrostrat.org/api/units?lat=43.07&lng=-89.4&lith_type=sandstone&format=json |
|
| Search units by age range and stratigraphic interval | curl |
https://macrostrat.org/api/units?age_bottom=250&age_top=300&interval_name=Permian&format=json |
|
| Get all Macrostrat units | probe-gate |
https://macrostrat.org/api/v2/units |
|
| Get geologic units | probe-gate |
https://macrostrat.org/api/units |
Probe History
Status Codes
| Time | Status | Latency | Size |
|---|---|---|---|
| 2026-03-23 10:40:29.674847 | 200 | 1581ms | 2.0MB |
| 2026-03-23 10:27:17.143276 | 200 | 394ms | |
| 2026-03-23 10:26:14.661534 | 200 | 1261ms | 2.0MB |
| 2026-03-23 09:48:34.468105 | 200 | 442ms | |
| 2026-03-23 09:39:29.696416 | 200 | 399ms | |
| 2026-03-23 09:09:58.590431 | 200 | 648ms | |
| 2026-03-23 09:08:12.749207 | 200 | 398ms | |
| 2026-03-15 01:12:34.537487 | 200 | 434ms |
Response Changes
| When | Old | New |
|---|---|---|
| 2026-03-23 09:08:12.749207 | 05b71a1ca1d1 |
3d27995206d1 |
| 2026-03-23 09:09:58.590431 | 3d27995206d1 |
082989cdfad3 |
| 2026-03-23 09:39:29.696416 | 082989cdfad3 |
71af2670d6c3 |
| 2026-03-23 09:48:34.468105 | 71af2670d6c3 |
c77fea8354b1 |
| 2026-03-23 10:26:14.661534 | c77fea8354b1 |
f759809f16d2 |
| 2026-03-23 10:27:17.143276 | f759809f16d2 |
3d27995206d1 |
| 2026-03-23 10:40:29.674847 | 3d27995206d1 |
54c4f5f79d22 |