scraping-urban-dictionary-definitions
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseScraping Urban Dictionary Definitions
爬取Urban Dictionary定义
Raw data collection. No assumed use case — returns the full dataset for downstream analysis.
原始数据收集。不预设使用场景——返回完整数据集以供下游分析。
Inputs
输入参数
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| array | Optional | | Urban Dictionary search URLs |
| array | Optional | | Keywords/slang terms to search |
| number | Optional | Unlimited | Maximum definitions to return |
| string | Optional | — | JavaScript function to transform each output object |
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| array | Optional | | Urban Dictionary搜索URL |
| array | Optional | | 要搜索的关键词/俚语术语 |
| number | Optional | Unlimited | 要返回的最大定义数量 |
| string | Optional | — | 用于转换每个输出对象的JavaScript函数 |
How to Run
运行方式
Using run_actor.js (recommended)
使用run_actor.js(推荐)
bash
undefinedbash
undefinedQuick 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
undefinednode scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}' --output results.json --format json
undefinedREST 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 tool with actor and the input above.
call_actorapidojo~urbandictionary-scraperbash
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的工具,指定actor为并传入上述输入参数。
call_actorapidojo~urbandictionary-scraperOutput Fields
输出字段
| Field | Type | Description |
|---|---|---|
| string | The term being defined |
| string | User-submitted definition |
| string | Example sentence |
| string | Definition author username |
| number | Definition ID |
| string | Submission timestamp (ISO 8601) |
| number | Upvotes |
| number | Downvotes |
| string | Definition URL |
| Field | Type | Description |
|---|---|---|
| string | 被定义的术语 |
| string | 用户提交的定义 |
| string | 示例句子 |
| string | 定义作者的用户名 |
| number | 定义ID |
| string | 提交时间戳(ISO 8601格式) |
| number | 点赞数 |
| number | 点踩数 |
| 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参数限制数量。
- 社区投票差异:点赞数与点踩数差距较大表示共识性或争议性。