@factset/sdk-factsetesg
v4.0.1
Published
FactSet ESG client library for JavaScript
Readme
FactSet ESG client library for JavaScript
FactSet ESG (powered by FactSet Truvalue) applies Natural Language Processing and Machine Learning to uncover risks and opportunities from companies' Environmental, Social and Governance (ESG) behavior, which are aggregated and categorized into continuously updated, material ESG scores. The service focuses on company ESG behavior from external sources and includes both positive and negative events that go beyond traditional sources of ESG risk data. FactSet ESG extracts, analyzes, and generates scores from millions of documents each month collected from more than 240,000 data sources in over 37 languages. Sources include news, trade journals, NGOs, watchdog groups, trade blogs and industry reports. Products deliver investable insights by revealing value and risk factors from unstructured data at the speed of current events.
This TypeScript/JavaScript package is automatically generated by the OpenAPI Generator project:
- API version: 3.0.0
- SDK version: 4.0.1
- Build package: com.factset.sdk.codegen.FactSetJavascriptClientCodegen
For more information, please visit https://developer.factset.com/contact
Requirements
- Node.js >= 18
Installation
npm
npm install @factset/sdk-utils @factset/[email protected]yarn
yarn add @factset/sdk-utils @factset/[email protected]Usage
- Generate authentication credentials.
- Setup Node.js environment
Install and activate Node.js >=18. If you're using nvm:
nvm install 18 nvm use 18(optional) Install yarn.
- Install dependencies.
- Run the following:
[!IMPORTANT] The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.
Example Code
const { ApiClient, SFDRApi } = require('@factset/sdk-factsetesg');
const { ConfidentialClient } = require('@factset/sdk-utils');
const apiClient = ApiClient.instance;
// Examples for each supported authentication method are below,
// choose one that satisfies your use case.
// (Preferred) OAuth 2.0: FactSetOAuth2
// See https://github.com/FactSet/enterprise-sdk#oauth-20
// for information on how to create the app-config.json file
//
// The confidential client instance should be reused in production environments.
// See https://github.com/FactSet/enterprise-sdk-utils-typescript#authentication
// for more information on using the ConfidentialClient class
apiClient.factsetOauth2Client = new ConfidentialClient('/path/to/app-config.json');
// Basic authentication: FactSetApiKey
// See https://github.com/FactSet/enterprise-sdk#api-key
// for information how to create an API key
// const FactSetApiKey = apiClient.authentications['FactSetApiKey'];
// FactSetApiKey.username = 'USERNAME-SERIAL';
// FactSetApiKey.password = 'API-KEY';
const apiInstance = new SFDRApi();
const ids = ["AAPL-USA"]; // [String] | Security or Entity identifiers. FactSet Identifiers, tickers, CUSIP and SEDOL are accepted input. <p>***ids limit** = 1500 per request*</p> *<p>Make note, GET Method URL request lines are also limited to a total length of 8192 bytes (8KB). In cases where the service allows for thousands of ids, which may lead to exceeding this request line limit of 8KB, its advised for any requests with large request lines to be requested through the respective \"POST\" method.</p>*
const fiscalPeriodStart = 2020-01-01; // Date | Fiscal period start is expressed in YYYY-MM-DD formats. The input start date must be before the input end date. Future dates (T+1) are not accepted in this endpoint.
const fiscalPeriodEnd = 2022-02-20; // Date | Fiscal period end is expressed in YYYY-MM-DD formats. The input start date must be before the input end date. Future dates (T+1) are not accepted in this endpoint.
const opts = {
'feelback': false, // Boolean | This parameter would return the latest PAI data/s based on the indicators, date range and/or subtopics requested.
'currency': USD, // String | Currency code for currency values. For a list of currency ISO codes, visit Online Assistant Page [OA1470](https://my.apps.factset.com/oa/pages/1470).
'indicators': ["Water","HumanRights"], // [String] | The indicators are the Principal Adverse Impact (PAI) metrics which consists of General, Mandatory and Additional indicators which supports the SFDR reporting. The General indicators data can retrieved by providing the `GL001` and `GL002` subTopic codes as input. Please refer to the attached documentation for the full list of subtopics codes and their mapping with the indicators. The data can also be requested for individual sub topic codes in addition to the indicators mentioned below - |**SFDR PAI Indicators**|**Description**| |---|---| |**MandatoryIndicators**| Mandatory indicators are the indicators which must be reported under the EU Sustainable Finance Disclosure Regulation (SFDR).| |**AdditionalIndicators**| These are additional environmental and social indicators as mentioned in additional tables as provided in the Annex 1 table in the SFDR RTS report.| |**GHGEmissions**| This mandatory indicator includes metrics related to greenhouse emissions such as - Scope 1, 2, and 3 emissions, footprint and intensity and energy consumption from non-renewable and high climate sectors.| |**Biodiversity**| This mandatory indicator includes metrics pertaining to biodiversity and a company's impacts on biodiversity-sensitive areas.| |**Water**| This mandatory indicator includes data relating to emissions to water as made by the companies.| |**Waste**| This mandatory indicator includes data relating to hazardous waste as generated by the companies.| |**SocialEmployeeMatters**| This mandatory indicator includes employee-related metrics like gender diversity, pay gap and social-related metrics like violation of UNGC/OECD principles and exposure to controversial weapons.| |**Emissions**| This additional indicator includes metrics related to air pollutants, inorganic pollutants and ozone depleting substance. | |**EnergyPerformance**| This additional indicator includes metrics related to various sources of non-renewable energy as used by the companies. | |**WaterWasteMaterialEmissions**| This mandatory indicator includes employee-related metrics like gender diversity, pay gap and social-related metrics like violation of UNGC/OECD principles and exposure to controversial weapons.| |**AdditionalEmployeeMatters**| This additional indicator includes metrics related to workplace discrimination and safety, whistleblower mechanism and supplier code of conduct.| |**HumanRights**| This additional indicator includes metrics related to both policies and performance of a company in the areas of human rights, forced labor and human trafficking.| |**AntiCorruptionAntiBribery**| This additional indicator includes data related to company violations of anti-corruption and anti-bribery laws, and resulting fines.|
'calculation': true // Boolean | This parameter would return the PAI data based on the input provided. All the data for indicators or subtopics requested are returned when the input is `true` and the SFDR required metrics are only returned when the input is`false`
};
// Call api endpoint
apiInstance.getSfdrPai(ids, fiscalPeriodStart, fiscalPeriodEnd, opts).then(
data => {
console.log('API called successfully. Returned data:');
console.log(data);
},
error => {
console.error(error);
},
);
Using a Proxy
To add a HTTP proxy for the API client, you can set the proxyUrl for the ApiClient instance:
const { ApiClient } = require('@factset/sdk-factsetesg');
const apiClient = ApiClient.instance;
apiClient.setProxyUrl('http://username:[email protected]:8080');Documentation for API Endpoints
All URIs are relative to https://api.factset.com/content/factset-esg/v3
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- factsetesg.SFDRApi | getSfdrPai | GET /sfdr/pai | Requests Principle Adverse Impact (PAI) data to support compliant SFDR Sustainable Finance Disclosure Regulation (SFDR) reporting factsetesg.SFDRApi | getSfdrPaiForList | POST /sfdr/pai | Requests Principle Adverse Impact (PAI) data to support compliant SFDR Sustainable Finance Disclosure Regulation (SFDR) reporting factsetesg.TruvalueApi | getSasbArticles | GET /truvalue/articles | Requests articles tagged with 26 SASB categories from 2016-01-01 to previous day. factsetesg.TruvalueApi | getSasbArticlesForList | POST /truvalue/articles | Requests articles tagged with 26 SASB categories from 2016-01-01 to previous day factsetesg.TruvalueApi | getSasbScoresPost | POST /truvalue/scores | Requests a large list of ids, gets short-term, long-term, and momentum scores based on the 26 SASB categories, Pillars, Dimensions. factsetesg.TruvalueApi | getSasbSpotlightsForList | POST /truvalue/spotlights | Requests Spotlight data for the most important positive and negative events to enable timely and systematic trading strategies and portfolio management factsetesg.TruvalueApi | getTVLScores | GET /truvalue/scores | Requests short-term, long-term, and momentum scores based on the 26 SASB categories, Pillars, Dimensions. factsetesg.TruvalueApi | getTvlSpotlights | GET /truvalue/spotlights | Requests spotlights tagged with 26 SASB categories, Pillars, Dimensions from 2016-01-01 to previous day
Documentation for Models
- factsetesg.Calendar
- factsetesg.DateOf
- factsetesg.ErrorObject
- factsetesg.ErrorObjectLinks
- factsetesg.ErrorResponse
- factsetesg.Frequency
- factsetesg.InvalidIdErrorObject
- factsetesg.SfdrPai
- factsetesg.SfdrPaiRequest
- factsetesg.SfdrPaiRequestBody
- factsetesg.SfdrPaiResponse
- factsetesg.Spotlights
- factsetesg.SpotlightsResponse
- factsetesg.TvlArticle
- factsetesg.TvlArticlesRequest
- factsetesg.TvlArticlesRequestBody
- factsetesg.TvlArticlesResponse
- factsetesg.TvlScores
- factsetesg.TvlScoresRequest
- factsetesg.TvlScoresRequestBody
- factsetesg.TvlScoresResponse
- factsetesg.TvlSpotlightsRequest
- factsetesg.TvlSpotlightsRequestBody
Documentation for Authorization
FactSetApiKey
- Type: HTTP basic authentication
FactSetOAuth2
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes: N/A
Contributing
Please refer to the contributing guide.
Copyright
Copyright 2026 FactSet Research Systems Inc
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
