University of Southern California
Site Index Contact Login Sign up RSS
USC College of Letters, Arts & Sciences  
USC GIS Research Laboratory
Geocoding Web Service

The USC Geocoder can be used from desktop and/or web applications via the Geocoding Web Service interfaces listed below. The only required information is the API key, which is available in your account profile page. You may want to read the technical details and the known bugs.

API Version - 2.0

Available Web Services


API #1 - .Net Geocode Web Service




API #2 - HTTP Geocode Web Service (Non-parsed)


  • API for non-parsed address data that can be used from scripts and http
  • API URL

    https://webgis.usc.edu/Services/Geocode/WebService/GeocoderWebServiceHttpNonParsed.aspx?

    API Input Fields

    Parameter Required Description Example Possible Value
    apiKey true Click here for your API key api-key-value some text
    version true api version 2.0 2.0
    streetAddress false non-parsed street address value 3620 North Vermont Ave W. some text
    city false city value Beverly Hills some text
    state false state value CA some text
    zip false zip code value 90089 some text
    verbose false output full details true true, false
    format false output format csv csv, tsv, xml

    API Output Fields and Index (for non-XML output)

    Position Field Required Description
    0 TransactionId true query id
    1 QueryStatusCodeValue true result code
    2 QueryStatusCodeName true result code name
    3 Latitude true decimal degree
    4 Longitude true decimal degree
    5 Quality true geocode quality
    6 MatchType true geocode match type
    7 TimeTaken true processing time
    8 MNumber false street number of address that matched
    9 MPre false street predirectional of address that matched
    10 MName false street name of address that matched
    11 MSuffix false street suffix of address that matched
    12 MPost false street postdirectional of address that matched
    13 MCity false city of address that matched
    14 MState false state of address that matched
    15 MZip false zip of address that matched
    16 PNumber false parsed street number
    17 PPre false parsed street predirectional
    18 PName false parsed street name
    19 PSuffix false parsed street suffix
    20 PPost false parsed street postdirectional
    21 PPostOfficeBoxType false parsed post office box type
    22 PPostOfficeBoxNumber false parsed post office box number
    23 PCity false parsed city
    24 PState false parsed state
    25 PZip false parsed zip
    26 PZipPlus2 false parsed zip+2
    27 PZipPlus3 false parsed zip+3
    28 PZipPlus4 false parsed zip+4
    29 PZipPlus5 false parsed zip+5
    30 FNumber false street number of matched feature
    31 FPre false street predirectional of matched feature
    32 FName false street name of matched feature
    33 FSuffix false street suffix of matched feature
    34 FPost false street postdirectional of matched feature
    35 FCity false city of matched feature
    36 FState false state of matched feature
    37 FZip false zip of matched feature

    Notes
    - M____: The attribute value of your input address that used in finding a reference feature
    - P____: The equivalent parsed attribute value of your input address
    - F____: The attribute value of the matched reference feature used for interpolation
  • API Examples

    Example 1 - 9355 Burton Way, Beverly Hills, ca, 90210 (CSV)

    Example 2 - 9355 Burton Way, Beverly Hills, ca, 90210 (XML)

    Example 3 - 9355 Burton Way, Beverly Hills, ca, 90210 (CSV, Verbose)

    Example 4 - 9355 Burton Way, Beverly Hills, ca, 90210 (TSV, Verbose)

    Example 5 - 9355 Burton Way, Beverly Hills, ca, 90210 (XML, Verbose)

    Example 6 - PO Box 221, Beverly Hills, ca, 90210 (XML, Verbose)

    Example 7 - PO Box 221 9355 Burton Way, Beverly Hills, ca, 90210 (CSV, Verbose)



API #3 - HTTP Geocode Web Service (Non-parsed) with Advanced Options


  • API for non-parsed address data that can be used from scripts and http that allows advanced options to be specified
  • API URL

    https://webgis.usc.edu/Services/Geocode/WebService/GeocoderWebServiceHttpNonParsedAdvanced.aspx?

    API Input Fields

    This API's input field set includes all of the input and output parameters from API #2 above with the additions in the following table. Each of these are described in the techincal details. The default values used here are automatically used in API #2 above.

    Parameter Required Description Values Default value
    r false whether or not to use attribute relaxation true, false true
    ratts false the attributes allowed to be relaxed; only applies if shouldUseRelaxation is true comma separated list from the following options: pre, suffix, post, city, zip pre,suffix,post,city,zip
    sub false whether or not to use substring matching true, false true
    sou false whether or not to use soundex true, false false
    h false which feature matching hierarchy to use uncertaintyBased, u, featureMatchingHierarchy, f, uncertaintyBased

    API Output Fields and Index (for non-XML output)

    The output fields for this API are the same as API #2 above

  • API Examples

    Example 1 - 9355 NE Burton Rd, Wrong City, ca, 90210 (XML, Verbose, All options false)
    - will fail to match a parcel

    Example 2 - 9355 NE Burton Rd, Wrong City, ca, 90210 (XML, Verbose, Attribute Relxation on pre,suffix,city)
    - will succeed in matching a parcel

    Example 3 - 9355 Berrton Way, Beverly Hills, ca, 90210 (XML, Verbose, All options false)
    - will fail to match a parcel

    Example 4 - 9355 Berrton Way, Beverly Hills, ca, 90210 (XML, Verbose, Soundex)
    - will succeed in matching a parcel

    Example 5 - PO Box 123, Beverly Hills, ca, 90210 (XML, Verbose, Feature matching hierarchy)
    - will match to ZIP 90210 (ZIP comes before city in the feature matching hierarchy)

    Example 6 - PO Box 123, Beverly Hills, ca, 90210 (XML, Verbose, Uncertainty hierarchy)
    - will match to city Beverly Hills (smaller area = less geographic uncertainty = more accurate geocode)

Quick Links: Home | Services | Databases | Support | About | Site Map | Contact