# iab-native

> TypeScript definitions for IAB Tech Lab's Native Ad

Latest version **1.0.1** (published 2026-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install iab-native
pnpm add iab-native
yarn add iab-native
bun add iab-native
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2026-03-15 |
| First published | 2025-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14.0.0 |
| Dependencies | 0 |
| Unpacked size | 39.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Kai Miyamoto |
| Maintainers | kaihogehoge |
| Keywords | Native, IAB Tech Lab, typescript, types, definitions, advertising, programmatic |

## Links

- npm: https://www.npmjs.com/package/iab-native
- Repository: https://github.com/hogekai/iab-types
- Homepage: https://github.com/hogekai/iab-types.git
- Issues: https://github.com/hogekai/iab-types.git
- npm.io page: https://npm.io/package/iab-native

## 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

- 1.0.1 (latest) — 2026-03-15
- 1.0.0 — 2025-02-03
- 0.5.3 — 2025-01-16
- 0.5.2 — 2025-01-14
- 0.5.0 — 2025-01-12
- 0.4.0 — 2025-01-12
- 0.3.0 — 2025-01-09
- 0.2.0 — 2025-01-09
- 0.1.0 — 2025-01-09

## README

# iab-native

TypeScript type definitions for IAB Tech Lab's Native Ad

## Overview

This package provides TypeScript type definitions based on the [Native v1.2](https://www.iab.com/wp-content/uploads/2018/03/OpenRTB-Native-Ads-Specification-Final-1.2.pdf) specification.

## Installation

You can install the library using npm:

```bash
npm install iab-native
```

Or using pnpm:

```bash
pnpm add iab-native
```

## Usage

To use the type definitions in your TypeScript project, import them as follows:

```typescript
import {
  ContextSubType,
  ContextType,
  NativeRequest,
  NativeResponse,
  PlacementType,
} from "iab-native";

const nativeRequest: NativeRequest = {
  ver: "1.2",
  context: ContextType.Content,
  contextsubtype: ContextSubType.Article,
  plcmttype: PlacementType.FeedContent,
  plcmtcnt: 1,
  seq: 0,
  assets: [
    {
      id: 1,
      required: 1,
      title: {
        len: 90,
      },
    },
  ],
};

const nativeResponse: NativeResponse = {
  link: {
    url: "https://www.example.com",
  },
  assets: [
    {
      id: 1,
      required: 1,
      title: {
        text: "Sample Title",
      },
    },
  ],
};
```

It is also possible to explicitly specify a native version.

```typescript
import { NativeRequest, NativeResponse } from "iab-native/v12";
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request with your changes. Make sure to follow the code style and include tests for any new features or bug fixes.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

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