To use this endpoint, send two strings using the POST method, and you will receive the differences in JSON and HTML format.
Analyze Diffs - Endpoint Features
| Object | Description |
|---|---|
Request Body |
[Required] Json |
{"diffs":[{"type":"eq","text":"Lorem ipsum "},{"type":"del","text":"d"},{"type":"add","text":"D"},{"type":"eq","text":"olor "},{"type":"del","text":"sit "},{"type":"eq","text":"amet"}],"html":"\u003cspan\u003eLorem ipsum \u003c/span\u003e\u003cdel style=\"background:#ffe6e6;\"\u003ed\u003c/del\u003e\u003cins style=\"background:#e6ffe6;\"\u003eD\u003c/ins\u003e\u003cspan\u003eolor \u003c/span\u003e\u003cdel style=\"background:#ffe6e6;\"\u003esit \u003c/del\u003e\u003cspan\u003eamet\u003c/span\u003e","cli":"TG9yZW0gaXBzdW0gG1szMW1kG1swbRtbMzJtRBtbMG1vbG9yIBtbMzFtc2l0IBtbMG1hbWV0"}
curl --location --request POST 'https://zylalabs.com/api/5189/text+change+detector+api/6654/analyze+diffs' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"text1": "Lorem ipsum dolor sit amet",
"text2": "Lorem ipsum Dolor amet"
}'
| Header | Description |
|---|---|
Authorization
|
[Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed. |
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
Send two text strings via POST, and get a detailed analysis of their differences in JSON and HTML.
It's a text comparison tool that identifies changes, providing detailed differences between two text strings.
The API receives two text strings and provides a JSON object with detailed differences, and a pre-rendered HTML view.
Version control systems comparing code changes. Document management platforms tracking edits. Educational tools highlighting textual differences.
Beside the number of API calls per month allowed, there are no other limitations.
There are different plans suits everyone including a free trial for small amount of requests, but it’s rate is limit to prevent abuse of the service.
The API uses API keys for authentication. To access the API, include your API key in the request header. The API key is provided upon registration and should be kept secure.
The API returns detailed information about the age and history of a domain, including years, months and days since its creation, as well as expiration and update dates.
The Analyze Diffs endpoint returns a JSON object containing an array of differences between the two text strings, along with a pre-rendered HTML representation of those differences for easy display.
The key fields in the response data include "diffs," which is an array of objects detailing the type of change (e.g., "add," "del," "eq") and the corresponding text, as well as "html" for the formatted output.
The response data is organized into a JSON object with two main components: an array of differences ("diffs") and a string containing the HTML representation of those differences, allowing for both programmatic and visual analysis.
The Analyze Diffs endpoint primarily accepts two parameters: the first text string and the second text string, both of which are required for comparison.
Users can customize their requests by modifying the text strings sent in the POST request, allowing for comparisons of any two texts, whether they are documents, code snippets, or other textual content.
Typical use cases include tracking changes in document revisions, comparing code changes in software development, and highlighting differences in educational materials for better learning outcomes.
Users can utilize the returned data by parsing the "diffs" array to programmatically identify changes, and by using the "html" output for visually displaying differences in web applications or CLI tools.
The API employs algorithms to ensure accurate text comparison, highlighting changes reliably. Regular updates and testing help maintain the quality and performance of the text analysis.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
To obtain your API key, you first need to sign in to your account and subscribe to the API you want to use. Once subscribed, go to your Profile, open the Subscription section, and select the specific API. Your API key will be available there and can be used to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
If you don’t cancel before the 7th day, your free trial will end automatically and your subscription will switch to a paid plan under the same plan you originally subscribed to, meaning you will be charged and gain access to the API calls included in that plan.
The free trial ends when you reach 50 API requests or after 7 days, whichever comes first.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost, so you can test our APIs without any commitment.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
Service Level:
100%
Response Time:
1,273ms
Service Level:
100%
Response Time:
270ms
Service Level:
100%
Response Time:
1,164ms
Service Level:
100%
Response Time:
580ms
Service Level:
100%
Response Time:
1,148ms
Service Level:
100%
Response Time:
127ms
Service Level:
100%
Response Time:
778ms
Service Level:
100%
Response Time:
727ms
Service Level:
100%
Response Time:
287ms
Service Level:
100%
Response Time:
728ms
Service Level:
100%
Response Time:
1,571ms
Service Level:
100%
Response Time:
2,016ms
Service Level:
100%
Response Time:
2,016ms
Service Level:
100%
Response Time:
463ms
Service Level:
100%
Response Time:
64ms
Service Level:
100%
Response Time:
1,007ms
Service Level:
100%
Response Time:
1,938ms
Service Level:
100%
Response Time:
1,128ms
Service Level:
100%
Response Time:
712ms
Service Level:
100%
Response Time:
755ms