About
Federated search lets you show your site's media on other websites in your organization, such as a video news widget on your intranet homepage or a video search box on a team portal. The Federatedsearchinteractive module lets you set up the searches that feed these widgets. It works with Content Hubs, the legacy Video Portal, and LMS Extensions.
Each search is called a search producer. A producer is a saved search with its own URL, for example, the 8 most recent videos in one channel. When the other website (the consumer) requests the producer's URL, it gets the results back as JSON data, and your developers use that data to build their own widget. They don't need to learn Kaltura to do it.
Federated search is a premium module. To add it to your site, contact your Kaltura representative.
Before you start
Make sure both of these modules are added to your site:
- Federatedsearchcore - Holds code that the federated search modules share. Its only setting is enabled.
- Federatedsearchinteractive
Enable the Federatedsearchcore module first: set enabled to Yes, and click Save. If it isn't enabled, you can't save the Federatedsearchinteractive module.
Configure
The module comes with three sample producers, which you can change or delete:
intranethomewidget- The 8 most recent media in one channel, for a video news widget on a busy page such as an intranet homepage.dashboardwidget- The 6 most recent media from the channels the user belongs to, for a personal dashboard.dashboardsearch- The 20 most viewed media from all categories and channels that aren't private, for a search box.
- Go to your Configuration Management console, locate the Federatedsearchinteractive module in the left panel, then select it. You can also navigate directly using a link:
https://{your_site_url}/admin/config/tab/federatedsearchinteractive - Set enabled to Yes, and click Save. The Generate links for the app tokens appear.
- Configure the following:
- producers - Change one of the existing producers, or click + Add "producers" to add a new one. To remove a producer, click DELETE. For each producer, configure the following:
- slug - Enter a unique name for the producer. It becomes part of the producer's URL. The module doesn't check that the name is unique, so make sure no other producer uses it.
- searchFor - Leave as Entries. It's the only option.
- enableLocalCache - Select Yes to keep results in a cache for longer, so they load faster but might not be the latest. Select No if the producer returns personalized results for each user, so the results are always fresh. Tip: Leave this set to No until your developers finish building the widget.
- limitToItemsNum - Enter the number of media to return. The maximum is
50. - sortBy - Select the order of the results: Most Recent, Most Viewed, Most Liked, or Alphabetical.
- searchIn - Select where to search:
- All Non-Private Categories/Channels - All published content on your site.
- Only Specific Category/Channel - One category or channel, which you select in
limitToCategoryOrChannel. - Only Categories/Channels Relevant to User - The categories and channels the user manages, belongs to, or subscribes to. For this to work, your developers must include the user's ID when they create the Kaltura Session (KS). If they don't, or if the user doesn't belong to any channels, the producer searches all categories and channels that aren't private.
- limitToCategoryOrChannel - Appears when
searchInis set to Only Specific Category/Channel. Select the category or channel to search in. It must be under your site's root category. - includeExtraMetadata - Select any extra information to include with the results: # Views, # Likes, or Custom Data. Custom Data includes only the fields in the metadata profile set in the Customdata module. Extra information can make the results load more slowly.
- stickyEntryId1, stickyEntryId2, stickyEntryId3 - Optional. Enter the entry IDs of up to three media that always appear first, before the other results.
- allowURLOverride - Select the settings your developers can change in the producer's URL: limitToItemsNum, sortBy, or limitToCategoryOrChannel. For example, select sortBy if the widget lets users choose how to sort the results. If you select limitToCategoryOrChannel, give your developers the IDs of the categories and channels they can use.
- appTokenId - Click Generate to create an app token for this producer. The ID appears in this field, and the value appears in
appTokenValue. The app token can reach only the content allowed insearchInandlimitToCategoryOrChannel. If you already have an app token, you can enter its ID and value instead. - showOnlyVideoType - Select No to include all media types (video, audio, and images), or Yes to include only video.
- producers - Change one of the existing producers, or click + Add "producers" to add a new one. To remove a producer, click DELETE. For each producer, configure the following:
- Click Save. If you leave the page without saving, the app tokens aren't kept.
The Federatedsearchinteractive page displays.

Test a producer in the playground
The playground lets you see what a producer returns before you hand it to your developers. It also creates sample code that your developers can start from.
- On the Federatedsearchinteractive page, in the playground row at the top, click here. The playground opens, with a tab for each producer. The app token ID and value are already filled in.
- Select the tab of the producer you want to test.
- Enter any user ID, and click Generate KS. The user ID doesn't need to exist on your site.
- Click Send request. The results appear, with the request URL that your developers would use.
You can view the results in these tabs:
- Formatted - The results, which you can expand and collapse.
- Raw - The JSON data. Your developers can use it to start building the widget.
- Gallery view - A preview of the results as a gallery.
- Gallery source - The HTML code for the gallery. Click Copy code to copy it, and save it as an HTML file.
If you allowed URL overrides, you can enter values for them, or enter a search term in the Term field, then click Send request again. You can also change the producer, save it, and send the request again to see the change.
The sample code in Gallery source includes the KS you generated, which expires after about 24 hours. If your developers need the code after that, generate a new KS and copy the code again.
Give your developers what they need
The app token gives access to the producer's content. Share the app token ID and value securely, and don't send them in an email.
Your developers don't have access to your Configuration Management console, so give them the following:
- The producer's slug, and the URL format:
https://{your_site_url}/federatedsearchinteractive/{slug}/ks/{ks}/term/{search_term}. The search term is optional. - The app token ID and value
- Your partner ID
- The instructions for creating a KS with the app token: App Token Authentication. If the producer searches channels, your developers must include a user ID when they create the KS.
- The HTML code from the Gallery source tab in the playground
- Optional. The JSON data from the Raw tab, if different developers build the front end and the back end
- If you allowed URL overrides, which settings your developers can change