Skip to main content
JSForce Logo

Welcome to JSForce

JSForce is an isomorphic JavaScript library that provides a comprehensive interface to Salesforce APIs. It works seamlessly in both Node.js environments and web browsers, enabling developers to build powerful Salesforce integrations with JavaScript.

Why JSForce?

Universal JavaScript

Write once, run anywhere. JSForce works in Node.js and browsers with the same API.

Complete API Coverage

Access REST, SOAP, Bulk, Metadata, Streaming, Tooling, and more through a unified interface.

TypeScript Ready

Full TypeScript support with comprehensive type definitions for type-safe development.

Developer Friendly

Intuitive API design with promises, async/await, and an interactive CLI/REPL for exploration.

Supported Salesforce APIs

JSForce provides access to all major Salesforce APIs:
  • REST API - CRUD operations, SOQL queries, SOSL searches, and metadata
  • Bulk API (v1 & v2) - Large-scale data operations with millions of records
  • Streaming API - Real-time event notifications using Bayeux/CometD
  • Metadata API - Deploy and retrieve metadata components
  • Tooling API - Developer tools and IDE integration
  • Apex REST - Custom Apex REST endpoints
  • Analytics API - Salesforce Reports and Dashboards
  • Chatter API - Social collaboration features
  • SOAP API - Enterprise and Partner WSDL support

Quick Example

Here’s how simple it is to connect to Salesforce and query data:
import jsforce from 'jsforce';

const conn = new jsforce.Connection({
  loginUrl: 'https://login.salesforce.com'
});

await conn.login('[email protected]', 'password');

const accounts = await conn.query('SELECT Id, Name FROM Account LIMIT 10');
console.log(`Found ${accounts.totalSize} accounts`);

Get Started

Installation

Install JSForce in your Node.js or browser project

Quickstart

Get up and running in 5 minutes with a complete example

Authentication

Learn about OAuth2 and other authentication methods

API Reference

Explore the complete API documentation

Community & Support

GitHub

View source code and contribute

Issues

Report bugs and request features

NPM

View package on npm

Current Version

JSForce v3.x is the latest major version with:
  • Full TypeScript rewrite with comprehensive type definitions
  • Node.js 18+ and modern browser support
  • Improved error handling with detailed error messages
  • Automatic retry on network errors
  • Breaking changes from v1/v2 - see migration guides
The SOAP login() API will be retired in Summer ‘27 (API version 65.0). If you are using the loginBySoap method, please migrate to OAuth 2.0 Username-Password Flow instead.

Build docs developers (and LLMs) love