# candymachinescraper

> Get CandyMachineID from an v1 or v2 site, in a couple of seconds.

Latest version **1.1.12** (published 2022-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install candymachinescraper
pnpm add candymachinescraper
yarn add candymachinescraper
bun add candymachinescraper
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.12 |
| Published | 2022-02-10 |
| First published | 2022-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | RaxoCoding |
| Maintainers | raxocoding |
| Keywords | candymachine, nft, scraper, raxocoding |

## Links

- npm: https://www.npmjs.com/package/candymachinescraper
- Repository: https://github.com/Gomez0015/CandyMachineScraper
- Homepage: https://github.com/Gomez0015/CandyMachineScraper#readme
- Issues: https://github.com/Gomez0015/CandyMachineScraper/issues
- npm.io page: https://npm.io/package/candymachinescraper

## Dependencies (5)

- [axios](https://npm.io/package/axios.md) ^0.25.0
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.10
- [request](https://npm.io/package/request.md) ^2.88.2
- [node-wget](https://npm.io/package/node-wget.md) ^0.4.3
- [candymachinescraper](https://npm.io/package/candymachinescraper.md) ^1.1.10

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.1.12 (latest) — 2022-02-10
- 1.1.11 — 2022-02-10
- 1.1.10 — 2022-02-10
- 1.1.9 — 2022-02-10
- 1.1.8 — 2022-02-10
- 1.1.7 — 2022-02-10
- 1.1.6 — 2022-02-10
- 1.0.6 — 2022-01-23
- 1.0.5 — 2022-01-23
- 1.0.4 — 2022-01-22
- 1.0.3 — 2022-01-22
- 1.0.2 — 2022-01-22
- 1.0.1 — 2022-01-22
- 1.0.0 — 2022-01-22

## README

[![npm version](https://img.shields.io/npm/v/candymachinescraper.svg?style=flat-square)](https://www.npmjs.org/package/candymachinescraper)
[![npm downloads](https://img.shields.io/npm/dt/candymachinescraper.svg?style=flat-square)](http://npm-stat.com/charts.html?package=candymachinescraper)

# What Does it do?

Grabs Candy Machine ID of any v1 or v2 candy machine websites.

# Installation 

`npm i candymachinescraper --save`

# Example Usage

```
// Get Candy Id
const candyMachineScraper = require('candymachinescraper');

async function test() {
    var url = 'https://mintsite.com';
    await candyMachineScraper.getCandyId(pathToNodeModules, url, function(data) {
        console.log(data);
        // {
        //   state: 'success',
        //   data: '2QcWbuQTyfEDdHHhpgfoXfptkFipE5J1SqQiZxvZERuR'
        // }
    });
}

test();
```

For getting Metadata it uses the [Blockchain API](https://theblockchainapi.com/)

```
// Get Candy Id & MetaData
const candyMachineScraper = require('candymachinescraper');

async function test() {
    var url = 'https://mintsite.com';
    await candyMachineScraper.getCandyId(pathToNodeModules, url, async function(data) {
        console.log(data);
        // {
        //   state: 'success',
        //   data: '2QcWbuQTyfEDdHHhpgfoXfptkFipE5J1SqQiZxvZERuR'
        // }

        var candyId = data.data;

        await candyMachineScraper.getMetaData(apiKeyId, apiSecretKey, candyId, function(data) {
            console.log(data);
            // {
            //   state: 'success',
            //   data: (Candy Machine Metadata)
            // }
        });
    });
}

test();
```

# Sample Response:
```
// Success
{
    state: 'success',
    data: '2QcWbuQTyfEDdHHhpgfoXfptkFipE5J1SqQiZxvZERuR'
}

// Error
{ 
    state: 'error', 
    data: "Didnt't find the ID :(" 
}

```

# Creator

@RaxoCoding
[Twitter](https://twitter.com/RaxoCoding)
[Youtube](https://www.youtube.com/channel/UCGxmNncs5ihjB-xk_9UUHyw)

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