You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

NYC DOB API使用问题求助:字段缺失、过滤异常及替代API推荐

Hey there, let's break down your problems with the NYC DOB API and get you sorted, plus share some solid alternatives:

1. Fixing Your Current NYC DOB API Issues

1.1 Missing Permittee Detailed Address Field

Looking at the API's response structure, the 83x8-shf7 dataset simply doesn't include a dedicated permittee address field. This is a limitation of the specific subset you're using—some NYC OpenData datasets prioritize certain fields over others.

If you need this info, your best bet is to either:

  • Link the permittee's license number (permittee_s_license__) to another DOB dataset that tracks license holder addresses, or
  • Switch to a more comprehensive DOB permit dataset that includes this field (we’ll cover alternatives below).

1.2 Incomplete Results When Filtering by filing_date

The issue here has two key causes:

  1. Time Range Mismatch: Your query starts at 2018-05-01T06:00:00, but your expected data has a filing_date of 2018-05-01T00:00:00.000—which falls outside your start time, so it gets excluded.
  2. Default Result Limits: Socrata (the platform powering NYC OpenData) caps default results at 1000 entries. If your date range has more data, you won’t see it without pagination.

Fixes to Try:

  • Adjust your filter to cover full days: Ignore time values and include all dates in your range with this query:
    https://data.cityofnewyork.us/resource/83x8-shf7.json?$where=DATE(filing_date) BETWEEN '2018-05-01' AND '2018-05-30'
    
  • Explicitly cover all hours: If you need to retain time precision, expand your range to include the full day:
    https://data.cityofnewyork.us/resource/83x8-shf7.json?$where=filing_date BETWEEN '2018-05-01T00:00:00' AND '2018-05-30T23:59:59'
    
  • Add pagination for large datasets: Use $limit and $offset to fetch batches of results. For example, to get the first 5000 entries:
    https://data.cityofnewyork.us/resource/83x8-shf7.json?$where=DATE(filing_date) BETWEEN '2018-05-01' AND '2018-05-30'&$limit=5000&$offset=0
    
    Increase the $offset value (e.g., 5000, 10000) to retrieve subsequent batches.

2. Alternative NYC DOB Permit APIs

If you need more comprehensive data (including permittee addresses), these datasets are better fits:

  • DOB Job Filings (All) (Dataset ID: ic3t-wcy2): A full dataset of all DOB job filings, including permittee address fields like permittee_s_address, permittee_s_city, and permittee_s_zip_code. It supports the same Socrata query syntax.
  • DOB Permit Issuance (Dataset ID: pvqr-7yc4): A focused dataset for issued permits with expanded contact fields for permittees, owners, and site managers.
  • DOB Approved Permits (Dataset ID: 6bgk-3dad): Includes permits that have been approved, with detailed permittee and project location data.

Example Query for Alternative API

Here’s how to fetch May 2018 permits with permittee addresses using the ic3t-wcy2 dataset:

https://data.cityofnewyork.us/resource/ic3t-wcy2.json?$where=DATE(filing_date) BETWEEN '2018-05-01' AND '2018-05-30'&$select=bin__, filing_date, permittee_s_business_name, permittee_s_address, permittee_s_zip_code

内容的提问来源于stack exchange,提问作者omkar kale

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:01:23