﻿---
title: API Reference
description: The API reference documentation is divided into three parts: The Agent API - All functions and properties on the Agent object. An instance of the Agent...
url: https://www.elastic.co/elastic/docs-builder/docs/3016/reference/apm/agents/nodejs/api
products:
  - APM Agent
  - APM Node.js Agent
applies_to:
  - Serverless Observability projects: Generally available
  - Elastic Stack: Generally available
  - Application Performance Monitoring Agent for Node.js: Generally available
---

# API Reference
The API reference documentation is divided into three parts:
- [The `Agent` API](https://www.elastic.co/elastic/docs-builder/docs/3016/reference/apm/agents/nodejs/agent-api) - All functions and properties on the `Agent` object. An instance of the `Agent` object is acquired by requiring/importing the Node.js APM Agent module. The `Agent` is a singleton and the instance is usually referred to by the variable `apm` in this documentation
- [The `Transaction` API](https://www.elastic.co/elastic/docs-builder/docs/3016/reference/apm/agents/nodejs/transaction-api) - All functions and properties on the `Transaction` object. An instance of the `Transaction` object is acquired by calling `apm.startTransaction()`
- [The `Span` API](https://www.elastic.co/elastic/docs-builder/docs/3016/reference/apm/agents/nodejs/span-api) - All functions and properties on the `Span` object. An instance of the `Span` object is acquired by calling `apm.startSpan()`