Fuzzy Text Search API
ApyHub
25 atoms
Base tier
About
The Fuzzy Text search utility service, allows you to search through a large text data and search for the presence of a specific keywords. The advantage of the fuzzy search is that it searches and matches for words that are mis-spelled (hence the name, fuzzy search) and also can be configured to search for matching terms even if the characters in the text have accents (Diacritics).
Fuzzy Search is a great tool to help you find relevant results even when the search term is mis-spelled. This is greatly helpful when you are getting inputs from a user and searching for that term in the database. In many cases, the search term is mis-spelt by the user. A normal search does not return any result when the search term is mis-spelt. However, Fuzzy Search can return returns when the spelling is wrong.
The Fuzzy Search API lets you search for a term likely to be relevant to a search argument even if that content does not match the search query exactly. Fuzzy search uses a fuzzy matching program, which returns results with likely relevance.
API Playground
API Documentation
fuzzy
POST
https://api.apyhub.com/search/text/fuzzy
Request example
Method:
POST
Content Type:
application/json
Query Parameter(s)
Attribute | Data Type | Description |
---|---|---|
unicode-normalized | boolean | Default false. Must be true, in case accents need to be taken into consideration |
Request Body
Attribute | Type | Mandatory | Description |
---|---|---|---|
source | String | No | The term that you want to search for. |
target | String | No | The target in which you want to search for the term. |
Sample Response
Returns an array of terms that match the
source
. But if source
or target
is missing or is null
or empty string
then this returns an empty array.Sample with unicode-normalized true
HTTP Response Codes
The method may return one of the following HTTP status codes:
Status Code | Description |
---|---|
200 | The request was successful. |
400 | Invalid input or mandatory params are missing. |
401 | Required authentication information is either missing or not valid for the resource. |
500 | Potential error that might occur, if any unexpected error occurs while processing the request. |
Authentication
All API requests to ApyHub services need to be authenticated. Currently we support
tokens
or basic authentication
mechanisms.
You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".Points to note:
- Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
- Use the
apy-token
as the header parameter to pass the token. - Use the
Authorization
header to send the basic authentication credentials.
Error codes
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.
Table of contents