# bungie-net-core

> An easy way to interact with the Bungie.net API

Latest version **3.0.3** (published 2025-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install bungie-net-core
pnpm add bungie-net-core
yarn add bungie-net-core
bun add bungie-net-core
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.3 |
| Published | 2025-07-16 |
| First published | 2023-04-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | owensimpson |
| Keywords | Destiny 2, Bungie, TypeScript, REST API |

## Links

- npm: https://www.npmjs.com/package/bungie-net-core
- Repository: https://github.com/owens1127/bungie-net-core
- Issues: https://github.com/owens1127/bungie-net-core/issues
- npm.io page: https://npm.io/package/bungie-net-core

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.0.3 (latest) — 2025-07-16
- 3.0.2 — 2025-07-16
- 3.0.1 — 2024-12-11
- 2.1.4 — 2024-12-11
- 2.1.3 — 2024-08-15
- 1.1.7 — 2023-07-22
- 1.1.6 — 2023-07-16
- 1.1.5 — 2023-07-03
- 1.1.4 — 2023-07-03
- 1.1.3 — 2023-07-03
- 1.1.1 — 2023-06-30
- 1.1.0 — 2023-06-30
- 1.0.6 — 2023-06-29
- 1.0.5 — 2023-06-29
- 1.0.4 — 2023-06-27
- … 4 more at https://npm.io/package/bungie-net-core/versions

## README

# bungie-net-core

This is a Typescript wrapper for the Bungie API. It is mostly for personal use, but if you find any bugs please report them.

## Installation

```shell
npm i bungie-net-core
```

## Example Usage

This http method is used for makingrequests to the Bungie Platform API

```typescript
import { BungieHttpProtocol } from 'bungie-net-core';
import { getProfile } from 'bungie-net-core/services/Destiny2';

const bungiePlatformHttp: BungieHttpProtocol = async config => {
  const headers = new Headers({
    'X-API-KEY': process.env.BUNGIE_API_KEY!
  });

  let body;
  if (config.contentType === 'application/json') {
    headers.set('Content-Type', config.contentType);
    body = JSON.stringify(config.body);
  }

  // implement how you like
  // headers.set('Authorization', `Bearer ${access_token}`);

  const url = config.baseUrl + (config.searchParams ? '?' + config.searchParams.toString() : '');

  const payload = {
    method: config.method,
    body,
    headers
  };

  const res = await fetch(url, payload);
  if (!res.ok) {
    // Your choice here
    throw new Error(res.statusText);
  }

  if (res.headers.get('Content-Type')?.includes('application/json')) {
    return await res.json();
  } else {
    // Your choice here
    throw new Error('Response was not JSON');
  }
};

getProfile(bungiePlatformHttp, {
  components: ['CharacterInventories'],
  destinyMembershipId: '4611741274194011',
  membershipType: 3
});
```

---
_Source: https://npm.io/package/bungie-net-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
