> For the complete documentation index, see [llms.txt](https://docs.2050-materials.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2050-materials.com/using-the-2050-materials-api/quick-reference-for-ai-agents.md). Agents can also search and read this documentation through its [MCP server](https://docs.2050-materials.com/~gitbook/mcp).

# Quick Reference for AI Agents

A compact reference to the 2050 Materials API for LLMs, agents and developers who want everything on one page: authentication, endpoints, query patterns, response shape and limits.

2050 Materials provides construction-industry sustainability data through an API: life cycle assessment (LCA) data on construction products and generic materials worldwide. This page summarises how to use it. Each section links to the full documentation.

{% hint style="info" %}
For authoritative field names, types and allowed values, use the machine-readable OpenAPI spec, [schema.json](https://app.2050-materials.com/developer/schema.json), and the filter endpoints rather than this page.
{% endhint %}

## For agents <a href="#for-agents" id="for-agents"></a>

Ways for an agent to read these docs:

* [llms.txt](https://docs.2050-materials.com/llms.txt): every page, with a one-line description of each. Use it to pick the page to open.
* [llms-full.txt](https://docs.2050-materials.com/llms-full.txt): every page in one Markdown file. It is about half a megabyte, too large for most agents and fetch tools to read in one go: use llms.txt to pick a page, then open that page as Markdown.
* Any page as Markdown: add `.md` to its URL, for example <https://docs.2050-materials.com/using-the-2050-materials-api/quick-reference-for-ai-agents.md>.
* MCP server: `https://docs.2050-materials.com/~gitbook/mcp`. Its `searchDocumentation` tool searches these docs and returns links to the pages.
* [Field Dictionary](https://docs.2050-materials.com/methodology-documentation/field-dictionary.md): every response field of `get_products`, `get_products_open_api` and `get_generic_materials`, with its full JSON path, type, unit, null rule and meaning, and sample responses. Generated from the OpenAPI spec. One page per endpoint, each small enough to read in one fetch: [get\_products](https://docs.2050-materials.com/methodology-documentation/field-dictionary/get-products.md), [get\_products\_open\_api](https://docs.2050-materials.com/methodology-documentation/field-dictionary/get-products-open-api.md), [get\_generic\_materials](https://docs.2050-materials.com/methodology-documentation/field-dictionary/get-generic-materials.md), [sample responses](https://docs.2050-materials.com/methodology-documentation/field-dictionary/sample-responses.md).
* [Version Log](https://docs.2050-materials.com/resources/version-log.md): what changed in each release, newest first. In newer entries, a change that can change what an integration receives starts with **Breaking**.
* Every heading has a fixed anchor, so you can link to a section. For example, the fields of a product's `material_facts` are at [Product Data (Full): Material Facts](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints/product-data-full.md#material-facts-simplified-epd-fields).

## Machine-readable specs <a href="#machine-readable-specs" id="machine-readable-specs"></a>

* OpenAPI 3.0 spec (JSON): <https://app.2050-materials.com/developer/schema.json>. The reference for every parameter: its accepted values, defaults and errors. **Agents and scripts: read this one.**
* OpenAPI / Swagger UI: <https://app.2050-materials.com/developer/documentation-ui/>. The same reference for people in a browser. It is a JavaScript page: a plain HTTP fetch returns no parameters.
* The docs pages repeat only the few values listed under [Values the docs repeat](#values-the-docs-repeat). For every other parameter, use `schema.json`.
* [Field Dictionary](https://docs.2050-materials.com/methodology-documentation/field-dictionary.md): every response field of `get_products`, `get_products_open_api` and `get_generic_materials`, with its type, unit and when it is present.
* SDK dashboard: <https://sdk.2050-materials.com>
* Python package `aecdata`: <https://pypi.org/project/aecdata/>
* Open-source SDKs on GitHub: <https://github.com/2050-Materials>

## Base URLs <a href="#base-urls" id="base-urls"></a>

* API base: `https://app.2050-materials.com/`
* Every endpoint, including `get_best_match`, is under the path prefix `/developer/api/`.
* There is no public sandbox or staging environment.

## Authentication <a href="#authentication" id="authentication"></a>

The API uses JWT Bearer tokens, obtained in two steps. See [Using the 2050 Materials APIs](https://docs.2050-materials.com/using-the-2050-materials-api.md) for the full guide.

1. Register and generate a **Developer Token** at <https://app.2050-materials.com/accounts/edit-account/>.
2. Exchange the Developer Token for an **API Token**:
   * `GET https://app.2050-materials.com/developer/api/token/getapitoken/`
   * Header: `Authorization: Bearer <DEVELOPER_TOKEN>`
   * Response: `{"api_token": "...", "refresh_token": "..."}`
3. Send the API Token on every other request: `Authorization: Bearer <API_TOKEN>`.
4. API Tokens expire after 24 hours. To renew one:
   * `POST https://app.2050-materials.com/developer/api/token/refresh/`
   * Header: `Authorization: Bearer <REFRESH_TOKEN>`
   * JSON body: `{"refresh": "<REFRESH_TOKEN>"}`, the same refresh token as in the header. A call without the body fails.
   * Response: `{"api_token": "..."}`, a new API Token only. The refresh token stays the same.
5. The refresh token expires 24 hours after `token/getapitoken/` issued it. After that, call `token/getapitoken/` again with your Developer Token.

## Endpoints <a href="#endpoints" id="endpoints"></a>

| Method | Path                                           | Purpose                                                     | Parameters                                                                                                                                                                                                      |
| ------ | ---------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GET    | `/developer/api/token/getapitoken/`            | Exchange a Developer Token for an API Token                 | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Authentication/token_getapitoken_list), [schema.json](https://app.2050-materials.com/developer/schema.json)                            |
| POST   | `/developer/api/token/refresh/`                | Renew an API Token                                          | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Authentication/token_refresh_create), [schema.json](https://app.2050-materials.com/developer/schema.json)                              |
| GET    | `/developer/api/get_products`                  | Product search and retrieval (full data, licensed)          | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Products/get_products_list), [schema.json](https://app.2050-materials.com/developer/schema.json)                                       |
| GET    | `/developer/api/get_products_open_api`         | Product search (open data, limited fields)                  | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Products/get_products_open_api_list), [schema.json](https://app.2050-materials.com/developer/schema.json)                              |
| GET    | `/developer/api/get_generic_materials`         | Generic material data                                       | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Materials/get_generic_materials_list), [schema.json](https://app.2050-materials.com/developer/schema.json)                             |
| GET    | `/developer/api/get_product_filters/`          | Valid filter values for products                            | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Products/get_product_filters_list), [schema.json](https://app.2050-materials.com/developer/schema.json)                                |
| GET    | `/developer/api/get_generic_material_filters/` | Valid filter values for generic materials                   | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Materials/get_generic_material_filters_list), [schema.json](https://app.2050-materials.com/developer/schema.json)                      |
| POST   | `/developer/api/get_best_match/`               | AI-powered mapping of bill-of-quantities items to materials | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Best%20Match/get_best_match_create), [schema.json](https://app.2050-materials.com/developer/schema.json)                               |
| GET    | `/developer/api/get_co2_warming_potential`     | Early-stage embodied carbon model                           | [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Early-stage%20carbon%20estimation/get_co2_warming_potential_list), [schema.json](https://app.2050-materials.com/developer/schema.json) |

Details for each endpoint: [Available Endpoints](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints.md).

## Querying patterns <a href="#querying-patterns" id="querying-patterns"></a>

Call `get_product_filters` or `get_generic_material_filters` first to get valid IDs for `product_type`, `material_type`, `building_applications` and other filters. These rules hold for `get_products`, `get_products_open_api`, `get_generic_materials` and the filters in `get_best_match`:

* **ID or name:** `product_type`, `product_types`, `product_type_family`, `material_type`, `material_types`, `material_type_family` and `building_applications`. For products also `building_types`, `company`, `certificate_type`, `certificate_type_family`, `manufacturing_country`, `continent` and `city`. For generic materials also `data_source`. When every value is made only of digits, the values match IDs. Otherwise each value matches names that contain it, ignoring case. Don't mix IDs and names in one filter: an ID is then read as name text. For several values, repeat the parameter (`product_type=5&product_type=7`): `product_type=5,7` is read as one name and matches nothing.
* **Code or name, exact (ignoring case):** `icms_classifications`, `nrm1_classifications` and `rics_wlca_classifications`.
* **ID or unit, exact (ignoring case):** `declared_unit` (and, for generic materials, the deprecated `functional_unit_unit`). A unit matches the whole unit text: `m` does not match `m2`, and `kWh` does not match `kWh (Net CV)`. IDs and units can be mixed in one filter.
* **The `id` or the `value` from the filter endpoint:** `norm_price` (for example `2` or `££`).
* **Text only:** `name`, `material_name` and `description` match text that contains the value, ignoring case. On `get_generic_materials`, `compliances`, `epd_operator`, `lca_database` and `verification_type` match the same way.
* **One option value, exact (ignoring case):** `epd_operator` and `compliances` on `get_products`, `get_products_open_api` and `product_filters` in `get_best_match`. Send a `value` from `get_product_filters`. `compliances` matches one stated standard, so `LEED` does not return products that state only `LEED v4`, and `EN 15804` does not return `EN 15804+A2`.

See [Product Data (Full)](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints/product-data-full.md#filtering-the-data) for every filter.

Common query parameters for `get_products` and `get_products_open_api`:

* `data=mini` returns only `name`, `company`, `product_url` and `product_api_url`. `get_products` only: `get_products_open_api` always returns its fixed set of fields.
* `group_by` groups results. Common values: `company_name`, `product_type`, `material`, `manufacturing_location`, `continent`, `price_range`, `building_applications`, `building_types`, `certification_types`. On `get_products_open_api` only `company_name`, `product_type`, `material`, `manufacturing_location` and `continent` work; the others put every result under `Undefined`.
* `sort_by` takes one of the field names the Swagger UI lists for the endpoint (for example `name`, `updated`, `density`, `u_value`; any other value returns 400), or `location` together with `sort_reference_location` or `sort_reference_latitude` and `sort_reference_longitude`.
* `exclude_nulls` drops products missing a given field, for example `exclude_nulls=manufacturing`.
* `name` matches a full or partial product name.
* `created_after`, `created_before`, `updated_after` and `updated_before` filter by date.
* URL-encode special characters in filter values (`+`, `&`, `=`).
* Legacy (superseded) items are excluded by default. Send `exclude_legacy=false` to include them on `get_products`, `get_products_open_api` and `get_generic_materials`. Archived items and other companies' unverified items are never returned. See [Product and Material Statuses](https://docs.2050-materials.com/data-documentation/product-and-material-statuses.md).

### Filters for get\_generic\_materials <a href="#filters-for-get_generic_materials" id="filters-for-get_generic_materials"></a>

`get_generic_materials` takes these filters. Different parameters combine with AND. Repeating a parameter matches any of its values (OR) only for the classification, classification-code, Uniclass, provenance-text, `geographical_scope`, `certificate_subtype` and `declared_unit` filters. Every other filter takes one value: send it once. Every parameter, with its accepted values, is in the [Swagger UI](https://app.2050-materials.com/developer/documentation-ui/#/Materials/get_generic_materials_list), and the matching rules are on [Generic Material Data](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints/generic-material-data.md#filter-options). Agents and scripts: read [schema.json](https://app.2050-materials.com/developer/schema.json).

* **Classification, ID or name:** `data_source`, `product_type` (also `product_types`), `product_type_family`, `material_type` (also `material_types`), `material_type_family` and `building_applications`.
* **Classification codes:** `icms_classifications`, `nrm1_classifications` and `rics_wlca_classifications` (code or name, exact, ignoring case). `uniclass_systems`, `uniclass_products` and `uniclass_materials` take a Uniclass code or name. `uniclass_systems` matches through the material's product types. `uniclass_products` matches through its product types together with its material type (product types only when it has no material type). `uniclass_materials` matches through its material type.
* **Provenance:** `geographical_scope` (an ISO 3166 code such as `DE`, a regional code such as `RER` or `GLO`, or a full country name such as `Germany`, which matches its code `DE`; exact, ignoring case. A region name such as `Europe` does not match `RER`. For several, repeat the parameter: `geographical_scope=DE,FR` matches nothing), `certificate_subtype` (`generic`, `average`, `representative`, `specific` or `template`; any other value returns 400), `compliances`, `epd_operator`, `lca_database` and `verification_type` (text). `data_year` and `valid_until_year` are ranges: `data_year__min=2020`, `valid_until_year__min=2028`. A material whose data source does not state a field is not returned by that field's filter.
* **Name and identifiers (text, one value):** `material_name`, `source_uuid` and `source_category`. `id` takes one generic material id.
* **Unit:** `declared_unit` (unit id or the whole unit text).
* **Values:** append `__min` or `__max` to a numeric field or an LCA breakdown field, for example `manufacturing__max=300`, `density__min=500` or `global_warming_potential_fossil__A1A2A3__max=10`. The `*_estimated` flags take `true` or `false`.
* **Dates and status:** `created_after`, `created_before`, `created_between`, `updated_after`, `updated_before`, `updated_between`, `exclude_legacy` and `is_private_material`.
* **Response:** `exclude_nulls`, `sort_by`, `sort_order`, `group_by` (`product_type` or `material_type`), `data` (`mini` or `full`), `page` and `page_size`. Trial accounts get HTTP 400 if they send `page_size`.

{% code title="get\_generic\_materials: EN 15804+A2 data for Germany, valid until 2028 or later" overflow="wrap" %}

```
GET https://app.2050-materials.com/developer/api/get_generic_materials?compliances=EN%2015804%2BA2&geographical_scope=Germany&valid_until_year__min=2028
```

{% endcode %}

### Values the docs repeat <a href="#values-the-docs-repeat" id="values-the-docs-repeat"></a>

The docs repeat these values because agents often need them. `schema.json` has them too, except where noted:

* **`functional_unit` on `get_products`:** one target unit, as unit text matched exactly, case included, or its numeric id. The primary units are `kg`, `m`, `m2`, `m3` and `piece`; other units in the same families work too. The list is not fixed: `get_product_filters?filters=functional_unit` returns the live list. A unit that does not exist returns 400. See [functional\_unit values](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints/product-data-full.md#functional_unit-values).
* **`filters` on `get_product_filters`:** the section names `product_type`, `product_type_family`, `material_type`, `material_type_family`, `building_applications`, `building_types`, `company`, `manufacturing_country`, `continent`, `city`, `certificate_type`, `certificate_type_family`, `source`, `epd_operator`, `compliances`, `lca_database`, `lca_tool`, `verification_type`, `work_section_caws`, `csi_masterformat`, `uniclass_systems`, `uniclass_products`, `uniclass_materials`, `icms_classifications`, `nrm1_classifications`, `rics_wlca_classifications`, `fire_performance`, `norm_price`, `collection` and `functional_unit`. These 30 names are the full list. The `filters` description in `schema.json` currently lists 27 of them: it leaves out `lca_database`, `lca_tool` and `verification_type`, which work. Each option has `value` and, except in `epd_operator`, `compliances`, `lca_database`, `lca_tool` and `verification_type`, `id`.
* **`geographical_scope` on `get_generic_materials`:** see [Filters for get\_generic\_materials](#filters-for-get_generic_materials).
* **`get_best_match` body defaults:** `input_items` is required. `include_product_data`, `include_material_data` and `split_components` default to `false`. `custom_keywords`, `product_filters` and `material_filters` default to `{}`. Legacy items are left out by default. `"exclude_legacy": "false"` in `product_filters` includes legacy products, and in `material_filters` legacy generic materials: each object controls its own items. See [Get Best Match: General Options](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints/automated-mapping-get-best-match.md#general-options).

## Response shape and pagination <a href="#response-shape-and-pagination" id="response-shape-and-pagination"></a>

`get_products`, `get_products_open_api` and `get_generic_materials` paginate by page number. Follow the `next` URL to get the next page. The count keys differ: product endpoints use `Products`, `get_generic_materials` uses `Materials`.

| Field (products)      | Field (generic materials) | Meaning                                               |
| --------------------- | ------------------------- | ----------------------------------------------------- |
| `results`             | `results`                 | Array of product or generic material objects          |
| `TotalProducts`       | `TotalMaterials`          | Total number of matches                               |
| `countProductsOnPage` | `countMaterialsOnPage`    | Number of results on this page                        |
| `current_page`        | `current_page`            | Current page number                                   |
| `product_range`       | `material_range`          | Range of results on this page, for example `[1, 200]` |
| `next`                | `next`                    | URL of the next page, or `null`                       |
| `previous`            | `previous`                | URL of the previous page, or `null`                   |

With `group_by`, results are nested under the group keys. `get_best_match` and `get_co2_warming_potential` return different shapes; see their pages under [Available Endpoints](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints.md).

### A1-A3 carbon <a href="#a1-a3-carbon" id="a1-a3-carbon"></a>

The A1-A3 (manufacturing) global warming potential is `manufacturing`, in kg CO2e per declared unit. On `get_products` and `get_products_open_api` it is `material_facts.manufacturing`. On `get_products_open_api` the value is a string. On `get_generic_materials` it is `manufacturing` at the top level of each material. It is fossil GWP, or total GWP when there is no fossil A1-A3 value. The same value by module is in a product's `material_facts` on `get_products`, or in a generic material's `lca_fields`: `global_warming_potential_fossil.A1A2A3` when it is fossil GWP, and `global_warming_potential_aggregate.A1A2A3` when it fell back to total GWP. See the [Field Dictionary](https://docs.2050-materials.com/methodology-documentation/field-dictionary.md) and [Fallback values](https://docs.2050-materials.com/methodology-documentation/fallback-values.md#gwp-stage-fields-fossil-or-total).

## Rate limits and errors <a href="#rate-limits-and-errors" id="rate-limits-and-errors"></a>

* All endpoints allow 10 requests per second per IP address, with bursts up to 50. Above that the API returns HTTP 429.
* Trial and free (open-data) accounts also have a limit of 100 calls per hour, which also returns HTTP 429. Licensed accounts have no hourly limit.
* A trial account gets at most 5 results from `get_products` and `get_generic_materials`, from page 1 only. Any `page` other than 1 returns 401. On `get_generic_materials`, sending `page_size` also returns 400.
* On HTTP 429, wait and retry. The response has no `Retry-After` header.
* `get_best_match` is not idempotent: each successful request counts its input items again in your usage, and can return different matches. Keep the response rather than sending the same request again. Send about 20 `input_items` per request; there is no hard maximum. See [Get Best Match](https://docs.2050-materials.com/using-the-2050-materials-api/available-endpoints/automated-mapping-get-best-match.md#access-and-limits).
* A 401 with `"code": "token_not_valid"` means the API token has expired or is not valid: refresh it, then retry. [Error responses](https://docs.2050-materials.com/using-the-2050-materials-api.md#error-responses) lists the error shapes. A 401 `Error Message` from `token/refresh/` means the refresh token has expired too: call `token/getapitoken/`. Branch on the status code and the body's key, not on the message text.
* For authentication failures, server errors or access questions, contact `api@2050-materials.com`.

## Licensing and responsible use <a href="#licensing-and-responsible-use" id="licensing-and-responsible-use"></a>

* The full endpoints need a license. Contact `api@2050-materials.com`.
* A free account calls `get_products_open_api` (GWP and A1-A3 data only), `get_product_filters`, `get_generic_material_filters` and the token endpoints. Every other endpoint needs its licence (Products, Generic Materials, Early Stage LCA model or Get Best Match) or a trial account, and returns 401 without one. The table is in [Access and limits by endpoint](https://docs.2050-materials.com/using-the-2050-materials-api.md#access-and-limits-by-endpoint).
* Uniclass fields are subject to the [NBS Uniclass](https://www.thenbs.com/uniclass) licensing terms.
* Caching and redistribution are not covered here. Treat redistribution as restricted unless your license agreement allows it, and contact `api@2050-materials.com` for guidance.
* Use the API instead of scraping app.2050-materials.com, and do not try to work around authentication or rate limits.
* Report security issues to `api@2050-materials.com`.

## Examples <a href="#examples" id="examples"></a>

More examples in JavaScript and Python: [Code Examples](https://docs.2050-materials.com/using-the-2050-materials-api/sdks/code-examples.md).

### Get an API Token <a href="#get-an-api-token" id="get-an-api-token"></a>

{% code title="Get an API token (curl)" overflow="wrap" %}

```sh
curl -sS "https://app.2050-materials.com/developer/api/token/getapitoken/" \
  -H "Authorization: Bearer <DEVELOPER_TOKEN>" \
  -H "Accept: application/json"
```

{% endcode %}

### Search products by product type <a href="#search-products-by-product-type" id="search-products-by-product-type"></a>

{% code title="get\_products: building boards (curl)" overflow="wrap" %}

```sh
curl -sS "https://app.2050-materials.com/developer/api/get_products?product_type=5" \
  -H "Authorization: Bearer <API_TOKEN>" \
  -H "Accept: application/json"
```

{% endcode %}

### Python <a href="#python" id="python"></a>

{% code title="get\_products: building boards (Python)" overflow="wrap" %}

```python
import requests

url = "https://app.2050-materials.com/developer/api/get_products"
headers = {"Authorization": "Bearer <API_TOKEN>", "Accept": "application/json"}
params = {"product_type": "5"}  # use IDs from get_product_filters
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data["TotalProducts"], "products found")
for product in data["results"][:3]:
    print(product["name"], "-", product["company"])
```

{% endcode %}
