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.
{"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.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key 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.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
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. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
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.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund
Service Level:
100%
Response Time:
127ms
Service Level:
100%
Response Time:
250ms
Service Level:
100%
Response Time:
263ms
Service Level:
83%
Response Time:
334ms
Service Level:
100%
Response Time:
542ms
Service Level:
100%
Response Time:
388ms
Service Level:
100%
Response Time:
393ms
Service Level:
100%
Response Time:
313ms
Service Level:
100%
Response Time:
1,002ms
Service Level:
100%
Response Time:
393ms
Service Level:
100%
Response Time:
764ms
Service Level:
100%
Response Time:
331ms
Service Level:
100%
Response Time:
2,205ms
Service Level:
100%
Response Time:
432ms
Service Level:
100%
Response Time:
381ms
Service Level:
100%
Response Time:
420ms
Service Level:
100%
Response Time:
819ms
Service Level:
100%
Response Time:
191ms
Service Level:
100%
Response Time:
309ms
Service Level:
100%
Response Time:
344ms