Recommend API (0.1.0)
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
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
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
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
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
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
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
parameters | string Example: parameters=?query=mySearchQuery&hitsPerPage=10 URL-encoded query string. Force some query parameters to be applied for each query made with this API key. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
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": [ ],
- "optionalFilters": [ ],
- "numericFilters": [ ],
- "tagFilters": [ ],
- "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,
- "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": [ ],
- "optionalFilters": [ ],
- "numericFilters": [ ],
- "tagFilters": [ ],
- "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,
- "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": {
- "property1": {
- "lat": 0,
- "lng": 0,
- "distance": 0
}, - "property2": {
- "lat": 0,
- "lng": 0,
- "distance": 0
}
}, - "nbExactWords": 0,
- "nbTypos": 0,
- "promoted": true,
- "proximityDistance": 0,
- "userScore": 0,
- "word": 0
}, - "_distinctSeqID": 0,
- "_score": 100
}
]
}
]
}