API Reference

GET /v1/recommendations/{index public key}

Retrieve data from the index about items viewed together.

Query parameters

ParameterDescriptionTypeNotes
configurationKeyThe id of the FBT configuration. stringThe configuration key determines the events used for recommendations.
ItemIdThe id of an item used for returning the recommended itemsstringItemID supports document ID and custom field and is configured in the configuration object located in the document path.

See the documentation on configuring the recommendations in the AddSearch dasboard here.

Example Response

The request returns results organized on the likelihood the item is viewed together with other related items.


{
    "total_hits": 2,
    "processing_time_ms": 10264,
    "hits": [
        {
            "id": "45250165ec33a1cc191ae10d2ceb0010",
            "type": "DEFAULT",
            "url": "https://www.addsearch.com/docs/api/overview/",
            "title": "API Reference - AddSearch Documentation",
            "meta_description": "The AddSearch REST API provides programmatic access the search index. You can add, update and retrieve data from the index with the AddSearch Rest API.",
            "meta_categories": null,
            "custom_fields": {
                "documentation_category": "API Reference#fe0201"
            },
            "highlight": "REST API Reference Welcome to AddSearch API! The AddSearch REST API provides access to request data from the index. It also allows you to update the data in the index as well as ad",
            "ts": "2020-02-13T11:27:28",
            "categories": [
                "0xwww.addsearch.com",
                "1xdocs",
                "2xapi",
                "3xoverview"
            ],
            "document_type": "html",
            "images": {
                "main": null,
                "capture": null
            },
            "score": 1
        },
        {
            ...
        }
    ]
}

For more information on the results object please visit the search API reference page.

Was this helpful?

Need more help?

We’re always happy to help with code or other questions you might have. Search our documentation, contact support, or connect with our sales team.