Recommend API (0.1.0)
Download OpenAPI specification:Download
API powering the Recommend feature of Algolia.
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Returns recommendations for a specific model and objectID
Returns recommendations for a specific model and objectID.
Request Body schema: application/json
required | Array of trendingRequest (object) or recommendationRequest (object) (recommendationsRequest) [ items ] The | ||||||||||||||||
Array One of
|
Responses
Request samples
- Payload
{- "requests": [
- {
- "model": "trending-facets",
- "facetName": "string",
- "facetValue": "string",
- "indexName": "products",
- "threshold": 100,
- "maxRecommendations": 0,
- "queryParameters": {
- "similarQuery": "",
- "filters": "",
- "facetFilters": [
- "string"
], - "optionalFilters": [
- "string"
], - "numericFilters": [
- "string"
], - "tagFilters": [
- "string"
], - "sumOrFiltersScores": false,
- "facets": [ ],
- "maxValuesPerFacet": 100,
- "facetingAfterDistinct": false,
- "sortFacetValuesBy": "count",
- "page": 0,
- "offset": 0,
- "length": 1,
- "aroundLatLng": "",
- "aroundLatLngViaIP": false,
- "aroundRadius": 1,
- "aroundPrecision": 10,
- "minimumAroundRadius": 1,
- "insideBoundingBox": [
- 0
], - "insidePolygon": [
- 0
], - "naturalLanguages": [ ],
- "ruleContexts": [ ],
- "personalizationImpact": 100,
- "userToken": "string",
- "getRankingInfo": false,
- "clickAnalytics": false,
- "analytics": true,
- "analyticsTags": [ ],
- "percentileComputation": true,
- "enableABTest": true,
- "enableReRanking": true,
- "reRankingApplyFilter": [
- "string"
], - "query": "",
- "searchableAttributes": [ ],
- "attributesForFaceting": [ ],
- "unretrievableAttributes": [ ],
- "attributesToRetrieve": [
- "*"
], - "restrictSearchableAttributes": [ ],
- "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [ ],
- "relevancyStrictness": 100,
- "attributesToHighlight": [
- "string"
], - "attributesToSnippet": [ ],
- "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [ ],
- "separatorsToIndex": "",
- "ignorePlurals": false,
- "removeStopWords": false,
- "keepDiacriticsOnCharacters": "",
- "queryLanguages": [ ],
- "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "none",
- "advancedSyntax": false,
- "optionalWords": [ ],
- "disableExactOnAttributes": [ ],
- "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 0,
- "synonyms": true,
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": { }
}, - "fallbackParameters": {
- "similarQuery": "",
- "filters": "",
- "facetFilters": [
- "string"
], - "optionalFilters": [
- "string"
], - "numericFilters": [
- "string"
], - "tagFilters": [
- "string"
], - "sumOrFiltersScores": false,
- "facets": [ ],
- "maxValuesPerFacet": 100,
- "facetingAfterDistinct": false,
- "sortFacetValuesBy": "count",
- "page": 0,
- "offset": 0,
- "length": 1,
- "aroundLatLng": "",
- "aroundLatLngViaIP": false,
- "aroundRadius": 1,
- "aroundPrecision": 10,
- "minimumAroundRadius": 1,
- "insideBoundingBox": [
- 0
], - "insidePolygon": [
- 0
], - "naturalLanguages": [ ],
- "ruleContexts": [ ],
- "personalizationImpact": 100,
- "userToken": "string",
- "getRankingInfo": false,
- "clickAnalytics": false,
- "analytics": true,
- "analyticsTags": [ ],
- "percentileComputation": true,
- "enableABTest": true,
- "enableReRanking": true,
- "reRankingApplyFilter": [
- "string"
], - "query": "",
- "searchableAttributes": [ ],
- "attributesForFaceting": [ ],
- "unretrievableAttributes": [ ],
- "attributesToRetrieve": [
- "*"
], - "restrictSearchableAttributes": [ ],
- "ranking": [
- "typo",
- "geo",
- "words",
- "filters",
- "proximity",
- "attribute",
- "exact",
- "custom"
], - "customRanking": [ ],
- "relevancyStrictness": 100,
- "attributesToHighlight": [
- "string"
], - "attributesToSnippet": [ ],
- "highlightPreTag": "<em>",
- "highlightPostTag": "</em>",
- "snippetEllipsisText": "…",
- "restrictHighlightAndSnippetArrays": false,
- "hitsPerPage": 20,
- "minWordSizefor1Typo": 4,
- "minWordSizefor2Typos": 8,
- "typoTolerance": true,
- "allowTyposOnNumericTokens": true,
- "disableTypoToleranceOnAttributes": [ ],
- "separatorsToIndex": "",
- "ignorePlurals": false,
- "removeStopWords": false,
- "keepDiacriticsOnCharacters": "",
- "queryLanguages": [ ],
- "decompoundQuery": true,
- "enableRules": true,
- "enablePersonalization": false,
- "queryType": "prefixLast",
- "removeWordsIfNoResults": "none",
- "advancedSyntax": false,
- "optionalWords": [ ],
- "disableExactOnAttributes": [ ],
- "exactOnSingleWordQuery": "attribute",
- "alternativesAsExact": [
- "ignorePlurals",
- "singleWordSynonym"
], - "advancedSyntaxFeatures": [
- "exactPhrase",
- "excludeWords"
], - "distinct": 0,
- "synonyms": true,
- "replaceSynonymsInHighlight": false,
- "minProximity": 1,
- "responseFields": [ ],
- "maxFacetHits": 10,
- "attributeCriteriaComputedByMinProximity": false,
- "renderingContent": { }
}
}
]
}
Response samples
- 200
- 400
- 402
- 403
- 404
{- "results": [
- {
- "abTestID": 0,
- "abTestVariantID": 0,
- "aroundLatLng": "string",
- "automaticRadius": "string",
- "exhaustiveFacetsCount": true,
- "exhaustiveNbHits": true,
- "exhaustiveTypo": true,
- "facets": {
- "category": {
- "food": 1,
- "tech": 42
}
}, - "facets_stats": {
- "property1": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}, - "property2": {
- "min": 0,
- "max": 0,
- "avg": 0,
- "sum": 0
}
}, - "hitsPerPage": 20,
- "index": "indexName",
- "indexUsed": "indexNameAlt",
- "message": "string",
- "nbHits": 20,
- "nbPages": 1,
- "nbSortedHits": 20,
- "page": 0,
- "params": "query=a&hitsPerPage=20",
- "parsedQuery": "string",
- "processingTimeMS": 20,
- "query": "",
- "queryAfterRemoval": "string",
- "serverUsed": "string",
- "userData": { },
- "hits": [
- {
- "objectID": "string",
- "_highlightResult": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none",
- "matchedWords": [
- "string"
], - "fullyHighlighted": true
}, - "_snippetResult": {
- "value": "<em>George</em> <em>Clo</em>oney",
- "matchLevel": "none"
}, - "_rankingInfo": {
- "filters": 0,
- "firstMatchedWord": 0,
- "geoDistance": 0,
- "geoPrecision": 0,
- "matchedGeoLocation": {
- "lat": 0,
- "lng": 0,
- "distance": 0
}, - "personalization": {
- "filtersScore": 0,
- "rankingScore": 0,
- "score": 0
}, - "nbExactWords": 0,
- "nbTypos": 0,
- "promoted": true,
- "proximityDistance": 0,
- "userScore": 0,
- "words": 0,
- "promotedByReRanking": true
}, - "_distinctSeqID": 0,
- "_score": 100
}
]
}
]
}