npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

amap-clawer

v2.0.5

Published

AMap search api clawer.

Downloads

40

Readme

高德API

利用高德搜索Web API爬取数据。

依赖包

NPM包:

TypeScript安装:

npm install -g typescript

TypeScript支持node模块:

npm install @types/node

命令行工具

安装

使用如下命令安装:

npm install -g amap-clawer

使用方法

Key 配置文件编写

key-config 参数值即 Target 配置文件,该文件为 JSON 格式, 是一个 GaodeApiKey 接口的数组,GaodeApiKey 定义为:

interface GaodeApiKey {
    key: string;
}

例如:

[{
    "key": "您的key1"
},{
    "key": "您的key2"
}]

POI 爬虫

使用格式说明如下:

gaode-poi [options]

Required options:

-t, --target-config [string]    Set download targets.
-k, --key-config [string]       Set amap keys.
-o, --output-dir [string]       Set output root dir.

例如:

gaode-poi -t targets.json -k keys.json -o .

其中,targets.json 是 Target 配置文件, keys.json 是 Key 配置文件。

target-config 参数值即 Target 配置文件,该文件为 JSON 格式, 是一个 DownloadGaodeTarget 接口的数组,DownloadGaodeTarget 定义为:

interface DownloadGaodeTarget {
    city: string;
    types: TargetType[]
}

interface TargetType {
    name?: string;
    id?: string;
}

例如:

[{
    "city": "wuhan",
    "types": [{
        "name": "高等院校",
        "id": "141201"
    }]
}]

地理编码爬虫

使用高德地图地理编码 API 进行对地址的批量地理编码。目前仅支持 CSV 格式文件。

使用格式说明如下:

download-gaode-poi [options]

Required options:

-c, --input-csv [string]           Set input targets from csv file.
-k, --key-config [string]          Set amap keys.
-o, --output-dir [string]          Set output root dir.
-i, --field-oid [string]           Set unique id field. Default to "id".
-a, --field-address [string]       Set output address field name. Default to "address".

例如:

gaode-geocode -k keys.json  -o . -c geocode.csv -a "PLACE" -i "OID"

其中:

  • -c 参数表示需要被地理编码的地址的集合文件
  • -a 表示输入文件中表示地址的字段
  • -i 表示输入文件中表示主键的字段

与代码集成

该仓库暂时只作为命令行工具使用。与代码集成没有经过测试。