# Factor

{% hint style="info" %} <mark style="color:blue;">**\[Public]**</mark> - API Key is not required to call **Factor** endpoints.
{% endhint %}

## Search for a set of emission factors

<mark style="color:blue;">`GET`</mark> `https://api.carbonlink.io/v1/factors`

#### Query Parameters

| Name           | Type   | Description                                                                                                         |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| criteria       | string | Set of fields and operations to parse into **Search Query Language** for filtering the **Emission Factor Database** |
| fullTextSearch | string | Raw set of words or phrases to search for in the **Emission Factor Database**.                                      |

{% tabs %}
{% tab title="200: OK Returns an array of Factor objects" %}

```json
[
    {
      id: "fct_12345678",
      rate: 12,
      unit: "usd",
      basis: "SPEND",
      name: "Mid-sized Freight Ship",
      code: "MID_FREIGHT",
      sector: "transport",
      category: "transport freight by ship",
      releaseYear: 2023,
      version: 0,
      source: 'EXIOBASE',
    },
    ...
]
```

{% endtab %}
{% endtabs %}

## Search for potential emission factors related to a Product

<mark style="color:blue;">`GET`</mark> `https://api.carbonlink.io/v1/factors/searchByProduct`

#### Query Parameters

| Name                                          | Type   | Description                                            |
| --------------------------------------------- | ------ | ------------------------------------------------------ |
| name<mark style="color:red;">\*</mark>        | string | Name of **Product** to find related factors for        |
| description<mark style="color:red;">\*</mark> | string | Description of **Product** to find related factors for |

{% tabs %}
{% tab title="200: OK Returns an array of Factor objects ranked by relation to the Product details provided" %}

```json
[
    {
      id: "fct_12345678",
      rate: 12,
      unit: "usd",
      basis: "SPEND",
      name: "Mid-sized Freight Ship",
      code: "MID_FREIGHT",
      sector: "transport",
      category: "transport freight by ship",
      releaseYear: 2023,
      version: 0,
      source: 'EXIOBASE',
    },
    ...
]
```

{% endtab %}
{% endtabs %}
