1 / 15

An Advanced Look at US Autocomplete Pro API

This is a deep dive into the US Autocomplete Pro API by Smarty will get you up to speed how the best address autocomplete tool in the world.<br><br>If you have forms where you're asking for an address this API will help the user validate and complete their address in no time flat.<br><br>Learn more about it here: https://www.smarty.com/products/us-address-autocomplete

Download Presentation

An Advanced Look at US Autocomplete Pro API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Overview • Integrating US Autocomplete Pro into your address forms • Using Advanced Features: • Geolocation • Preferences • Filters • Source • Selected Documentation https://www.smarty.com/docs/cloud/us-autocomplete-pro-api

  2. Integrating US Autocomplete Pro into your site If you have looked at smarty.com and have seen the US Autocomplete Pro demo and have said to yourself, "I wish I didn't have to write my own autocomplete handler to integrate with Smarty's Autocomplete thingy" — well, your wish has come true! It's all here in a JSFiddle: https://jsfiddle.net/x8eLpgm1/1/ And because you are here today, you get a bonus JSFiddle to testing: https://jsfiddle.net/smartystreets/f2mwp8ta/

  3. Advanced Features - Geolocation Provides the ability to automatically prefer the city or area where the end user's IP address is registered. Syntax: prefer_geolocation=city | none [default is city] NOTES: When set to city, the geolocated city,state is appended to the prefer_cities field. This has a tendency to override other filter parameters depending on the search results. If you get local results when you do not intend, set this to none.

  4. Advanced Features - Preferences When set, these results will occupy the top percentage (prefer_ration) of the results. Examples: prefer_ratio=75 [75% of results will be preferred. Default: 100] prefer_cities=SEATTLE,REDMOND,WA;RENO,NV prefer_states=CO;OK prefer_zip_codes=84660;90210&prefer_geolocation=none NOTES: When prefer_zip_codes is used, no other _cities or _states parameters can be used. In addition, the prefer_geolocation parameter must NOT be set to city.

  5. Advanced Features - Include Filters Allows you to only include results from the following cities, states, or ZIP codes. Examples: include_only_cities=Austin,Dallas,TX;Oklahoma City,OK include_only_states=CT;RI;NH | CONTIGUOUS | ALLSTATES include_only_zip_codes=90210;60609 NOTES: The ZIP Code filter cannot be used with any other filter.

  6. Advanced Features - Exclude Filters Allows you to prevent results from the list of states to be included in the results. Example: exclude_states=CA;WA;OR&prefer_geolocation=none NOTES: Cannot be used with any include filters. Also, prefer_geolocation=none is required or you may get local results even if the state is excluded.

  7. Advanced Features - Source Allow non-postal address results. Syntax: source=all | postal [default is postal] NOTES: Non-postals will be returned if set to all. Result: When source is explicitly used in the request, the result will contain source=other | postal depending on the data source of the address.

  8. Advanced Features - Selected The feature tells the API to return a single base address with the secondary values matching the current input. It is designed to be used by a user interface where an address is "selected" by a user in order to list its secondary values. Example: search=1042 W Center selected=1042 W Center St Apt (108) Orem UT 84057 This will return the first 100 addresses of the possible 108 secondaries for this address.

  9. Advanced Features - Selected (cont) This example returns all 24 Apartments that start with A. search=1042 W Center St Apt A selected=1042 W Center St Apt A (24) Orem UT 84057

  10. Advanced Features - Selected Parameter Format Consider a result from the search: search=1042 W Center { "street_line": "1042 W Center St", "secondary": "Apt", "city": "Orem", "state": "UT", "zipcode": "84057", "entries": 108 } If the user selects this entry in the UI, the selected parameter is constructed with the components from the result as follows: selected=1042 W Center St Apt (108) Orem UT 84057

  11. Advanced Features - Selected Parameter Format General rule: The selected parameter must always be a full address (with a full or partial secondary value), and it must have parentheses containing an integer between the secondary value and the city. Insider tip: When the selected parameter is sent, the API ignores the value of the search parameter, although it must be there and it must not be empty.

  12. Summary US Autocomplete Pro can help in many ways • Assists users when entering addresses into your system • Provide better suggestions with the preference and geolocation options • Narrow search results to pertinent areas by using filters • Search for non-postal addresses • Get secondaries for a particular address

  13. Get Accurate Address Data Try a Free Trial of US Address Autocomplete smarty.com/signup

More Related