How to Query County Parcel Data by APN via ArcGIS REST API
You have an APN, from a mailer, a title report, a recorded deed, and you need the parcel record behind it: situs address, geometry and, where the county publishes it, assessed value. The county's ArcGIS REST layer can answer that in one request. The problem is that the APN printed on your document and the APN stored in the GIS layer are frequently not written the same way, and a WHERE clause that doesn't match the stored format returns zero rows with no error to tell you why. This guide covers the exact syntax, using a live San Diego County endpoint, where the majority of APN-specific searches on this site originate, plus a second county where the same field behaves differently.
Already have the endpoint and just need to search it? The Parcel Lookup Tool picks a likely APN field on a county's ArcGIS layer as its default search field, then searches for exactly what you type, matching it anywhere in the field. It does not strip dashes or leading zeros, so enter the APN the way the layer stores it. Paste the URL, paste the APN.
Endpoint and Field, Two Prerequisites
An APN query needs the same two things as any ArcGIS REST query: the layer's URL, ending in /MapServer/0 or /FeatureServer/0, and the exact field name the county uses for the parcel number. If you don't have the URL yet, How to Find Any County's ArcGIS Parcel Layer URL covers discovery from scratch, and the Parcel REST Atlas has 510 counties pre-verified (4 of those cover only part of their county, Providence County RI among them). This guide picks up once you have a URL and need the field mechanics specific to parcel numbers, which differ from owner-name search in one important way: the field almost always exists (every parcel has a number; not every county publishes owner names), but its stored format is inconsistent in a way that silently breaks the obvious query.
The Gotcha: Display Format vs. Stored Value
Most counties show the public a formatted APN, dashes separating the map book, page, and parcel segments, sometimes a leading zero on the book number. That formatted string is a display convention. What the GIS layer stores in its APN field is a separate design decision made by whoever built that county's database, and it does not always match the display format.
San Diego County is the clearest live example, and the county behind the largest single cluster of APN-related searches landing on this site. The county's tax bill and its public-facing SanGIS lookup show APNs as 123-456-78-00: map book, page, parcel, sub-parcel. Query the county's public ArcGIS parcel layer for that exact string and nothing can match, because the APN field holds ten characters and this value has thirteen:
https://gis-public.sandiegocounty.gov/arcgis/rest/services/cosd_warehouse/parcels_all_for_public_use/MapServer/0/query
?where=APN='498-260-39-00'
&outFields=APN,SITUS_ADDRESS
&f=json
# No feature can match: the field stores 10 characters, this value has 13.
webmaps.sandiego.gov/.../GeocoderMerged/MapServer/1 service, which used to publish OWN_NAME1. As of the atlas’s 17 September 2026 probe, any request to that service naming OWN_NAME1, OWN_NAME2, or OWN_NAME3 returns ERROR 400: Failed to execute query, while the same request without them answers normally, and its metadata still advertises displayField: "OWN_NAME1", so nothing in the published field list warns you. The examples on this page use the County of San Diego’s own public parcel layer, which carries APN, situs and acreage fields only: the county redacts owner name, mailing address, sale date and assessed value on its public parcel layers. If you copy an older query and get an HTTP 400, that is a withdrawn field, not an APN formatting problem.
Append ?f=json to the layer URL and read the field descriptor, and the reason is right there. APN is an esriFieldTypeString, length 10, no dashes stored:
{
"name": "APN",
"type": "esriFieldTypeString",
"alias": "APN",
"length": 10
}
Query the same parcel with the dashes stripped and the flat 10-digit string this field holds:
https://gis-public.sandiegocounty.gov/arcgis/rest/services/cosd_warehouse/parcels_all_for_public_use/MapServer/0/query
?where=APN='4982603900'
&outFields=APN,SITUS_ADDRESS,SITUS_STREET,SITUS_SUFFIX
&f=json
That returns one feature: APN 4982603900, situs 1640 CHASE LN (SITUS_ADDRESS is the house number). Same parcel, same county, two representations of the number, only one of which the field will match.
535-210-12, 5352101200, and 53344305 in the same session pattern, dashes on, dashes off, digit counts varying. That's a searcher hitting the exact failure mode above and retyping the number every way they can think of, not a data problem. The fix is always the same: read the field descriptor, match its stored format exactly.
Constructing the WHERE Clause
Once you know the field name and its stored format, the clause itself is simple SQL, the same syntax used across every ArcGIS REST query regardless of field:
| Goal | WHERE clause |
|---|---|
| Exact match, string field | APN='4982603900' |
| Exact match, integer field | APN=4982603900 (no quotes) |
| Starts with (find all sub-parcels) | APN LIKE '498260%' |
| Multiple APNs in one request | APN IN ('4982603900','4982604500') |
The quotes matter and depend on the field's declared type, string or numeric, which is exactly what the ?f=json field descriptor tells you before you guess. Quoting a numeric field, or leaving quotes off a string field, produces an ArcGIS error rather than an empty result, which at least tells you something is wrong, unlike the dashed-format mismatch above, which fails silently.
The LIKE prefix pattern deserves its own note. Truncating an APN to its map-book-and-page prefix and matching with a trailing % returns every parcel on that page, which in a book-page system means geographic neighbors. Against the San Diego County layer, APN LIKE '498260%' AND UPPER(SITUS_STREET) LIKE UPPER('%CHASE%') returns 34 parcels on Chase streets that share that book and page, in one request. Useful when you have a partial APN, or when you want the parcels adjacent to a known one for a small radius-style check without a full spatial query.
Worked Examples: Two Counties, Two Storage Conventions
San Diego County, California: dashes stripped
Layer: gis-public.sandiegocounty.gov/arcgis/rest/services/cosd_warehouse/parcels_all_for_public_use/MapServer/0, the County of San Diego’s public parcel layer. The county publishes both a full 10-digit APN field and an APN_8 field holding just the first 8 digits (map book, page, and parcel, without the sub-parcel suffix). Both are strings with no separators. A full worked query, exact match:
https://gis-public.sandiegocounty.gov/arcgis/rest/services/cosd_warehouse/parcels_all_for_public_use/MapServer/0/query
?where=APN='4982603900'
&outFields=APN,APN_8,SITUS_ADDRESS,SITUS_STREET,SITUS_SUFFIX,SITUS_ZIP
&returnGeometry=false
&f=json
The San Diego County atlas page documents this county layer and its search fields (APN, APN_8, the situs fields and ZIP). It has no owner, mailing-address, sale-date or assessed-value fields. To narrow a partial match, pair the APN LIKE prefix with a situs field: APN LIKE '498260%' AND UPPER(SITUS_STREET) LIKE UPPER('%CHASE%'). San Diego County APN Lookup: Owner, Property Tax Assessment & Deed History covers the tax bill and deed-history side, including which routes still answer an ownership question and what changed at the Recorder's office in December 2024.
Cook County, Illinois: dashes kept
Cook County runs the opposite convention. Its public layer exposes PIN14_dash, a string field where the 14-digit PIN is stored with its dashes, matching the format printed on tax bills and deeds:
https://gis12.cookcountyil.gov/traditional/rest/services/CookViewer3Parcels/MapServer/0/query
?where=PIN14_dash='33-32-301-001-0000'
&outFields=PIN10,PIN14_dash,street_address
&returnGeometry=false
&f=json
That query matches on the first try, dashes and all, because Cook County's database schema kept the display format as the stored format. The same layer also carries a dash-free PIN10 field for the compact 10-digit form. There's no way to know in advance which convention a given county chose; the field descriptor at ?f=json is the only reliable source. Cook County's public layer does not expose an owner-name field; see the owner-name query guide for where Cook County ownership data lives, and how to query a county's Socrata portal for a scriptable path to it.
Common Gotchas
Leading zeros vanish in spreadsheets
If a script or spreadsheet auto-types a numeric-looking APN as a number, leading zeros disappear and the string no longer matches the stored field. Keep APNs as text end to end: format the column as Text in Excel before pasting, or quote the value as a string in code. What is an APN? covers this failure mode in more detail, it also breaks tax-bill lookups, not just REST queries.
Short-form and long-form fields aren't interchangeable
San Diego's APN_8 and full APN are both valid, but they answer different questions. APN_8 matches at the parcel level and can return more than one row when sub-parcels exist (condos, split lots). If you need exactly one record, query the full field. If you're not sure a sub-parcel suffix exists for a given property, query the 8-digit prefix with LIKE and inspect what comes back.
Integer-typed APN fields truncate on paste
Some counties, unlike San Diego and Cook, type their parcel-number field as esriFieldTypeInteger rather than string. On those layers, a leading zero in the source APN was already dropped when the county built the layer, and no client-side fix restores it. Check the field's type in ?f=json; if it's an integer type, query without quotes and without a leading zero.
maxRecordCount caps a broad LIKE search
A very short LIKE prefix, two or three digits, can match more parcels than the layer's maxRecordCount (commonly 1,000 or 2,000) allows in one response. If your prefix search looks truncated, narrow the prefix or add resultOffset pagination, covered in the owner-name guide's pagination section.
Easier Path: The Parcel Lookup Tool
The Parcel Lookup Tool reads a county's field descriptor for you and picks a likely APN field as the default search field. It then sends UPPER(field) LIKE UPPER('%your text%') with exactly what you typed, so it matches your text anywhere in the field and a partial APN works. It does not strip dashes or leading zeros. Enter the APN in the format the layer stores, as the field descriptor shows, or the display-versus-stored mismatch above will still return nothing.
For a mailing list built from a set of APNs rather than a single lookup, the Radius Notice Mailing List Generator combines a spatial buffer with owner and mailing-address field detection in one pass.
APN Query FAQ
What is the correct WHERE clause to search a county ArcGIS layer by APN?
Match the field's stored format exactly: APN='4982603900' for a string field storing digits only, or APN=4982603900 without quotes for an integer field. Confirm both the field name and its type by appending ?f=json to the layer URL and reading the fields array before writing the query.
Why does my APN query return zero results even though the parcel exists?
The most common cause is a format mismatch between the APN as printed on a tax bill or deed (often dashed, e.g. 498-260-39-00) and the flat string the GIS layer stores (e.g. 4982603900). Strip separators and leading formatting to match the field's real stored value, confirmed by reading a live record via ?f=json or a WHERE 1=1 test query.
Does the APN field store dashes?
It depends on the county; there's no universal rule. San Diego County's APN field stores a flat 10-digit string with no separators. Cook County's PIN14_dash field stores the 14-digit PIN with dashes included, matching its tax-bill format. Always verify against the specific layer rather than assuming either convention.
Can I search by a partial APN?
Yes, with a LIKE wildcard: APN LIKE '498260%' matches every parcel whose APN starts with that prefix. In book-page-based systems like San Diego's, a shared prefix usually means the parcels are geographic neighbors on the same map page.
Is APN the same field as PIN?
They're the same concept under different regional names. States that use "PIN" (Parcel Identification Number), notably Illinois and parts of the Midwest, do so instead of "APN," not in addition to it. The What is an APN? article covers naming and format differences by state.
How do I query multiple APNs in a single request?
Use IN: APN IN ('4982603900','4982604500','4982602500'). This returns all matching parcels in one round trip rather than one request per APN, useful when you're resolving a batch from a spreadsheet.
Skip the field-type guessing. Paste your county's ArcGIS endpoint and search by APN directly.
Covered counties
Each atlas page documents the exact parcel-number field name and whether it stores separators, plus a working sample query you can copy and adapt.
- San Diego County, CA
- Los Angeles County, CA
- Orange County, CA
- Sacramento County, CA
- Cook County, IL
- Kane County, IL
- DuPage County, IL
- Miami-Dade County, FL
- Harris County, TX
- Tarrant County, TX
- King County, WA
- Maricopa County, AZ
Related Resources
- San Diego County APN Lookup: Owner, Property Tax Assessment & Deed History: once the WHERE clause works, this guide covers the assessed-value, tax-bill, and deed-history systems the same APN unlocks
- What is an APN (Assessor's Parcel Number)?: formats by state, why they vary, and how construction encodes map book, page, and parcel
- How to Query County Parcel Data by Owner Name via ArcGIS REST API: the same WHERE-clause mechanics, applied to owner search instead of APN
- How to Find Any County's ArcGIS Parcel Layer URL: locating the endpoint before you query it
- Understanding Parcel Data Fields: Owner, Situs, APN & More: glossary of field names and what they hold
- How to Query a County's Socrata Open-Data API: for counties whose ownership data lives outside ArcGIS entirely
- Parcel REST Atlas: catalogued endpoints and field names for counties across the U.S.