Skip to content

get_lci_results

Extract the full Life Cycle Inventory (LCI) for a completed LCA calculation as a downloadable CSV.

Purpose

Retrieves the elementary flow inventory — all emissions and resource extractions — for a completed calculate_standard or calculate_custom calculation. The inventory is delivered as a time-limited download link to a CSV file. Use this when you need the raw flow data for reporting, further analysis, or import into other LCA tools.

Parameters

Parameter Type Required Description
source_task_id string Yes task_id from a completed calculate_standard or calculate_custom call

Returns

{
  "download_url": "https://...",
  "filename": "lci_<activity_code>_standard.csv",
  "expires_at": "2026-04-04T12:00:00Z",
  "file_size_bytes": 48320,
  "flow_count": 412,
  "method_unit": "kg CO2-eq",
  "calculation_type": "standard",
  "source_task_id": "task_abc123"
}

The download_url is publicly accessible (no auth required) and valid for 7 days.

CSV Structure

Each row is one elementary flow. Columns:

Column Description
flow_name Elementary flow name (e.g., Carbon dioxide, fossil)
compartment Environmental compartment (e.g., air)
sub_compartment Sub-compartment (e.g., lower stratosphere + upper troposphere)
amount Flow amount in the flow's native unit
unit Flow unit (e.g., kg)
activity_code Source foreground activity (custom only)
activity_name Source foreground activity name (custom only)
life_cycle_stage Lifecycle stage from foreground metadata (custom only)
hierarchy_level Hierarchy level from foreground metadata (custom only)

The last four columns are populated only for calculate_custom results, where each flow is attributed to its dominant foreground activity.

Example Usage

Prompt: Get the full inventory for my last calculation

Workflow:

1. calculate_standard(activity_code, method_specification, database) → task_id
2. get_task_status(task_id) → poll until SUCCESS
3. get_lci_results(source_task_id=task_id) → download_url
4. Download CSV from download_url

Notes

  • The source task must have status SUCCESS — call get_task_status first if unsure
  • Download links expire after 7 days; call get_lci_results again to generate a fresh link
  • For custom projects, the CSV provides full foreground attribution making it suitable for EPD reporting and Scope 3 disclosure