# lexica-api

> API wrapper around Lexica.art for searching Stable Diffusion images.

Latest version **1.0.2** (published 2022-12-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install lexica-api
pnpm add lexica-api
yarn add lexica-api
bun add lexica-api
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-12-06 |
| First published | 2022-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=14 |
| Dependencies | 2 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Travis Fischer |
| Maintainers | fisch0920 |

## Links

- npm: https://www.npmjs.com/package/lexica-api
- Repository: https://github.com/transitive-bullshit/lexica-api
- Homepage: https://github.com/transitive-bullshit/lexica-api#readme
- Issues: https://github.com/transitive-bullshit/lexica-api/issues
- npm.io page: https://npm.io/package/lexica-api

## Dependencies (2)

- [got](https://npm.io/package/got.md) ^12.5.3
- [p-throttle](https://npm.io/package/p-throttle.md) ^5.0.0

## Recent versions

- 1.0.2 (latest) — 2022-12-06
- 1.0.1 — 2022-12-04
- 1.0.0 — 2022-11-29
- 0.1.5 — 2022-11-29
- 0.1.4 — 2022-11-29
- 0.1.2 — 2022-11-29
- 0.1.1 — 2022-11-29
- 0.1.0 — 2022-11-29

## README

# Lexica <!-- omit in toc -->

> API wrapper around [Lexica](https://lexica.art) for searching Stable Diffusion images.

[![NPM](https://img.shields.io/npm/v/lexica-api.svg)](https://www.npmjs.com/package/lexica-api) [![Build Status](https://github.com/transitive-bullshit/lexica-api/actions/workflows/test.yml/badge.svg)](https://github.com/transitive-bullshit/lexica-api/actions/workflows/test.yml) [![MIT License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/transitive-bullshit/lexica-api/blob/main/license) [![Prettier Code Formatting](https://img.shields.io/badge/code_style-prettier-brightgreen.svg)](https://prettier.io)

- [Intro](#intro)
- [Install](#install)
- [Usage](#usage)
- [Docs](#docs)
- [License](#license)

## Intro

This package is a simple Node.js wrapper around the [Lexica](https://lexica.art/docs) API for searching Stable Diffusion images.

It uses `got` and TypeScript.

## Install

```bash
npm install --save lexica-api
# or
yarn add lexica-api
# or
pnpm add lexica-api
```

## Usage

```ts
import { LexicaAPI } from 'lexica-api'

const lexica = new LexicaAPI()

// normal search
const results0 = await lexica.search('apples')

// reverse image search
const results1 = await lexica.reverseImageSearch(
  'https://media.gettyimages.com/photos/crete-senesi-countryside-in-summer-tuscany-italy-picture-id1411845730'
)
```

## Docs

See the [auto-generated docs](./docs/modules.md).

## License

MIT © [Travis Fischer](https://transitivebullsh.it)

Support my open source work by <a href="https://twitter.com/transitive_bs">following me on twitter <img src="https://storage.googleapis.com/saasify-assets/twitter-logo.svg" alt="twitter" height="24px" align="center"></a>

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