# 🏯 Urbandictionary Scraper (`apidojo/urbandictionary-scraper`) Actor

Introducing the Urban Dictionary Scraper, your ultimate tool for diving into the world of contemporary slang, memes, and expressions! With this user-friendly and versatile scraper, you can effortlessly search for any keyword and retrieve a treasure trove of definitions.

- **URL**: https://apify.com/apidojo/urbandictionary-scraper.md
- **Developed by:** [API Dojo](https://apify.com/apidojo) (community)
- **Categories:** Social media, SEO tools
- **Stats:** 22 total users, 2 monthly users, 100.0% runs succeeded, 10 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Urban Dictionary Scraper

Urban Dictionary Scraper is an [Apify actor](https://apify.com/actors?fpr=yhdrb) for extracting definitions from from [urbandictionary.com](https://urbandictionary.com). It gives you access to the huge community based list of definitions for slang, meme, or many different things that is ongoing around the Web in structured form. It is build on top of [Apify SDK](https://sdk.apify.com/) and you can run it both on [Apify platform](https://my.apify.com) and locally!

- [Input](#input)
- [Output](#output)
- [Compute units consumption](#compute-units-consumption)
- [Extend output function](#extend-output-function)
- [Send results to Notion, Todoist and more](#send-results-to-notion-todoist-and-more-mcp-connectors)

### Input Parameters

| Field | Type | Description | Default value
| ----- | ---- | ----------- | -------------|
| startUrls | array | Urban Dictionary full search URLs as a String Array | `[]` |
| keywords | array | List of keywords that you want to search on Urban Dictionary | `[]` |
maxItems | number | Maximum number of items that you want to receive as output | `Infinity` |
| customMapFunction | string | Function that takes each of the output rows as argument and returns data that will be mapped, changed formatting, of the each rows. More information in [Custom map function](#custom-map-function)  | |
| outputConnector | string | Optional MCP connector to deliver the results to. See the MCP connectors section below. | `null` |
| deliverTarget | string | Where the connector writes: a page or database URL or ID (Notion example: `https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b`). Some services need none. | `null` |
| deliverMode | string | `perPost` writes one record per item, `summary` one roll-up per run. | `perPost` |
| deliverMaxItems | number | Optional cap on how many records `perPost` delivers. Ignored in `summary`. | `null` |

### 🆓 Demo Mode & Free Users

Users on the Free Plan can use the actor only in Demo Mode. **Free users can run the actor up to 5 times per month**, with each run capped at a maximum of 10 items — just enough to test it out. To use this actor without limitations, subscribe to a paid plan on Apify. [Subscribe here](https://apify.com/pricing?fpr=yhdrb).

### Compute Unit Consumption

The average consumption is 0.003 to 0.005 per 100 results. It is extremely fast and optimized for the public usage.

### Output

Output is stored in a dataset. Each item is information about post related with a keyword.

```
{
	"definition": "[An abbreviation] that stands for 'laugh out loud' to you, but 'lots of [love'] for [your mom].",
	"url": "http://lol.urbanup.com/11482563",
	"numberOfThumbsUp": 5528,
	"author": "dyhtgrew",
	"word": "lol",
	"id": 11482563,
	"createdAt": "2017-04-26T02:41:29.898Z",
	"example": "Mom: [Grandma] just [died]. LOL\r\nSon: Mom [what the fuck]?",
	"numberOfThumbsDown": 714
}
```

### Custom map function

You can use this function to change the output of each of the rows that you will get from this actor. This function gets each of the rows on the output as an argument so you can change the formatting, pick which attributes you want to get as the output. The output from this function will be converted into the format you will return. This function is not intended for filtering, please don't use it for filtering purposes or you will get banned automatically.

The return value of this function has to be an object!

You can return fields to achive 3 different things:

- Add a new field - Return object with a field that is not in the default output
- Change a field - Return an existing field with a new value
- Remove a field - Return an existing field with a value `undefined`

```
(object) => {
    return {
        author: object.author + " user",
        id: `${object.id}`,
    }
}
```

This example will change the output in the following way;

```
{
  "author": "dyhtgrew user"
  "id": "11482563"
}
```

### Send Results to Notion, Todoist and More (MCP Connectors)

The Urban Dictionary Scraper can deliver its results straight into the tools you already use, through [Apify MCP Connectors](https://apify.com/store/collections/mcp-connectors).

1. Authorize a connector (Notion, Todoist, or any service whose MCP server offers non-destructive write tools) once in [Console → Settings → API & Integrations → MCP connectors](https://console.apify.com/settings/integrations).
2. Pick it in the **Send results to Notion, Todoist, …** field.
3. Fill in where and how to write:
   - **Destination target:** the page or database URL or ID (Notion example: `https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b`). Share it with your connector first through Notion's **••• → Connections** menu. Some services need no target.
   - **Write mode:** `perPost` writes one record per definition; `summary` writes a single roll-up for the run.
   - **Max records to deliver** (optional): a cap on how many records `perPost` delivers.

**Notion:** point the target at a Notion **page** and the Actor creates a database with one typed column per field (URL, number, date, text). An **existing database** gets its matching columns filled by name. The connector can't add columns to it, so an empty database receives only titles and the rest of each record goes to the row's page body. Each definition field gets its own column: `numberOfThumbsUp` and `numberOfThumbsDown` as numbers, `url` as a link, and `word`, `definition` and `example` as text. Fields without a column go to the row's page body, so nothing is lost.

Your credentials stay with you: the Actor writes only through your own connector and only uses non-destructive write tools, so it can't delete or overwrite anything. Delivery runs after the scrape and is best-effort. If it fails, the run still finishes normally with all results in the dataset, and the run log says what went wrong. If the run is close to its timeout, delivery stops early so the run still succeeds, and the log says how many records were delivered.

### Urban Dictionary Scraper Export

During the run, the actor stores results into a dataset. Each item is a separate item in the dataset.

You can manage the results in any language (Python, PHP, Node JS/NPM). See the FAQ or <a href="https://www.apify.com/docs/api" target="blank">our API reference</a> to learn more about getting results from this Urban Dictionary actor.

### Contact

If you need any sort of support, please send an email to <apidojo10@gmail.com>. You name it, we get it.

### 🈴 Other Actors you might want to check

- [Twitter Scraper Lite](https://apify.com/apidojo/twitter-scraper-lite?fpr=yhdrb)
- [Twitter List Scraper](https://apify.com/apidojo/twitter-list-scraper?fpr=yhdrb)
- [Twitter User Scraper](https://apify.com/apidojo/twitter-user-scraper?fpr=yhdrb)
- [TikTok Comment Scraper](https://apify.com/apidojo/tiktok-comments-scraper?fpr=yhdrb)
- [TikTok User Scraper](https://apify.com/apidojo/tiktok-user-scraper?fpr=yhdrb)

# Actor input Schema

## `startUrls` (type: `array`):

URLs to start with. It should be list or detail URL

## `keywords` (type: `array`):

The keyword that you can search on Urban Dictionary

## `maxItems` (type: `integer`):

Maximum number of items that you want as output.

## `customMapFunction` (type: `string`):

Function that takes each of the objects as argument and returns data that will be mapped by the function itself. This function is not intended for filtering, please don't use it for filtering purposes or you will get banned automatically.

## `outputConnector` (type: `string`):

Pick an MCP connector you authorized in Console → Settings → API & Integrations → MCP connectors (e.g. Notion, Todoist — any service whose MCP server offers non-destructive write tools works best-effort). The scraped results are written through your own connector — the Actor never sees your third-party credentials. Only non-destructive write tools are used; it can never delete or overwrite your existing data.

## `deliverTarget` (type: `string`):

Where to write into the connector — paste the URL or ID. Notion example: https://www.notion.so/My-Posts-24f8a1b2c3d44e5f8a9b0c1d2e3f4a5b. Leave empty for services that need no target (e.g. Todoist Inbox, Slack). For Notion, share the page or database with your connector first (Notion's ••• → Connections menu), and point at a PAGE for structured columns (the Actor builds the database for you) — an empty database receives only the title (the rest of each record goes to the row's body).

## `deliverMode` (type: `string`):

perPost writes one record per scraped item; summary writes a single roll-up for the run.

## `deliverMaxItems` (type: `integer`):

Cap on how many records perPost mode writes to the connector; ignored in summary mode. Leave empty to deliver everything scraped.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.urbandictionary.com/define.php?term=dude",
    "https://www.urbandictionary.com/define.php?term=nah"
  ],
  "keywords": [
    "afk",
    "lol"
  ],
  "maxItems": 1000,
  "customMapFunction": "(object) => { return {...object} }",
  "deliverMode": "perPost"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        "https://www.urbandictionary.com/define.php?term=dude",
        "https://www.urbandictionary.com/define.php?term=nah"
    ],
    "keywords": [
        "afk",
        "lol"
    ],
    "maxItems": 1000,
    "customMapFunction": (object) => { return {...object} }
};

// Run the Actor and wait for it to finish
const run = await client.actor("apidojo/urbandictionary-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [
        "https://www.urbandictionary.com/define.php?term=dude",
        "https://www.urbandictionary.com/define.php?term=nah",
    ],
    "keywords": [
        "afk",
        "lol",
    ],
    "maxItems": 1000,
    "customMapFunction": "(object) => { return {...object} }",
}

# Run the Actor and wait for it to finish
run = client.actor("apidojo/urbandictionary-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.urbandictionary.com/define.php?term=dude",
    "https://www.urbandictionary.com/define.php?term=nah"
  ],
  "keywords": [
    "afk",
    "lol"
  ],
  "maxItems": 1000,
  "customMapFunction": "(object) => { return {...object} }"
}' |
apify call apidojo/urbandictionary-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apidojo/urbandictionary-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wpqSEeXTWl7qdQVEW/builds/cgu3W9xne5iXZZ84B/openapi.json
