scraping-urban-dictionary-definitions

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scraping Urban Dictionary Definitions

爬取Urban Dictionary定义

Raw data collection. No assumed use case — returns the full dataset for downstream analysis.

原始数据收集。不预设使用场景——返回完整数据集以供下游分析。

Inputs

输入参数

ParameterTypeRequiredDefaultNotes
startUrls
arrayOptional
[]
Urban Dictionary search URLs
keywords
arrayOptional
[]
Keywords/slang terms to search
maxItems
numberOptionalUnlimitedMaximum definitions to return
customMapFunction
stringOptionalJavaScript function to transform each output object
ParameterTypeRequiredDefaultNotes
startUrls
arrayOptional
[]
Urban Dictionary搜索URL
keywords
arrayOptional
[]
要搜索的关键词/俚语术语
maxItems
numberOptionalUnlimited要返回的最大定义数量
customMapFunction
stringOptional用于转换每个输出对象的JavaScript函数

How to Run

运行方式

Using run_actor.js (recommended)

使用run_actor.js(推荐)

bash
undefined
bash
undefined

Quick answer (table)

Quick answer (table)

node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}'
node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}'

Save as CSV

Save as CSV

node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}' --output results.csv --format csv
node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}' --output results.csv --format csv

Save as JSON

Save as JSON

node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}' --output results.json --format json
undefined
node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}' --output results.json --format json
undefined

REST API fallback

REST API备用方案

bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~urbandictionary-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["slay", "lowkey"], "maxItems": 10}'
If Apify MCP is available: Use the Apify MCP
call_actor
tool with actor
apidojo~urbandictionary-scraper
and the input above.

bash
curl -X POST "https://api.apify.com/v2/acts/apidojo~urbandictionary-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["slay", "lowkey"], "maxItems": 10}'
如果Apify MCP可用: 使用Apify MCP的
call_actor
工具,指定actor为
apidojo~urbandictionary-scraper
并传入上述输入参数。

Output Fields

输出字段

FieldTypeDescription
word
stringThe term being defined
definition
stringUser-submitted definition
example
stringExample sentence
author
stringDefinition author username
id
numberDefinition ID
createdAt
stringSubmission timestamp (ISO 8601)
numberOfThumbsUp
numberUpvotes
numberOfThumbsDown
numberDownvotes
url
stringDefinition URL
FieldTypeDescription
word
string被定义的术语
definition
string用户提交的定义
example
string示例句子
author
string定义作者的用户名
id
number定义ID
createdAt
string提交时间戳(ISO 8601格式)
numberOfThumbsUp
number点赞数
numberOfThumbsDown
number点踩数
url
string定义的URL

Edge Cases

边缘情况

  • No results: Term may not be in Urban Dictionary or spelled differently.
  • NSFW content: Urban Dictionary contains explicit content by design — filter downstream if needed.
  • Multiple definitions: A word may have 50+ entries. Use maxItems to cap.
  • Community vote gap: High thumbs-up vs thumbs-down indicates consensus vs controversy.
  • 无结果:该术语可能未收录在Urban Dictionary中,或拼写有误。
  • NSFW内容:Urban Dictionary本身包含露骨内容——如有需要可在下游环节过滤。
  • 多个定义:一个单词可能有50条以上的条目。可使用maxItems参数限制数量。
  • 社区投票差异:点赞数与点踩数差距较大表示共识性或争议性。