API & Widget
Put CollegeLens on your website.
The CollegeLens widget gives students a fast way to estimate their college funding gap, get tailored next steps, and continue into the full CollegeLens experience.
Embeddable intake + estimate flow
Powered by CollegeLens with optional co-branding
Hosted iframe with API key and domain allowlisting
Quick start
- 1. Contact CollegeLens to receive an API key and approved domain allowlist.
- 2. Add the script tag and widget container to the page where you want the tool to appear.
- 3. Publish. The loader script creates the widget session and mounts the hosted iframe automatically.
<script async src="https://collegelens.ai/embed/widget.js"></script> <div data-collegelens-widget data-api-key="YOUR_API_KEY" data-mode="plan-intake" data-theme="default" style="max-width: 560px;" ></div>
Manual mount
If you need more control, call the loader directly and pass prefilled values or a custom target.
<script async src="https://collegelens.ai/embed/widget.js"></script>
<div id="collegelens-widget"></div>
<script>
window.CollegeLensWidget.init({
apiKey: "YOUR_API_KEY",
target: "#collegelens-widget",
mode: "plan-intake",
theme: "default",
onEvent(detail) {
console.log("CollegeLens widget event", detail.eventName, detail.payload);
},
initialData: {
schoolName: "Ohio State University",
state: "Ohio"
}
});
</script>What the loader handles
Validates the API key against the allowed host domain
Creates a widget session before loading the iframe
Passes users into the hosted CollegeLens flow
Auto-resizes the iframe as the widget changes steps
Dispatches widget lifecycle events back to the host page
