# puppeteer-instagram

> Instagram automation driven by headless chrome.

Latest version **0.0.1** (published 2018-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install puppeteer-instagram
pnpm add puppeteer-instagram
yarn add puppeteer-instagram
bun add puppeteer-instagram
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-07-18 |
| First published | 2018-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 10 |
| Unpacked size | 44.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 118 |
| Author | Travis Fischer |
| Maintainers | fisch0920 |
| Keywords | puppeteer, instagram |

## Links

- npm: https://www.npmjs.com/package/puppeteer-instagram
- Repository: https://github.com/transitive-bullshit/puppeteer-instagram
- npm.io page: https://npm.io/package/puppeteer-instagram

## Dependencies (10)

- [ow](https://npm.io/package/ow.md) ^0.6.0
- [delay](https://npm.io/package/delay.md) ^3.0.0
- [faker](https://npm.io/package/faker.md) ^4.1.0
- [random](https://npm.io/package/random.md) ^2.0.12
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2
- [p-retry](https://npm.io/package/p-retry.md) ^2.0.0
- [puppeteer](https://npm.io/package/puppeteer.md) ^1.6.0
- [puppeteer-email](https://npm.io/package/puppeteer-email.md) ^0.1.0
- [puppeteer-extra](https://npm.io/package/puppeteer-extra.md) ^2.0.7
- [puppeteer-extra-plugin-stealth](https://npm.io/package/puppeteer-extra-plugin-stealth.md) ^2.0.7

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-07-18

## README

# puppeteer-instagram

> [Instagram](https://instagram.com) automation driven by headless chrome.

[![NPM](https://img.shields.io/npm/v/puppeteer-instagram.svg)](https://www.npmjs.com/package/puppeteer-instagram) [![Build Status](https://travis-ci.com/transitive-bullshit/puppeteer-instagram.svg?branch=master)](https://travis-ci.com/transitive-bullshit/puppeteer-instagram) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

This module also has a [CLI](https://github.com/transitive-bullshit/puppeteer-instagram-cli).

## Install

```bash
npm install --save puppeteer-instagram
```

## Usage

This example signs into an [Instagram](https://instagram.com) account.

```js
const PuppeteerInstagram = require('puppeteer-instagram')

const instagram = new PuppeteerInstagram()

await instagram.signin({ username: 'xxx', password: 'xxx' })
await instagram.close()
```

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents

-   [PuppeteerInstagram](#puppeteerinstagram)
    -   [isAuthenticated](#isauthenticated)
    -   [user](#user)
    -   [browser](#browser)
    -   [signup](#signup)
    -   [signin](#signin)
    -   [signout](#signout)
    -   [verifyEmail](#verifyemail)
    -   [close](#close)

### [PuppeteerInstagram](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L21-L175)

[Instagram](https://instagram.com) automation driven by headless chrome.

Type: `function (opts)`

-   `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options (optional, default `{}`)
    -   `opts.browser` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Puppeteer browser instance to use
    -   `opts.puppeteer` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Puppeteer [launch options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions)

* * *

#### [isAuthenticated](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L32-L32)

Whether or not this instance is authenticated with Instagram.

Type: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)

* * *

#### [user](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L39-L39)

Authenticated user if authenticated with Instagram.

Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)

* * *

#### [browser](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L46-L52)

Puppeteer Browser instance to use.

Type: `function ()`

* * *

#### [signup](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L68-L100)

Automates the creation of a new Instagram account.

Type: `function (user, opts): Promise`

-   `user` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** User details for new account
    -   `user.email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Email
    -   `user.username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Username
    -   `user.firstName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** First name
    -   `user.lastName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Last name
    -   `user.password` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Password
-   `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options (optional, default `{}`)
    -   `opts.verify` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Whether or not to verify email
    -   `opts.emailPassword` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Email password for verification

* * *

#### [signin](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L114-L130)

Signs into an existing Instagram account.

Note: either username or email is required.

Type: `function (user, opts): Promise`

-   `user` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** User details for new account
    -   `user.username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Username
    -   `user.email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Email
    -   `user.password` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Password
-   `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options (optional, default `{}`)

* * *

#### [signout](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L136-L142)

Signs out of the currently authenticated Instagram account.

Type: `function (): Promise`

* * *

#### [verifyEmail](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L152-L161)

Verifies the authenticated Instagram account's email via `puppeteer-email`.

Type: `function (opts): Promise`

-   `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options
    -   `opts.emailPassword` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Email password for verification
    -   `opts.email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Email verification (defaults to user's GitHub email)

* * *

#### [close](https://github.com/transitive-bullshit/puppeteer-instagram/blob/3241815ee3d5ae673c485c829d04fba4f349ac12/index.js#L168-L174)

Closes the underlying browser instance, effectively ending this session.

Type: `function (): Promise`

* * *

## Related

-   [puppeteer-instagram-cli](https://github.com/transitive-bullshit/puppeteer-instagram-cli) - CLI for this module.
-   [puppeteer-email](https://github.com/transitive-bullshit/puppeteer-email) - Email automation driven by headless chrome.
-   [puppeteer](https://github.com/GoogleChrome/puppeteer) - Headless Chrome Node API.
-   [awesome-puppeteer](https://github.com/transitive-bullshit/awesome-puppeteer) - Curated list of awesome puppeteer resources.

## License

MIT © [Travis Fischer](https://github.com/transitive-bullshit)

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