---
title: Calling the Raptor API
description: "What is the Raptor API?\n\nYour website fetches recommendations by calling the Raptor API, one request per module. This article explains how a request is built and where to find it."
---

[Skip to content](https://content.raptorservices.com/help-center/calling-the-raptor-api#main-content)

![raptor-qntm-logo\_horizontal\_gradient.png\]](https://content.raptorservices.com/hs-fs/hubfs/raptor-qntm-logo_horizontal_gradient.png?height=40&name=raptor-qntm-logo_horizontal_gradient.png)

Open main navigation

Close main navigation

- [Go to raptorservices.com](https://raptorservices.com/)

[Go to raptorservices.com](https://raptorservices.com/)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://content.raptorservices.com/help-center?hsLang=en)
2. [Website Recommendations](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en)
3. [Working with the Raptor API](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en#working-with-the-raptor-api)

# Calling the Raptor API

### What is the Raptor API?

Your website fetches recommendations by calling the Raptor API, one request per module. This article explains how a request is built and where to find it.

### Prerequisites

- Tracking is live and verified.
- The modules you want to use are activated and tested in the Control Panel.
- You have your **customer ID** and **API key** from the Control Panel.

### How a request is built

```
https://api.raptorsmartadvisor.com/v1/{customerId}/{moduleName}/{numberOfRecommendations}/{apiKey}?{parameters}
```

| Part | What it is | Example |
| --- | --- | --- |
| customerId | Your Raptor account ID | 1234 |
| moduleName | The module to call | GetSimilarItemsWeb |
| numberOfRecommendations | How many items to return | 10 |
| apiKey | Your API key | (from the Control Panel) |
| parameters | The context the module needs | See "Parameters" below |

The API returns JSON. With **FullInfo** turned on, the response includes every mapped field from your product catalog, so you can show more product details in your modules.

### How to find the request in the Control Panel

Every activated module shows its own ready-made API request:

1. Go to **Recommendations** \> **Website** and open the module.
2. Click the three dots in the top right corner and choose the API request.
3. Copy the request and replace the example values with your own.

![chrome\_0x7nyAs413](https://content.raptorservices.com/hs-fs/hubfs/Screenshots%20MKL/chrome_0x7nyAs413.png?width=670&height=135&name=chrome_0x7nyAs413.png)

### Parameters

**Required parameters**

Some modules need context from the page to know what to recommend. If a required parameter is missing, the request doesn't work.

| Parameter | Required for | What to send |
| --- | --- | --- |
| ProductId | GetSimilarItemsWeb, GetPIMRelatedItemsWeb, GetContentBasedOnItemWeb, GetNumOfUsersRightNowWeb | The ID of the product being viewed |
| ProductIds | GetPIMRelatedItemsForBasketWeb | A comma-separated list of up to 10 product IDs in the basket, most important first |
| CategoryId | GetPopularItemsInCategoryWeb, GetContentBasedOnProductCategoryWeb | The ID of the category being viewed |
| BrandId | GetPopularItemsInBrandWeb, GetContentBasedOnProductBrandWeb | The ID of the brand being viewed |
| ContentId | GetItemsBasedOnContentWeb, GetSimilarContentWeb | The ID of the article, guide or recipe being viewed |
| MerchandisingCampaignId | GetMerchandisingItemsWeb, GetMerchandisingContentWeb | The ID of the feed you created in Customized Feeds |

All other modules have no required parameters.

**Parameters for personalization**

| Parameter | When to send it |
| --- | --- |
| CookieId | Always, so the results can be personalized for the visitor |
| UserId | When the visitor is logged in |

Without CookieId or UserId, the results are not personalized. Every module supports both, except GetNumOfUsersRightNowWeb.

**Optional context**

| Parameter | Modules | When to send it |
| --- | --- | --- |
| ProductId | GetUserItemRecommendationsWeb, GetUserLookAlikeItemsWeb, GetUserCrossSellingItemsWeb | On a product page, to combine the visitor's profile with the product being viewed. Send it empty when the visitor leaves the product page |
| SearchPhrase | GetUserItemRecommendationsWeb, GetUserLookAlikeItemsWeb, GetUserCrossSellingItemsWeb | On a search result page, to combine the visitor's profile with the search term. Send it empty when the visitor leaves the search page |
| CurrentBasket | GetUserItemHistoryWeb | "include" or "exclude", to decide whether products in the current basket are shown |

🔍 **Note**:  Each module in the Control Panel shows a minimal request, with only the required parameters, and a full request with every parameter the module supports. Use the full request if you want to override a module setting, such as **FullInfo** or a filter, for a single call. 

### Keep your page fast

- Call the API asynchronously, so the page doesn't wait for recommendations.
- Set a timeout, for example 1,5 seconds.
- Have a fallback, such as hiding the module or showing static products, if the request fails.

**💡**See the code examples: [*Raptor API Request - C# example* and *Raptor API Request - PHP example*](https://content.raptorservices.com/help-center/website-recommendations#working-with-the-raptor-api).

### Next step

When the recommendations show on your website, send an **ItemClick** event whenever a visitor clicks a recommended product, so you can measure how your modules perform. See [*Tracking Events & Parameters Reference*.](https://content.raptorservices.com/help-center/tracking-events-parameters-reference?hsLang=en) Then run through *End-to-end test and go-live* before you launch.

- [Welcome to Raptor](https://content.raptorservices.com/help-center/welcome-to-raptor?hsLang=en#main-content)

    - [Introduction](https://content.raptorservices.com/help-center/welcome-to-raptor?hsLang=en#introduction)
- [Analytics & Insights](https://content.raptorservices.com/help-center/analytics-insights?hsLang=en)
- [Data Management](https://content.raptorservices.com/help-center/data-management?hsLang=en#main-content)

    - [Implementing Tracking](https://content.raptorservices.com/help-center/data-management?hsLang=en#implementing-tracking)
    - [Implementing Raptor Recommendation](https://content.raptorservices.com/help-center/data-management?hsLang=en#implementing-raptor-recommendation)
    - [Email Marketing Integration](https://content.raptorservices.com/help-center/data-management?hsLang=en#email-marketing-integration)
    - [The Data Manager](https://content.raptorservices.com/help-center/data-management?hsLang=en#the-data-manager)
    - [Streaming API](https://content.raptorservices.com/help-center/data-management?hsLang=en#streaming-api)
    - [Destinations](https://content.raptorservices.com/help-center/data-management?hsLang=en#destinations)
- [Customer Data Platform](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#main-content)

    - [Introduction](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#introduction)
    - [Profile Unification](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#profile-unification)
    - [Audience Builder](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#audience-builder)
    - [Audience Insights](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#audience-insights)
    - [Calculated Attributes](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#calculated-attributes)
    - [Activations](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#activations)
    - [Single Customer View](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#single-customer-view)
    - [CDP Export API](https://content.raptorservices.com/help-center/customer-data-platform?hsLang=en#cdp-export-api)
- [Website Recommendations](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en#main-content)

    - [Introduction](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en#introduction)
    - [Recommendation Strategies](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en#recommendation-strategies)
    - [Feeds](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en#feeds)
    - [Tuning Parameters](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en#tuning-parameters)
    - [Working with the Raptor API](https://content.raptorservices.com/help-center/website-recommendations?hsLang=en#working-with-the-raptor-api)
- [Mail Recommendations](https://content.raptorservices.com/help-center/mail-recommendations?hsLang=en)
- [E-mail Triggers](https://content.raptorservices.com/help-center/e-mail-triggers?hsLang=en#main-content)

    - [Get started](https://content.raptorservices.com/help-center/e-mail-triggers?hsLang=en#get-started)
    - [E-mail Trigger Documentation](https://content.raptorservices.com/help-center/e-mail-triggers?hsLang=en#e-mail-trigger-documentation)
    - [E-mail trigger integrations](https://content.raptorservices.com/help-center/e-mail-triggers?hsLang=en#e-mail-trigger-integrations)
- [Site Search](https://content.raptorservices.com/help-center/site-search?hsLang=en#main-content)

    - [Search Tracking](https://content.raptorservices.com/help-center/site-search?hsLang=en#search-tracking)
    - [Introduction](https://content.raptorservices.com/help-center/site-search?hsLang=en#introduction)
    - [Implementing Site Search](https://content.raptorservices.com/help-center/site-search?hsLang=en#implementing-site-search)
    - [Search Ranking & Recommendations](https://content.raptorservices.com/help-center/site-search?hsLang=en#search-ranking-recommendations)
    - [Reporting](https://content.raptorservices.com/help-center/site-search?hsLang=en#reporting)
- [Merchandising](https://content.raptorservices.com/help-center/merchandising?hsLang=en#main-content)

    - [Introduction to Merchandising](https://content.raptorservices.com/help-center/merchandising?hsLang=en#introduction-to-merchandising)
    - [Boosted Campaigns](https://content.raptorservices.com/help-center/merchandising?hsLang=en#boosted-campaigns)
    - [Customized Feeds](https://content.raptorservices.com/help-center/merchandising?hsLang=en#customized-feeds)
- [AI Models](https://content.raptorservices.com/help-center/ai-models?hsLang=en#main-content)

    - [Customer Lifetime Value](https://content.raptorservices.com/help-center/ai-models?hsLang=en#customer-lifetime-value)
- [Administration](https://content.raptorservices.com/help-center/administration?hsLang=en#main-content)

    - [Trust Center](https://content.raptorservices.com/help-center/administration?hsLang=en#trust-center)
    - [User Management](https://content.raptorservices.com/help-center/administration?hsLang=en#user-management)
    - [Operational Insights](https://content.raptorservices.com/help-center/administration?hsLang=en#operational-insights)
    - [Data Retention](https://content.raptorservices.com/help-center/administration?hsLang=en#data-retention)

[![Raptor Services](https://content.raptorservices.com/hubfs/Logo%20_By%20Ibexa%20-%20Color-Raptor.svg "Raptor Services")](https://www.raptorservices.com/)

raptorsmartadvisor.com Help Center

<https://www.linkedin.com/company/raptorservices/mycompany/> <https://www.instagram.com/raptorservices/>

Copyright © 2026, Raptor Services A/S