将杂乱、不一致的城市名称转换为干净、标准化的位置数据 CityScrub 处理简单字符串匹配无法解决的边缘情况 — 如 "Sincinati" 这样的拼写错误、像 "NYC" 或 "SF" 这样的缩写、语音变体和缺失元音。
现实世界的位置数据混乱 用户输入 "Nw Yrk" 而不是 New York,"St. Pete" 而不是圣彼得堡,或 "Lndn" 而不是伦敦 标准查找在这些情况下都失败了 CityScrub 使用先进的模糊匹配即使输入严重扭曲也能找到正确的城市 — 处理拼写错误、昵称和地区变体在一次 API 调用中。
✓ 模糊匹配 — 修正单字符和多字符错误、字符顺序颠倒和缺失字母
✓ 缩写支持 — NYC、LA、SF、Chi、Philly、大苹果、风城等
✓ 语音匹配 — 解决类似 "Sinsinati" → Cincinnati 的变体
✓ 全球覆盖 — 主要城市的世界范围内的人口、坐标、时区和区域数据
✓ 智能过滤 — 按国家或州/省筛选以提高准确性
✓ 置信评分 — 每个匹配的 0-100 分数,让您决定接受什么
✓ 批量处理 — 在一次 API 调用中标准化多达 1,000 条记录
GET /api/v1/search — 具有模糊匹配的单城市查找
POST /api/v1/normalize/batch — 批量处理多条记录,最多可达 1,000
GET /api/v1/lookup/{id} — 按城市 ID 精确查找
每个匹配包括:
客户关系管理与客户数据清理 — 在导入前标准化地址字段
电子商务结账 — 验证运输地址以减少交付错误
分析管道 — 尽管用户输入不一致仍按城市分组
市场细分 — 清理位置信息以进行地理定位
ETL 工作流 — 大规模处理用户提交的位置数据
开始使用 100 次免费请求 — 无需信用卡。使用您自己的数据进行测试,并在升级前查看结果
搜索城市 - 端点功能
| 对象 | 描述 |
|---|---|
q |
[必需] City name to search |
country |
可选 2-letter country code |
state |
可选 State/province code |
limit |
可选 Number of results |
request_body |
[必需] |
请求体 |
[必需] Json |
{"matches":[{"id":2464704,"name":"Testour","country":"TN","state":"17","population":13397,"lat":36.5513,"lng":9.44307,"timezone":"Africa/Tunis","score":78.1,"confidence":"low","match_type":null},{"id":2785610,"name":"Testelt","country":"BE","state":"VLG","population":3131,"lat":51.01084,"lng":4.95312,"timezone":"Europe/Brussels","score":75.0,"confidence":"low","match_type":null},{"id":3006283,"name":"La Teste-de-Buch","country":"FR","state":"75","population":27253,"lat":44.63278,"lng":-1.14513,"timezone":"Europe/Paris","score":74.7,"confidence":"low","match_type":null},{"id":4008076,"name":"Testerazo","country":"MX","state":"18","population":2410,"lat":21.40242,"lng":-104.8942,"timezone":"America/Mazatlan","score":74.4,"confidence":"low","match_type":null},{"id":3165715,"name":"Testico","country":"IT","state":"08","population":102,"lat":44.00553,"lng":8.02639,"timezone":"Europe/Rome","score":72.5,"confidence":"low","match_type":null}],"query_time_ms":529.35}
curl --location --request GET 'https://zylalabs.com/api/12280/cityscrub+batch+api/23057/search+city?q=test' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw ''
在单个API调用中规范化多达10,000个城市记录 自动去重输入以提高效率 每个城市收费1个积分 以与输入相同的顺序返回结果
批量标准化城市 - 端点功能
| 对象 | 描述 |
|---|---|
请求体 |
[必需] Json |
{"processed":33,"successful":29,"low_confidence":4,"failed":0,"results":[{"input":{"city":"Nw Yrk","state":null,"country":"US","zip":null},"match":{"id":5128581,"name":"New York City","country":"US","state":"NY","population":8804190,"lat":40.71427,"lng":-74.00597,"timezone":"America/New_York","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":5128616,"name":"New York Mills","country":"US","state":"NY","population":3308,"lat":43.10535,"lng":-75.29128,"timezone":"America/New_York","score":92.6,"confidence":"high","match_type":null},{"id":5115985,"name":"East New York","country":"US","state":"NY","population":173198,"lat":40.66677,"lng":-73.88236,"timezone":"America/New_York","score":90.0,"confidence":"medium","match_type":null}],"error":null},{"input":{"city":"Londn","state":null,"country":"GB","zip":null},"match":{"id":2643743,"name":"London","country":"GB","state":"ENG","population":8961989,"lat":51.50853,"lng":-0.12574,"timezone":"Europe/London","score":100.0,"confidence":"high","match_type":"exact_alternate"},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"Pari","state":null,"country":"FR","zip":null},"match":{"id":2988507,"name":"Paris","country":"FR","state":"11","population":2138551,"lat":48.85341,"lng":2.3488,"timezone":"Europe/Paris","score":100.0,"confidence":"high","match_type":"exact_alternate"},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"Brln","state":null,"country":"DE","zip":null},"match":{"id":2950159,"name":"Berlin","country":"DE","state":"16","population":3426354,"lat":52.52437,"lng":13.41053,"timezone":"Europe/Berlin","score":80.2,"confidence":"low","match_type":null},"score":80.2,"confidence":"low","fallbacks":[{"id":2885657,"name":"Berlin Köpenick","country":"DE","state":"16","population":59561,"lat":52.44254,"lng":13.58228,"timezone":"Europe/Berlin","score":71.4,"confidence":"low","match_type":null},{"id":2820577,"name":"Überlingen","country":"DE","state":"01","population":21507,"lat":47.76977,"lng":9.17136,"timezone":"Europe/Berlin","score":69.2,"confidence":"low","match_type":null}],"error":null},{"input":{"city":"LA","state":null,"country":"US","zip":null},"match":{"id":5368361,"name":"Los Angeles","country":"US","state":"CA","population":3820914,"lat":34.05223,"lng":-118.24368,"timezone":"America/Los_Angeles","score":100.0,"confidence":"high","match_type":"exact_alternate"},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"SF","state":null,"country":"US","zip":null},"match":{"id":5391959,"name":"San Francisco","country":"US","state":"CA","population":827526,"lat":37.77493,"lng":-122.41942,"timezone":"America/Los_Angeles","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":5397765,"name":"South San Francisco","country":"US","state":"CA","population":67271,"lat":37.65466,"lng":-122.40775,"timezone":"America/Los_Angeles","score":72.9,"confidence":"low","match_type":null},{"id":5391945,"name":"San Fernando","country":"US","state":"CA","population":24931,"lat":34.28195,"lng":-118.43897,"timezone":"America/Los_Angeles","score":51.0,"confidence":"low","match_type":null}],"error":null},{"input":{"city":"NYC","state":null,"country":"US","zip":null},"match":{"id":5128581,"name":"New York City","country":"US","state":"NY","population":8804190,"lat":40.71427,"lng":-74.00597,"timezone":"America/New_York","score":100.0,"confidence":"high","match_type":"exact_alternate"},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"big apple","state":null,"country":"US","zip":null},"match":{"id":5128581,"name":"New York City","country":"US","state":"NY","population":8804190,"lat":40.71427,"lng":-74.00597,"timezone":"America/New_York","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"Lodon","state":null,"country":"GB","zip":null},"match":{"id":2643743,"name":"London","country":"GB","state":"ENG","population":8961989,"lat":51.50853,"lng":-0.12574,"timezone":"Europe/London","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":2643783,"name":"Loddon","country":"GB","state":"ENG","population":3552,"lat":52.5327,"lng":1.48183,"timezone":"Europe/London","score":70.5,"confidence":"low","match_type":null},{"id":2643339,"name":"Luton","country":"GB","state":"ENG","population":225262,"lat":51.87967,"lng":-0.41748,"timezone":"Europe/London","score":35.0,"confidence":"low","match_type":null}],"error":null},{"input":{"city":"Tokio","state":null,"country":"JP","zip":null},"match":{"id":1850147,"name":"Tokyo","country":"JP","state":"40","population":9733276,"lat":35.6895,"lng":139.69171,"timezone":"Asia/Tokyo","score":100.0,"confidence":"high","match_type":"exact_alternate"},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"Beiging","state":null,"country":"CN","zip":null},"match":{"id":1816670,"name":"Beijing","country":"CN","state":"22","population":18960744,"lat":39.9075,"lng":116.39723,"timezone":"Asia/Shanghai","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":2037201,"name":"Beining","country":"CN","state":"19","population":152033,"lat":41.59556,"lng":121.79278,"timezone":"Asia/Shanghai","score":100.0,"confidence":"high","match_type":null},{"id":9275963,"name":"Beijinglu","country":"CN","state":"13","population":0,"lat":43.83405,"lng":87.57416,"timezone":"Asia/Urumqi","score":87.5,"confidence":"medium","match_type":null}],"error":null},{"input":{"city":"Shangai","state":null,"country":"CN","zip":null},"match":{"id":1796236,"name":"Shanghai","country":"CN","state":"23","population":24874500,"lat":31.22222,"lng":121.45806,"timezone":"Asia/Shanghai","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":1794103,"name":"Shangsi","country":"CN","state":"16","population":71468,"lat":22.15627,"lng":107.97953,"timezone":"Asia/Shanghai","score":100.0,"confidence":"high","match_type":null},{"id":1783934,"name":"Shangqiu","country":"CN","state":"09","population":1536392,"lat":34.45,"lng":115.65,"timezone":"Asia/Shanghai","score":77.6,"confidence":"low","match_type":null}],"error":null},{"input":{"city":"Mumabi","state":null,"country":"IN","zip":null},"match":{"id":1275339,"name":"Mumbai","country":"IN","state":"16","population":12691836,"lat":19.07283,"lng":72.88261,"timezone":"Asia/Kolkata","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":6619347,"name":"Navi Mumbai","country":"IN","state":"16","population":2600000,"lat":19.03681,"lng":73.01582,"timezone":"Asia/Kolkata","score":73.5,"confidence":"low","match_type":null},{"id":1263594,"name":"Mānvi","country":"IN","state":"19","population":46465,"lat":15.99126,"lng":77.05034,"timezone":"Asia/Kolkata","score":26.4,"confidence":"low","match_type":null}],"error":null},{"input":{"city":"Deli","state":null,"country":"IN","zip":null},"match":{"id":1273294,"name":"Delhi","country":"IN","state":"07","population":11034555,"lat":28.65195,"lng":77.23149,"timezone":"Asia/Kolkata","score":100.0,"confidence":"high","match_type":"exact_alternate"},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"Sidney","state":null,"country":"AU","zip":null},"match":{"id":2147714,"name":"Sydney","country":"AU","state":"02","population":5557233,"lat":-33.86785,"lng":151.20732,"timezone":"Australia/Sydney","score":100.0,"confidence":"high","match_type":"exact_alternate"},"score":100.0,"confidence":"high","fallbacks":[],"error":null},{"input":{"city":"Melborn","state":null,"country":"AU","zip":null},"match":{"id":2158177,"name":"Melbourne","country":"AU","state":"07","population":5350705,"lat":-37.814,"lng":144.96332,"timezone":"Australia/Melbourne","score":88.6,"confidence":"medium","match_type":null},"score":88.6,"confidence":"medium","fallbacks":[{"id":11523810,"name":"Melbourne City Centre","country":"AU","state":"07","population":60057,"lat":-37.81501,"lng":144.96657,"timezone":"Australia/Melbourne","score":81.0,"confidence":"low","match_type":null},{"id":7932638,"name":"Malvern East","country":"AU","state":"07","population":22296,"lat":-37.87397,"lng":145.04253,"timezone":"Australia/Melbourne","score":46.3,"confidence":"low","match_type":null}],"error":null},{"input":{"city":"Tornto","state":null,"country":"CA","zip":null},"match":{"id":6167865,"name":"Toronto","country":"CA","state":"08","population":2794356,"lat":43.70643,"lng":-79.39864,"timezone":"America/Toronto","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":6087824,"name":"New Toronto","country":"CA","state":"08","population":11463,"lat":43.60019,"lng":-79.50527,"timezone":"America/Toronto","score":85.3,"confidence":"medium","match_type":null},{"id":6168767,"name":"Trenton","country":"CA","state":"07","population":2407,"lat":45.61548,"lng":-62.63743,"timezone":"America/Halifax","score":63.3,"confidence":"low","match_type":null}],"error":null},{"input":{"city":"Vancouvr","state":null,"country":"CA","zip":null},"match":{"id":6173331,"name":"Vancouver","country":"CA","state":"02","population":662248,"lat":49.24966,"lng":-123.11934,"timezone":"America/Vancouver","score":100.0,"confidence":"high","match_type":null},"score":100.0,"confidence":"high","fallbacks":[{"id":6090785,"name":"North Vancouver","country":"CA","state":"02","population":88168,"lat":49.31636,"lng":-123.06934,"timezone":"America/Vancouver","score":89.7,"confidence":"medium","match_type":null},{"id":8533869,"name":"West Vancouver","country":"CA","state":"02","population":45487,"lat":49.3286,"lng":-123.16019,"timezone":"America/Vancouver","score":88.3,"confidence":"medium","match_type":null}],"error":null},{"input":{"city":"Mexico Cty"}}],"_note":"Response truncated for documentation purposes"}
curl --location --request POST 'https://zylalabs.com/api/12280/cityscrub+batch+api/23058/batch+normalize+cities' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"records": [
{"city": "Nw Yrk", "country": "US"},
{"city": "Londn", "country": "GB"},
{"city": "Pari", "state": null, "country": "FR"},
{"city": "Brln", "country": "DE"},
{"city": "LA", "country": "US"},
{"city": "SF", "country": "US"},
{"city": "NYC", "country": "US"},
{"city": "big apple", "country": "US"},
{"city": "Lodon", "country": "GB"},
{"city": "Tokio", "country": "JP"},
{"city": "Beiging", "country": "CN"},
{"city": "Shangai", "country": "CN"},
{"city": "Mumabi", "country": "IN"},
{"city": "Deli", "country": "IN"},
{"city": "Sidney", "country": "AU"},
{"city": "Melborn", "country": "AU"},
{"city": "Tornto", "country": "CA"},
{"city": "Vancouvr", "country": "CA"},
{"city": "Mexico Cty", "country": "MX"},
{"city": "Sao Palo", "country": "BR"},
{"city": "Rio", "country": "BR"},
{"city": "Bunos Aires", "country": "AR"},
{"city": "Lma", "country": "PE"},
{"city": "Sinsinati", "country": "US"},
{"city": "Chicgo", "country": "US"},
{"city": "Houson", "country": "US"},
{"city": "Cairo", "country": "EG"},
{"city": "Lagos", "country": "NG"},
{"city": "Johansburg", "country": "ZA"},
{"city": "Moskow", "country": "RU"},
{"city": "Istambul", "country": "TR"},
{"city": "Dubay", "country": "AE"},
{"city": "Singapor", "country": "SG"}
],
"options": {
"min_confidence": 85,
"include_fallbacks": true
}
}'
通过城市ID进行精确查找以便跟进查询。当您从之前的搜索中获得城市ID并需要检索完整详细信息时使用此功能。每个请求消耗1个积分
{"id":5128581,"name":"New York City","country":"US","state":"NY","population":8804190,"lat":40.71427,"lng":-74.00597,"timezone":"America/New_York","score":null,"confidence":null,"match_type":null}
curl --location --request GET 'https://zylalabs.com/api/12280/cityscrub+batch+api/23059/lookup+city+by+id&ID=Required' --header 'Authorization: Bearer YOUR_API_KEY'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。
每个端点返回与城市相关的数据,包括标准城市名称 ISO 国家代码 省州信息 人口数据 地理坐标(纬度和经度) 时区 和匹配的置信度分数
响应数据中的关键字段包括“name”(标准城市名称)、"country"(ISO代码)、"state"(或省)、"population"、"lat"(纬度)、"lng"(经度)、"timezone"和"score"(置信度评分)
响应数据被构建为一个JSON对象 对于批量处理,它以与输入相同的顺序返回城市记录数组,而单次查找则返回一个匹配项及备用选项
GET /api/v1/search 端点提供单城市查询的模糊匹配结果 而 POST /api/v1/normalize/batch 端点对多个城市记录进行规范化 为每个输入返回详细的城市数据
用户可以通过指定城市名称等参数来自定义请求或根据国家或州/省过滤结果,以提高批量标准化过程的准确性
数据来源于公共记录、地理数据库和用户贡献的结合,确保了全球城市信息的全面和最新的收集
典型的使用案例包括客户关系管理数据清洗 电子商务地址验证 地理细分分析 以及大规模处理用户提交的位置数据的ETL工作流
用户可以利用返回的数据来提供准确的基于位置的服务,通过地理目标增强营销策略,并通过标准化城市名称来改善数据库中的数据质量
Zyla API Hub 就像一个大型 API 商店,您可以在一个地方找到数千个 API。我们还为所有 API 提供专门支持和实时监控。注册后,您可以选择要使用的 API。请记住,每个 API 都需要自己的订阅。但如果您订阅多个 API,您将为所有这些 API 使用相同的密钥,使事情变得更简单。
价格以 USD(美元)、EUR(欧元)、CAD(加元)、AUD(澳元)和 GBP(英镑)列出。我们接受所有主要的借记卡和信用卡。我们的支付系统使用最新的安全技术,由 Stripe 提供支持,Stripe 是世界上最可靠的支付公司之一。如果您在使用卡片付款时遇到任何问题,请通过 [email protected]
此外,如果您已经以这些货币中的任何一种(USD、EUR、CAD、AUD、GBP)拥有有效订阅,该货币将保留用于后续订阅。只要您没有任何有效订阅,您可以随时更改货币。
定价页面上显示的本地货币基于您 IP 地址的国家/地区,仅供参考。实际价格以 USD(美元)为单位。当您付款时,即使您在我们的网站上看到以本地货币显示的等值金额,您的卡片对账单上也会以美元显示费用。这意味着您不能直接使用本地货币付款。
有时,银行可能会因其欺诈保护设置而拒绝收费。我们建议您首先联系您的银行,检查他们是否阻止了我们的收费。此外,您可以访问账单门户并更改关联的卡片以进行付款。如果这些方法不起作用并且您需要进一步帮助,请通过 [email protected]
价格由月度或年度订阅决定,具体取决于所选计划。
API 调用根据成功请求从您的计划中扣除。每个计划都包含您每月可以进行的特定数量的调用。只有成功的调用(由状态 200 响应指示)才会计入您的总数。这确保失败或不完整的请求不会影响您的月度配额。
Zyla API Hub 采用月度订阅系统。您的计费周期将从您购买付费计划的那一天开始,并在下个月的同一日期续订。因此,如果您想避免未来的费用,请提前取消订阅。
要升级您当前的订阅计划,只需转到 API 的定价页面并选择您要升级到的计划。升级将立即生效,让您立即享受新计划的功能。请注意,您之前计划中的任何剩余调用都不会转移到新计划,因此在升级时请注意这一点。您将被收取新计划的全部金额。
要检查您本月剩余多少 API 调用,请参考响应标头中的 "X-Zyla-API-Calls-Monthly-Remaining" 字段。例如,如果您的计划允许每月 1,000 个请求,而您已使用 100 个,则响应标头中的此字段将显示 900 个剩余调用。
要查看您的计划允许的最大 API 请求数,请检查 "X-Zyla-RateLimit-Limit" 响应标头。例如,如果您的计划包括每月 1,000 个请求,此标头将显示 1,000。
"X-Zyla-RateLimit-Reset" 标头显示您的速率限制重置之前的秒数。这告诉您何时您的请求计数将重新开始。例如,如果它显示 3,600,则意味着还有 3,600 秒直到限制重置。
是的,您可以随时通过访问您的账户并在账单页面上选择取消选项来取消您的计划。请注意,升级、降级和取消会立即生效。此外,取消后,您将不再有权访问该服务,即使您的配额中还有剩余调用。
您可以通过我们的聊天渠道联系我们以获得即时帮助。我们始终在线,时间为上午 8 点至下午 5 点(EST)。如果您在该时间之后联系我们,我们将尽快回复您。此外,您可以通过 [email protected]
为了让您有机会在没有任何承诺的情况下体验我们的 API,我们提供 7 天免费试用,允许您免费进行最多 50 次 API 调用。此试用只能使用一次,因此我们建议将其应用于您最感兴趣的 API。虽然我们的大多数 API 都提供免费试用,但有些可能不提供。试用在 7 天后或您进行了 50 次请求后结束,以先发生者为准。如果您在试用期间达到 50 次请求限制,您需要"开始您的付费计划"以继续发出请求。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。或者,如果您在第 7 天之前不取消订阅,您的免费试用将结束,您的计划将自动计费,授予您访问计划中指定的所有 API 调用的权限。请记住这一点以避免不必要的费用。
7 天后,您将被收取试用期间订阅的计划的全额费用。因此,在试用期结束前取消很重要。因忘记及时取消而提出的退款请求不被接受。
当您订阅 API 免费试用时,您可以进行最多 50 次 API 调用。如果您希望超出此限制进行额外的 API 调用,API 将提示您执行"开始您的付费计划"。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。
付款订单在每月 20 日至 30 日之间处理。如果您在 20 日之前提交请求,您的付款将在此时间范围内处理。
服务级别:
100%
响应时间:
181ms
服务级别:
100%
响应时间:
255ms
服务级别:
100%
响应时间:
522ms
服务级别:
100%
响应时间:
0ms
服务级别:
100%
响应时间:
887ms
服务级别:
100%
响应时间:
568ms
服务级别:
100%
响应时间:
608ms
服务级别:
100%
响应时间:
2,702ms
服务级别:
100%
响应时间:
1,882ms
服务级别:
100%
响应时间:
271ms