Skip to content

Getting Started

Terminal window
npm install crowdstrike-falcon

FalconJS handles OAuth2 automatically through middleware. Provide your credentials and cloud region when constructing the client.

import FalconClient from "crowdstrike-falcon";
const client = new FalconClient({
cloud: process.env.FALCON_CLOUD!,
clientId: process.env.FALCON_CLIENT_ID!,
clientSecret: process.env.FALCON_CLIENT_SECRET!,
});
CloudValue
US-1us-1
US-2us-2
EU-1eu-1
US-GOV-1us-gov-1
import FalconClient from "crowdstrike-falcon";
const client = new FalconClient({
cloud: process.env.FALCON_CLOUD!,
clientId: process.env.FALCON_CLIENT_ID!,
clientSecret: process.env.FALCON_CLIENT_SECRET!,
});
const hosts = await client.hosts.queryDevicesByFilter({
filter: "hostname:*'search-term'*",
limit: 10,
});
console.log(hosts);
  • TypeScript-first — All request and response models include complete type definitions
  • 120+ API services — Covers detections, hosts, intelligence, spotlight, real-time response, and more
  • Built-in OAuth2 — Automatic token management through middleware
import { FalconErrorExplain } from "crowdstrike-falcon";
await client.sensorDownload
.getSensorInstallersCCIDByQuery()
.catch(async (err) => {
console.error("Error: " + (await FalconErrorExplain(err)));
})
.then((value) => console.log("CCID:", value));

Page Updated: v0.6.0