# Using API

An overview of ActiveReportsJS API functionality

## Content

### Introduction

The `ActiveReportsJS API` is a powerful tool for developers to access the functionality of the product in their code. With this programmatic interface, you can perform a wide range of tasks, such as:

* Loading report templates from various sources, including `JSON files` and `JSON objects`.
* Modifying existing or creating new `report templates`, giving you full control over the design and layout of your reports.
* Running reports and supplying `parameter values`, allowing you to generate dynamic reports with real-time data.
* Exporting reports to popular formats such as `PDF`, `HTML`, or `CSV`, making it easy to share and distribute your reports.

To make it easier for you to use the ActiveReportsJS API, the distribution includes the [Core library](https://developer.mescius.com/activereportsjs/api//modules/Core) supplied with TypeScript declarations that ensure code autocomplete and type checks in your favorite IDE, such as `Visual Studio Code`, which greatly help to reduce the number of mistakes and save you time. While the `Core Library` can be used in `JavaScript` code as well, we recommend using `TypeScript` for a better development experience.
For more information on how to add the `Core library` to your application, please refer to the [Installation page](/activereportsjs/docs/v6.1/GettingStarted/Installation#core-library).

### Main types

The `Core Library` in `ActiveReportsJS API` contains a variety of types, but there are a few key types that are essential to understand when working with the API. These main types provide the foundation for interacting with the API, and are crucial for performing common tasks such as loading and modifying report templates, running reports, and exporting to various formats.

* The [Report type](https://developer.mescius.com/activereportsjs/api/modules/Core.Rdl#report) represents a `report template`. It is a blueprint of the report and contains the definitions of report items and data bindings that define the layout and structure of the report. The report items include the elements such as [tables](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Data-Regions/Table), [charts](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Data-Regions/Chart), and [text boxes](/activereportsjs/docs/v6.1/ReportAuthorGuide/Report-Items/Data-Visualizers/TextBox) that make up the report, and the data bindings link the report to a data source, allowing the report to display dynamic data.
    You can use the `Report type` to annotate variables, function parameters, and return types to provide type information and enable type checking in your TypeScript code that creates new and modifies existing `report templates`. It is important to note that TypeScript types, such as `Report` are used for *type checking and type hinting only*, and are not enforced at runtime.
* The [PageReport class](https://developer.mescius.com/activereportsjs/api/classes/Core.PageReport) represents a report and provides the methods and properties necessary to interact with it. This class allows you to load a report template from a file or a `Report` object and to run a report with specified options, such as parameter values.
* The [PageDocument class](https://developer.mescius.com/activereportsjs/api/classes/Core.PageDocument) represents the outcome of a report being rendered. It allows you to print the report pages or export them into various file formats such as PDF, HTML, and CSV.
* The [PdfExport](https://developer.mescius.com/activereportsjs/api/modules/PdfExport), [HtmlExport](https://developer.mescius.com/activereportsjs/api/modules/HtmlExport), and [TabularDataExport](https://developer.mescius.com/activereportsjs/api/modules/TabularDataExport) classes are responsible for exporting a report to `PDF`, `HTML`, and `CSV` formats, respectively.