{"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://pr213-testing.zylalabs.com/api/5188/text+compare+api/6653/compare+texts' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"text1": "Lorem ipsum dolor sit amet",
"text2": "Lorem ipsum Dolor amet"
}'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Text Compare API simply include your bearer token in the Authorization header.
| 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.
(Save 2 months with annual billing 🎉)
Trusted by leading companies
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 API returns a JSON object containing detailed differences between two text strings, including additions, deletions, and unchanged segments. It also provides a pre-rendered HTML representation of these differences for easy display.
The key fields in the JSON response include "diffs," which is an array of objects detailing the type of change (e.g., "add," "del," "eq") and the corresponding text. The response also includes "html" for visual representation and "cli" for command line output.
The response data is organized into a JSON object with a "diffs" array, where each object specifies the type of change and the text involved. Additionally, the "html" field contains a formatted string for web display, while "cli" provides a command line-friendly output.
The primary parameters for the endpoint are the two text strings to be compared. Users can customize their requests by adjusting the content of these strings to analyze different versions or edits of the text.
Typical use cases include comparing document revisions in editing software, analyzing code changes in version control systems, and educational tools that highlight differences in student submissions or texts.
Users can parse the "diffs" array to programmatically identify specific changes, such as which text was added or deleted. The "html" output can be directly embedded in web applications for visual comparison, while the "cli" output is useful for command line interfaces.
The API employs robust algorithms to accurately detect differences between text strings, ensuring that all modifications, including subtle changes, are captured. Continuous testing and updates help maintain high accuracy levels.
Users can expect a structured output where each change is categorized as "add," "del," or "eq." This consistent format allows for straightforward parsing and analysis, making it easy to integrate the API's output into various 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