apyhub
ARTIFICIAL INTELLIGENCE · DEVELOPER TOOLS

Text Similarity Search API

Hosted on ApyHub

What it does

Text Similarity Search compares two strings and returns a similarity score between 0 and 1. Send a source string and a target string in the request body, then get back data as a floating-point score rounded to 3 decimal places.

Use Text Similarity Search when you need to measure how closely two pieces of text match without doing a full semantic analysis. It works well for duplicate detection, fuzzy matching, near-duplicate content checks, and simple comparison tasks in search or review workflows.

The response is intentionally compact: one numeric score that you can sort, threshold, or log. That makes it easy to plug into systems that need a quick similarity check for user-submitted text, product titles, tags, or short descriptions.

If you need a lightweight way to compare strings and make a yes/no or ranked decision from the result, Text Similarity Search gives you a direct score you can use immediately.

POST
Compute string similarity
http://localhost:8080/apyhub/text-similarity-search
QUICKSTARTGUIDE

Quickstart

Compare two strings for similarity.

curl -X POST "http://localhost:8080/apyhub/text-similarity-search" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"source":"kitten","target":"sitting"}'

What you'll get back

Returns a JSON object with a data number field — a float similarity score between 0 and 1, rounded to 3 decimal places.

{
  "data": 0.571
}
TRY ITLIVE · 25 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
First string to compare.
Second string to compare.

About this endpoint

What it does

Computes a similarity score between two input strings and returns the score as a floating-point number between 0 and 1.

Request Body

ParameterTypeMandatoryDescription
sourceStringYesFirst string to compare.
targetStringYesSecond string to compare.

Response

Returns a JSON object with a data number field — a similarity score rounded to 3 decimal places. The value is constrained to the range 0 to 1.

ParameterTypeMandatoryDescription
dataNumberYesSimilarity score rounded to 3 decimal places. Minimum 0, maximum 1.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.