---
title: Migrating to API integration
description: Migrate from LBX script driven integration to direct API integration without interrupting production.
slug: guidelines/lbx-to-be
docKind: guide
hub: platform-foundations
---

Migrating Luigi's Box integrated services from the [LBX script](/platform-foundations/lbx-script/) to direct API integrations is generally a low-risk change when you phase it carefully.

## Recommended rollout

1. Request a modified LBX script.
2. Deploy that modified script only in development and testing.
3. Implement and validate the new API integration.
4. Release the API integration to production, then disable the overlapping frontend service.

## Step 1: Request a modified LBX script

Contact Luigi's Box support and ask for an LBX script variant with the service you are migrating disabled.

Example:
- If you are moving recommendations to backend API calls but still keeping search on the old integration, ask for an LBX script with recommendations disabled and search still active.

## Step 2: Use the modified script in non-production only

Keep the original LBX script in production while you build and test the replacement integration in development and staging. This avoids service disruption during the migration.

## Step 3: Build the API integration

Implement the API-based replacement and verify that request payloads, analytics identifiers, and returned content match the behavior you expect.

Useful references:
- [Search API](/search/api/v1/search/)
- [Recommendations API](/recommendations/api/v1/recommender/)

## Step 4: Release safely

When the API integration is ready:

1. Deploy the new code to production.
2. Keep the original production LBX script in place during rollout.
3. Use Luigi's Box emergency deactivation to disable the frontend-managed service you replaced so the old and new integrations do not overlap.

## Tips

- Use browser developer tools, especially the Network tab, to inspect what the old integration is sending today.
- Keep user identifiers and object identities consistent across the old and new integrations. Mismatched identities are a common source of broken personalization and weak recommendations.

## Related

- [Migrating feeds to the Content Update API](/indexing/feeds-to-api/)
