Our Text Difference Comparison API is a powerful tool for comparing two strings or texts and identifying the differences between them. The API is designed to be easy to use and provides a variety of output options to suit your needs.
One of the key features of the API is its ability to return the results in an easy-to-process JSON format. This makes it simple to integrate the API into your existing applications and workflow. Additionally, the API also provides pre-rendered results for HTML and CLI output, giving you the flexibility to display the results in the format that works best for you.
The API compares two inputted texts and returns a JSON object that contains the differences between the two strings. The returned JSON contains the original strings with the differences highlighted.
The Text Difference Comparison API is designed to be highly accurate and efficient, making it ideal for a wide range of applications. Whether you're working on a software development project, a research project, or simply need to compare two documents, this API is an excellent choice. It can be used to compare different versions of a document, compare original and translated text, or even to compare two different sources of information.
Overall, our Text Difference Comparison API is a versatile and powerful tool that can help you quickly and easily compare two strings or texts and identify the differences between them. With its easy-to-use JSON output and pre-rendered results for HTML and CLI output, it's the perfect choice for any project that requires text comparison.
Pass two text strings and receive the difference recognized between them.
Version control for software development: Developers can use the API to compare different versions of code and quickly identify any changes or updates.
Quality assurance for translated text: The API can be used to compare the original text with its translation, and identify any errors or inconsistencies in the translation.
Plagiarism detection: The API can be used to compare student papers or articles and identify any instances of plagiarism.
Content comparison for SEO: The API can be used to compare the content of two websites and identify any similarities or duplicates, which can be useful for SEO and avoiding penalties.
Document comparison for legal or financial industries: The API can be used to compare contracts, legal documents, or financial statements and identify any changes or discrepancies.
News comparison: The API can be used to compare news articles from different sources to identify similarities, or to detect any bias or manipulation in the reporting.
Besides API call limitations per month, there is a limitation of:
Free Plan: 10 requests per day. Up to 1000 characters.
Basic Plan: Up to 50,000 characters.
Pro Plan: Up to 100,000 characters.
Compare 2 strings/texts and get the differences between them. The API provides both an easy-to-process JSON to work with and a pre-rendered result for HTML and CLI output.
**Diff-Types:** * `eq` = text passage is equal * `add` = text passage was added in text2 * `del` = text passage was removed in text2
Compare - 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/1157/text+difference+comparison+api/1016/compare' --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.
The Compare endpoint returns a JSON object containing the differences between two input strings. It includes an array of differences categorized by type (equal, added, or deleted text) and provides pre-rendered HTML and CLI outputs for easy visualization.
The key fields in the response data include "diffs," which is an array of objects detailing the type of change and the corresponding text, and "html" and "cli," which provide formatted outputs for web and command-line interfaces.
The response data is organized into a JSON object with a "diffs" array, where each object specifies the type of difference (eq, add, del) and the associated text. Additionally, it includes "html" and "cli" fields for formatted output.
The Compare endpoint accepts two parameters: the first text string and the second text string. Users can customize their requests by providing different texts to compare, allowing for flexible text analysis.
Typical use cases include version control for software development, quality assurance for translations, plagiarism detection, SEO content comparison, legal document analysis, and comparing news articles for bias or similarities.
Users can utilize the returned data by parsing the "diffs" array to identify specific changes between texts. The "html" output can be directly embedded in web pages, while the "cli" output is useful for command-line applications or scripts.
The API is designed for high accuracy and efficiency, ensuring reliable text comparisons. While specific quality checks are not detailed, the API's performance is optimized for consistent results across various text comparison scenarios.
If the input texts are identical, the API will return a "diffs" array with a single "eq" entry. For empty inputs, the API may return an empty "diffs" array. Users should implement checks to handle these cases gracefully in their applications.
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:
127ms
Service Level:
100%
Response Time:
250ms
Service Level:
100%
Response Time:
263ms
Service Level:
100%
Response Time:
542ms
Service Level:
100%
Response Time:
393ms
Service Level:
100%
Response Time:
1,002ms
Service Level:
100%
Response Time:
393ms
Service Level:
100%
Response Time:
162ms
Service Level:
83%
Response Time:
191ms
Service Level:
100%
Response Time:
308ms
Service Level:
100%
Response Time:
152ms
Service Level:
100%
Response Time:
104ms
Service Level:
100%
Response Time:
1,708ms
Service Level:
100%
Response Time:
1,064ms
Service Level:
100%
Response Time:
669ms
Service Level:
100%
Response Time:
264ms
Service Level:
100%
Response Time:
749ms
Service Level:
100%
Response Time:
164ms
Service Level:
100%
Response Time:
857ms
Service Level:
100%
Response Time:
94ms