# How to add Webflow autocomplete based on an external database

DevFeed: [How to add Webflow autocomplete based on an external database](<https://devfeed.tech/articles/how-to-add-webflow-autocomplete-based-on-an-external-database-109639.md>)

Original publisher: [Read original article](<https://www.webflow.com/blog/webflow-autocomplete-external-database>)

Author: Ismail Ajagbe

Published: 2026-09-25T00:00:00Z

Content type: tutorial

Language: en

Sources: [Webflow Blog](<https://devfeed.tech/sources/webflow-blog.md>)

Topics: [webflow](<https://devfeed.tech/topics/webflow.md>), [Database](<https://devfeed.tech/topics/database.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>)

Tags: [autocomplete](<https://devfeed.tech/tags/autocomplete.md>), [build](<https://devfeed.tech/tags/build.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [database](<https://devfeed.tech/tags/database.md>), [external](<https://devfeed.tech/tags/external.md>), [field](<https://devfeed.tech/tags/field.md>), [guides](<https://devfeed.tech/tags/guides.md>), [handler](<https://devfeed.tech/tags/handler.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [lookup](<https://devfeed.tech/tags/lookup.md>), [route](<https://devfeed.tech/tags/route.md>), [webflow](<https://devfeed.tech/tags/webflow.md>)

## AI overview

Build Webflow autocomplete by routing a page script through a Next.js 15+ GET handler on Webflow Cloud to an external database. First define and test a query contract returning capped JSON ID/name pairs; keep database credentials in server environment variables and normalize results to label/value pairs. The page script calls the mounted path, debounces typing, aborts stale requests, and stores the selected ID separately from the visible label. Deployment needs Node.js/npm, a compatible Webflow plan for custom page code, and Premium or higher to mount on a custom domain. Leave Next.js's edge runtime target unset because the deployed OpenNext Cloudflare adapter does not support it. Page-side debounce and query limits do not prevent direct endpoint abuse; add server-side rate limiting and upstream quotas. An alternative is a vendor-hosted widget with a safe public read-only key, which avoids Webflow Cloud but uses the vendor's markup and rate limits.

## Source excerpt

Learn how to build a Webflow lookup field that pulls suggestions from your external database through a Route Handler on Webflow Cloud.