urban-scraper
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

urban-scraper

A package that scrapes the Urban Dictionary.

Installation

npm install urban-scraper

Usage

// get a specific term
await getTerm("urban");

// get a specific term with markdown formatting
await getTerm("urban", true);

// get a random term
await getRandom();

Example response

{
  found: true,
  term: "Urban",
  id: 11468038,
  url: "https://www.urbandictionary.com/define.php?term=Urban&defid=11468038",
  description: "when ur too lazy to type out urban dictionary",
  example: 'I wonder how urban dictionary is defined in the urban dictionary. hmmm. "urban....clicks enter"',
  createdAt: 2017-04-21T22:00:00.000Z,
  author: {
    name: "fghjkm",
    url: "https://www.urbandictionary.com/author.php?author=fghjkm"
  },
  thumbs: { up: 8184, down: 911 }
}

Package Sidebar

Install

npm i urban-scraper

Weekly Downloads

7

Version

1.2.3

License

MIT

Unpacked Size

14.7 kB

Total Files

6

Last publish

Collaborators

  • brunolepis