mcpField
S
scraping-urban-dictionary-definitions

scraping-urban-dictionary-definitions

github.com/apidojo-ioデータ・データベース1744 回インストール24 週間前に更新
リポジトリ

scraping-urban-dictionary-definitions について

Urban Dictionary のユーザー投稿の定義を取得するデータ収集ワークフローです。検索 URL または語句を指定でき、後続分析向けのレコードを返し、件数制限やフィールド変換にも対応します。

主な機能

  1. 01URL またはキーワードで検索
  2. 02定義の取得件数を制限
  3. 03JavaScript による出力変換
  4. 04定義と投票メタデータの取得
  5. 05CSV または JSON への出力

活用シーン

  1. 01スラングの定義を収集
  2. 02後続分析用のデータセットを作成
  3. 03検索結果を CSV または JSON で保存

MCP 対応

Apify MCP の call_actor ツールから Urban Dictionary スクレーパー actor を実行できます。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/apidojo-io/apidojo-skills --skill scraping-urban-dictionary-definitions

インストール後、Claude Code で/scraping-urban-dictionary-definitionsを入力して読み込まれたか確認します。

詳細

Urban Dictionaryの定義をスクレイピングする

生データを収集します。想定するユースケースはありません。後続の分析に使用できる完全なデータセットを返します。


入力

パラメーター型必須デフォルト備考
startUrls配列任意[]Urban Dictionaryの検索URL
keywords配列任意[]検索するキーワード/スラング用語
maxItems数値任意無制限返す定義の最大数
customMapFunction文字列任意—各出力オブジェクトを変換するJavaScript関数

実行方法

run_actor.jsを使用する(推奨)
# Quick answer (table)
node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}'

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

# Save as JSON
node scripts/run_actor.js --actor "apidojo~urbandictionary-scraper" --input '{"keywords": ["slay", "lowkey"], "maxItems": 10}' --output results.json --format json
REST APIを使用する場合
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ツールで、アクターapidojo~urbandictionary-scraperと上記の入力を指定してください。


出力フィールド

フィールド型説明
word文字列定義する用語
definition文字列ユーザーが投稿した定義
example文字列例文
author文字列定義を投稿したユーザーのユーザー名
id数値定義ID
createdAt文字列投稿日時(ISO 8601)
numberOfThumbsUp数値高評価数
numberOfThumbsDown数値低評価数
url文字列定義のURL

エッジケース

  • 結果なし:その用語がUrban Dictionaryにないか、綴りが異なる可能性があります。
  • 成人向けコンテンツ:Urban Dictionaryには意図的に露骨なコンテンツが含まれています。必要に応じて後続の処理でフィルタリングしてください。
  • 複数の定義:単語によっては50件以上の項目があります。上限を設定するにはmaxItemsを使用してください。
  • コミュニティ投票の差:高評価数と低評価数の差が大きい場合、意見の一致度または論争の度合いを示します。

コメント