# swiftcomplete llms.txt ## **Swiftcomplete Address Autocomplete API (v1)** The **Address Autocomplete API** by Swiftcomplete is a RESTful API that provides fast, accurate postal address autocomplete and validation. It supports searching for traditional addresses, what3words addresses, postcodes, and more—returning precise and structured address suggestions in real time as users type. It is ideal for improving form accuracy, reducing input errors, and enhancing location-related UX across web and mobile platforms. --- **General Notes:** - **Base URL:** https://api.swiftcomplete.com/v1 - **Authentication:** API requests must include a valid API key as a query parameter (key=xxxx). You can generate a key via your [Swiftcomplete account](https://www.swiftcomplete.com/account/api)’s API section. - **Error Handling:** - Returns standard HTTP status codes: 200, 400, 401, 403. - A structured JSON object is returned for errors, including: - parameter: the affected query param - description: human-readable explanation - resolutionExamples: suggestions for fixing the issue - **Quota and Usage Limits:** - Usage plans vary (free vs. paid) - Free trials are limited and return a 403 when expired - Rate limits and quotas per plan are enforced; exceeding them leads to error responses (likely 429) - **Live Demo:** [https://www.swiftcomplete.com/](https://www.swiftcomplete.com/) - **Pricing Details:** For pricing details visit: 👉 **[Pricing Page](https://www.swiftcomplete.com/#pricing)** --- ## 📚 API Documentation - [API Overview](https://www.docs.swiftcomplete.com/openapi.yaml) - [LLMs Text](https://www.docs.swiftcomplete.com/llms.txt) - [LLMs Full Text](https://www.docs.swiftcomplete.com/llms-full.txt) - [Postman collection](https://www.docs.swiftcomplete.com/swiftcomplete.postman_collection.json) ### Plugins Add address autocomplete to e-commerce platforms. - [Swiftcomplete Address Autocomplete - Shopify](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-shopify) – Implement address autocomplete in Shopify stores _Not yet live on developer.what3words.com. - [Swiftcomplete Address Autocomplete - WooCommerce](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-woocommerce) – Implement address autocomplete in WooCommerce stores _See also [current documentation](https://swiftcomplete.notion.site/WooCommerce-plugin-for-Swiftcomplete-1a466db17f3b8018bc4ce65f85f6c852)_ - [Swiftcomplete Address Autocomplete - BigCommerce](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-bigcommerce) – Implement address autocomplete in BigCommerce stores _See also [current documentation](https://swiftcomplete.notion.site/BigCommerce-Integration-for-Swiftcomplete-1d666db17f3b80e9bfceef1d64bea34d)_ - [Adding Swiftcomplete Address Autocomplete to E-commerce Checkout](https://developer.what3words.com/tutorial/adding-swiftcomplete-address-autocomplete-to-ecommerce-checkout/) – General guide for adding address autocomplete to e-commerce platforms _Not yet live on developer.what3words.com. See [current documentation](https://swiftcomplete.notion.site/Swiftcomplete-Integration-Docs-1a466db17f3b80a18a63dced29d4cfb5)_ - [Swiftcomplete Address Autocomplete - Ecwid](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-ecwid) – Implement address autocomplete in Ecwid stores _See also [current documentation](https://swiftcomplete.notion.site/Ecwid-Integration-for-Swiftcomplete-1f466db17f3b800a95ffef566d22b0f4)_ ### Web and Mobile Components Implement address autocomplete in custom applications. - [Swiftcomplete Address Autocomplete - JavaScript Component](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-javascript-component) – Add address autocomplete to websites and web applications _See also [current documentation](https://www.notion.so/Swiftcomplete-Swiftcomplete-API-JavaScript-1a066db17f3b8076bc67f00c1ca24742?pvs=4)_ - [Swiftcomplete Address Autocomplete - iOS Component](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-ios-component) – Add address autocomplete to iOS applications _Not yet live on developer.what3words.com. - [Swiftcomplete Address Autocomplete - Android Component](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-android) – Add address autocomplete to Android applications _Not yet live on developer.what3words.com. ### API Direct API access for address autocomplete. - [Swiftcomplete Address Autocomplete API](https://developer.what3words.com/tutorial/swiftcomplete-address-autocomplete-api) – Integrate address autocomplete via direct API calls --- ## 📦 Public Repositories - **API & Developer Docs**: [swiftcomplete-api-docs](https://github.com/swiftcomplete-public/swiftcomplete-api-docs) - **WooCommerce Plugin**: [swiftcomplete-woocommerce](https://github.com/swiftcomplete-public/swiftcomplete-woocommerce) --- ### **Endpoints** **`/swiftlookup/`** - **Description:** Provides real-time address, postcode, and what3words suggestions based on user input. - **Method:** `GET` - **Parameters:** - **`key`** (required, string, query): API key for Swiftcomplete Address Autocomplete. - **`text`** (optional, string, query): A full or partial search term such as a postcode, street, city or what3words address. - **`biasTowards`** (optional, string, query): The API will prioritize results near your approximate location (determined by your IP address) if this parameter is not provided. Either a what3words location (only if what3words has been enabled on this API key, in the format "///word1.word2.word3") or a WGS84 coordinate (in the format "latitude,longitude"). - **`container`** (optional, string, query): Restricts the search to a specific container (e.g., traditional address, postcode, coordinates). Examples: "V1;65|ALFRED Road|LONDON|W2;51.521198;-0.196309" - **`searchFor`** (optional, string, query): A comma-separated list of result types to filter results. Type of data to search for: "address", "what3words", "place", "road", "transit". Examples: "what3words,address,place" - **`countries`** (optional, string, query): Comma-separated list of ISO 316601 alpha-2 country codes to restrict search within. If the parameter is not provided the API will search for all the available countries. Examples: "gb" - **`maxDistance`** (optional, string, query): Limits the search to a maximum distance (in meters) from the biasTowards location. Examples: "-1" - **`maxResults`** (optional, string, query): Maximum number of results to display (in general are between 1-5) - 5 (for traditional address), - 3 (for what3words address), - 100 (for container of traditional address) Note: If the results are more than `maxResults=100` than `pageFrom` parameter needs to be used to loop the results per 100 records. - **`populateIndex`** (optional, string, query): Index for populating the autocomplete field. Used to obtain detailed information about a result in the response array. Examples: "1" - **`populateLineCount`** (optional, string, query): Number of lines of the full address. Max 7. - **`distanceUnits`** (optional, string, query): Unit of measurement for distance display. - `metric` → Return distance in kilometres, unless under 1km in which case metres are returned - `imperial` → Return distance in miles, unless under 0.1 miles in which case feet are returned - `km` - `feet` - `miles` - **`groupResults`** (optional, boolean, query): Used when nothing is being typed on the search field. Only when the query is empty. Examples: "true" - **`lineFormat0`** - **`lineFormat6`** (optional, string, query): Line formatting for the full address selected by the populateIndex. Examples: "Company", "SubBuilding, BuildingName", etc. - **`pageFrom`** (optional, string, query): Specifies the starting index for paginated results. Examples: "2" - **Errors:** The OpenAPI specification defines the following error responses for the `/swiftlookup/` endpoint: - Error object: - `parameter`: affected parameter - `description`: human-readable issue - `resolutionExamples`: suggested fixes | HTTP Code | Description | | --- | --- | | 400 | Invalid w3w bias input | | 400 | Incorrect `biasTowards` format | | 400 | `maxResults` is invalid | | 401 | No API key provided | | 403 | Free tier access expired | | 429 | Rate limits and quotas per plan are enforced; exceeding them leads to error responses | - **Quota and Rate Limiting:** - Based on pricing tier - Free trials expire (403) - Rate limits per plan (429 when exceeded) - **API Usage:** - How frequently is the API being called?: Called on each user keystroke in autocomplete fields. Addresses have been validated with an average latency of 6ms. - What are the key parameters being used in the API calls?: key(required), text(required??), biasTowards, container, searchFor, countries, maxDistance, maxResults, populateIndex, populateLineCount, distanceUnits, groupResults, lineFormat0-6, pageFrom. - Are there any specific considerations or optimisations for API usage? - Use populateIndex to resolve full address only after user selects a result - Minimise repeated calls by delaying input triggers - Bias towards known coordinates and what3words address to improve relevance - If the results are more than `maxResults=100` than `pageFrom` parameter needs to be used to loop the results per 100 records. # UI Components Source: [https://swiftcomplete.notion.site/Swiftcomplete-Integration-Docs-1a466db17f3b80a18a63dced29d4cfb5](https://www.notion.so/1a466db17f3b80a18a63dced29d4cfb5?pvs=21) ## 1. JavaScript Searchbox & Autocomplete - **URL**: [https://swiftcomplete.notion.site](https://swiftcomplete.notion.site) - **Description**: Learn how to integrate the Swiftcomplete Address Autocomplete JavaScript component into a website. Covers setting up the API key, initialising the control, setting parameters such as `searchFor`, `populateLineFormat`, and handling custom events like `swiftcomplete:swiftlookup:selected`. Useful for developers integrating location search into web platforms. ## 2. WooCommerce Address Autocomplete - **URL**: [https://swiftcomplete.notion.site/WooCommerce-plugin-for-Swiftcomplete-1a466db17f3b8018bc4ce65f85f6c852](https://swiftcomplete.notion.site/WooCommerce-plugin-for-Swiftcomplete-1a466db17f3b8018bc4ce65f85f6c852) - **Description**: A step-by-step guide to integrating Swiftcomplete address autocomplete into WooCommerce checkout forms. Includes plugin setup, JavaScript binding, overriding default WooCommerce address fields, and customising `lineFormat` to include what3words if enabled. ## 3. BigCommerce Integration for Address Autocomplete - **URL**: [https://swiftcomplete.notion.site/BigCommerce-Integration-for-Swiftcomplete-12345abcdefg](https://swiftcomplete.notion.site/BigCommerce-Integration-for-Swiftcomplete-12345abcdefg) - **Description**: Walkthrough for adding Swiftcomplete to BigCommerce checkout and account pages. Demonstrates how to insert the Address Autocomplete JavaScript component and ensure address lines are populated using Swiftcomplete’s API. It also explains how to bias results using the customer’s geolocation and apply component-level configuration. ## Tools & Guides - [Integration Guide (Notion)](https://www.notion.so/1a466db17f3b80a18a63dced29d4cfb5?pvs=21) - [Support](mailto:support@swiftcomplete.com) --- ## UI Integrations ### 1. Swiftcomplete Address Autocomplete API (JavaScript) - 📘 [Docs](https://swiftcomplete.notion.site/) - 🧠 Description: The Address Autocomplete API provides realtime address suggestions as you type, eliminating typos and mistakes and reducing the time it takes to find accurate postal addresses. ### Data Coverage - **Supported Country**: United Kingdom (🇬🇧) ### Authentication To use the Address Autocomplete API: 1. Sign in or register: [https://www.swiftcomplete.com/account/](https://www.swiftcomplete.com/account/) 2. Generate your API key at: [https://www.swiftcomplete.com/account/api/](https://www.swiftcomplete.com/account/api/) ### Integration Options - JavaScript integration on websites and checkouts - WooCommerce Plugin integration ### JavaScript Integration Steps **Step 1: Load Swiftcomplete JS** ```html ``` **Step 2: Attach Address Autocomplete to Field** Replace placeholders with your API key and textbox ID. Now copy this script and paste it directly after the previous code snippet, before the closing `
` tag. To get the script running, replace `INSERT_KEY_HERE` with your Address Autocomplete API key, and replace `INSERT_TEXT_FIELD_ID_HERE` with the ID of an existing textbox on your page. The script initialises Address Autocomplete on your existing textbox, restricts searching to Great Britain and logs the record and coordinates to the developer console when you select a result from the list of autocomplete suggestions. ```jsx ``` **Step 3: Test Integration** Log selected address and coordinates to developer console. ### Migration Guide - Replaces legacy swiftcomplete.js with swiftlookup.js - Updated CSS: swiftlookup.css - Deprecated assets no longer supported ### Attributes Customise autocomplete with these parameters: | Parameter | Example | Type | Description | | --- | --- | --- | --- | | key | 'xxxxxxx' | String | API key | | field | 'input-id' | String | HTML input element ID | | searchFor | 'what3words,address,place' | String | Result types | | emptyQueryMode | 'prompt' | String | Behaviour when empty | | scrollToFieldOnFocus | true | Boolean | Scroll to input on focus | | populateLineCount | 5 | Number | Number of address lines | | populateLineFormat | [ ] | Array | Format lines to populate fields | | hideOnEmptyResults | false | Boolean | Hide dropdown if empty | | requestDeviceLocation | true | Boolean | Request geolocation | | showControlAfterPermissions | true | Boolean | Show after geolocation allowed | | text | 'London' | String | Initial search value | | promptText | 'Type your address...' | String | Prompt text | | noResultsText | 'No results found' | String | No result fallback | | manualEntryText | 'Enter manually' | String | Manual entry prompt | ### Available Types for `searchFor` - **what3words** - **address** - **place** - area, settlement - **road** - **transit** - airport, metro, railway, tram (incl. specific city tram systems) ### Functions Manipulate behaviour post-init: | Function | Example | Description | | --- | --- | --- | | setMaxAutocompleteResults | 5 | Max general suggestions | | setMaxContainerResults | 100 | Max container results | | setSearchFor | 'address' | Limit result types | | setCountries | 'gb' | ISO country restriction | | setMaxDistance | 3000 | Radius limit in meters | | biasTowards | '///filled.count.soap' | Bias by W3W/coords | | getDeviceLocation | true | Ask for location | | setTextSearchOptions | {...} | Override text options | | getAddressAutocompleteCoverage | - | Return supported countries | | hasAddressAutocompleteCoverageForCountry | 'gb' | True/false check | | setReactFieldValue | el, value | Update value in React apps | ### Events Integrate with business logic: | Event | Trigger | Description | | --- | --- | --- | | swiftcomplete:swiftlookup:selected | Result selection | Data about selected record | | swiftcomplete:suggestion | On suggest | Suggestion list fetched | | swiftcomplete:userLocation | Geolocation allowed | Returns coordinates | | swiftcomplete:swiftlookup:manualentry | Manual entry click | Trigger for manual mode | ### Troubleshooting Need help? Contact: [support@swiftcomplete.com](mailto:support@swiftcomplete.com) ### 2. Swiftcomplete: WooCommerce Plugin for Address Autocomplete - 📘 [Docs](https://www.notion.so/1a466db17f3b8018bc4ce65f85f6c852?pvs=21) - 🧠 Description: The Swiftcomplete Address Autocomplete Plugin for WooCommerce adds real-time address autocomplete to billing and shipping fields during checkout. This integration helps capture accurate postal addresses, reduces errors, enhances user experience, and improves conversion rates. --- ## 🧩 Plugin Features - Realtime postal address autocomplete - what3words address input field (optional) - Optional state / UK county auto-fill - Address field visibility toggle - Localised biasing via postcode or town - Custom labels and placeholder text for billing/shipping fields --- ## 🛠 Prerequisites ### 1. Access to WordPress Dashboard You must have admin access to your WordPress Dashboard to install and activate the plugin. If you do not have access, send this guide to your developer. ### 2. Swiftcomplete Account - [Create a Swiftcomplete account](https://www.swiftcomplete.com/woocommerce/sign-up/) - [Log in to your existing account](https://www.swiftcomplete.com/account/login/) --- ## 🧪 Installation 1. **Download** the plugin ZIP from: [Download Address Autocomplete Plugin](https://www.swiftcomplete.com/woocommerce/download/) 2. In WordPress Admin: Go to **Plugins → Add New → Upload Plugin** 3. **Select** the downloaded `.zip` file (do not unzip). 4. Click **Install Now** → **Activate Plugin** Once activated, the widget will appear in both billing and shipping address fields at checkout. --- ## ⚙️ Plugin Settings Settings can be configured from the plugin settings page after installation. Options include: ### ➕ Enable what3words Adds a dedicated what3words field on the checkout page. This helps deliver to precise 3m x 3m squares even when traditional addresses are unreliable. ### 👀 Hide address fields until a selection is made Only show address input fields after a valid address suggestion is selected from autocomplete. Reduces clutter and prevents invalid entries. ### 🧭 Return UK counties / international states Enable region-specific information (like counties, states, or provinces) to be returned as part of the address record. ### 📍 Location Biasing Biases autocomplete suggestions toward a preferred location (e.g., postcode, city). Improves result relevance. If left empty, IP-based biasing will apply. ### ✍️ Custom Search Field Labels & Placeholders Modify labels and placeholder prompts to suit your branding and UX tone. ### Billing Field: - **Label** (e.g., “Billing Address”) - **Placeholder** (e.g., “Type your address or what3words”) ### Shipping Field: - **Label** (e.g., “Shipping Address”) - **Placeholder** (e.g., “Search delivery location”) --- ## ❓ Troubleshooting If you're experiencing issues with plugin setup or address lookups: - Ensure your API key is valid and has not expired. - Check browser console logs for JavaScript errors. - Verify that the plugin is active and properly installed. Contact support: 📩 [support@swiftcomplete.com](mailto:support@swiftcomplete.com) --- ## 📦 Plugin Metadata | Property | Value | | --- | --- | | Plugin Name | Swiftcomplete for WooCommerce | | Plugin Size | ~7kb | | Dependencies | WooCommerce | | Compatibility | WordPress (latest), WooCommerce (latest) | | Requires Configuration | Yes — requires API key and optional custom settings | | Source Code | Proprietary (distributed as installable plugin ZIP) | | License | Swiftcomplete Commercial Terms | --- ### 3. Swiftcomplete: BigCommerce Integration for Swiftcomplete - 📘 [Docs](https://www.notion.so/1d666db17f3b80e9bfceef1d64bea34d?pvs=21) - 🧠 Description: The Swiftcomplete Address Autocomplete Plugin for BigCommerce integrates address autocomplete into billing and shipping fields in the checkout experience. It improves form accuracy, accelerates address entry, and supports what3words integration. --- ## 🛠 Prerequisites ### 1. BigCommerce Dashboard Access You need admin access to the BigCommerce dashboard with permissions to configure the Script Manager. ### 2. Swiftcomplete API Key - [Create a Swiftcomplete account](https://www.swiftcomplete.com/account/register) - [Login to your Swiftcomplete dashboard](https://www.swiftcomplete.com/account/login) - Generate a Address Autocomplete API key from the API section. --- ## 🔧 Integration Steps ### Step 1 – Open Script Manager Navigate to `Sidebar → Storefront → Script Manager`. ### Step 2 – Create a Script Select `Create a Script`. Configure it with the following: - **Placement:** `header` - **Location:** `Checkout` - **Script Category:** `Essential` - **Script Type:** `Script` ### Step 3 – Add the Swiftcomplete Script Paste the Address Autocomplete script snippet into the Script Contents field. This includes: - Initialising the JS SDK via CDN (`swiftlookup.js`) - Creating the dynamic `` for the address finder - Populating address fields with selected record - Optionally including a `what3words` custom field (if added in admin) ```jsx