← 返回
未分类 中文

Wikipedia Nearby

Find nearby Wikipedia articles based on geographic location. Use when user asks about "nearby places", "what's around me", "places near [location]", "Wikiped...
根据地理位置查找附近的维基百科条目,适用于用户询问“附近地点”“我附近有什么”“[地点]附近的地方”等场景。
jrrqd
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 359
下载
💾 0
安装
1
版本
#latest

概述

Wikipedia Nearby

Overview

Wikipedia has a built-in geolocation feature that finds articles (places, landmarks, restaurants, museums, etc.) near any location. This skill covers how to access and use Wikipedia Nearby.

Primary URL

https://en.wikipedia.org/wiki/Special:Nearby

This page uses browser geolocation (GPS) to show Wikipedia articles near your current location.

API Access

For programmatic access without browser geolocation, use Wikipedia's APIs:

Geolocation Search

https://en.wikipedia.org/w/api.php?action=query&list=geosearch&gscoord={lat}%7C{lng}&gsradius=10000&gslimit=50&format=json

Parameters:

  • gscoord: Latitude and longitude separated by | (e.g., 35.6762%7C139.6503 for Tokyo)
  • gsradius: Search radius in meters (default: 1000, max: 10000)
  • gslimit: Maximum results (default: 10, max: 500)

Get Article Details

https://en.wikipedia.org/w/api.php?action=query&titles={title}&prop=extracts&exintro&explaintext&format=json

Usage Patterns

1. Current Location (Browser Required)

Direct user to https://en.wikipedia.org/wiki/Special:Nearby and allow browser geolocation.

2. Specific Location

If user provides coordinates or a place name:

  1. Use geocode API or search to get lat/lng
  2. Query Wikipedia geosearch API
  3. Return results with titles, distances, and brief descriptions

3. Known Coordinates

If user provides lat/lng directly, skip geocoding and query directly:

https://en.wikipedia.org/w/api.php?action=query&list=geosearch&gscoord=-6.2088%7C106.8456&gsradius=5000&gslimit=20&format=json

Example for Jakarta (-6.2088, 106.8456):

curl "https://en.wikipedia.org/w/api.php?action=query&list=geosearch&gscoord=-6.2088%7C106.8456&gsradius=5000&gslimit=10&format=json"

4. Parse and Present Results

The API returns:

{
  "query": {
    "geosearch": [
      {
        "pageid": 12345,
        "title": "Monas",
        "lat": -6.175392,
        "lon": 106.827153,
        "dist": 450,
        "primary"
      }
    ]
  }
}

Present results as:

  • Name (distance from center)
  • Brief extract if available

Location Sharing from Telegram/WhatsApp

When user shares location via Telegram or WhatsApp:

Telegram: Receives location object with latitude and longitude

WhatsApp: Receives location message with latitude and longitude

Extract coordinates and query directly:

curl "https://en.wikipedia.org/w/api.php?action=query&list=geosearch&gscoord={lat}%7C{lng}&gsradius=5000&gslimit=20&format=json"

Example Workflow

User shares location from Telegram/WhatsApp:

  1. Extract latitude and longitude from the incoming location message
  2. Query Wikipedia geosearch API:
  3. curl "https://en.wikipedia.org/w/api.php?action=query&list=geosearch&gscoord=-6.175392%7C106.827153&gsradius=5000&gslimit=10&format=json"
    
  4. Present results with name, distance, and brief extract if available

User asks: "What's near Monas in Jakarta?"

  1. Get Monas coordinates: -6.175392, 106.827153
  2. Query geosearch API with radius 2km
  3. Present top 10 results with distance and brief description

Notes

  • Wikipedia Nearby primarily works well for densely-populated areas with many Wikipedia articles
  • Results are limited to articles with geographic coordinates in Wikipedia's database
  • For very remote areas, results may be sparse or empty
  • Wikipedia articles are available in many languages; consider using uselang parameter if relevant

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 12:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

OSNK Trainer

jrrqd
OSNK教练 -2006-2025年OSK/OSNK/SNK/Bebras题库,智能练习、速度冲刺、成绩追踪、全方位辅导。
★ 0 📥 401

Prayer Times Skill

jrrqd
伊斯兰祈祷时间提醒、待办清单与日志。当用户询问祈祷时间(如sholat、waktu solat、jadwalsholat)或想设置位置时使用。
★ 0 📥 328

Verosight Monitor

jrrqd
集成Verosight API用于社交媒体情报与网络监控。情感分析、趋势检测、影响者识别和机器人检测。
★ 0 📥 402