{"mode":"words","changes":{"added_blocks":1,"removed_blocks":0,"equal":2},"diff":[{"value":"hello ","added":false,"removed":false},{"value":"brave ","added":true,"removed":false},{"value":"world","added":false,"removed":false}],"unified_patch":"===================================================================\n--- a\n+++ b\n@@ -1,1 +1,1 @@\n-hello world\n\\ No newline at end of file\n+hello brave world\n\\ No newline at end of file\n"}
curl --location --request POST 'https://zylalabs.com/api/13164/text+difference+and+patch+api/26710/compare+two+texts' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"a": "hello world", "b": "hello brave world", "mode": "words"}'
साइन अप करने के बाद, प्रत्येक डेवलपर को एक पर्सनल API एक्सेस की असाइन की जाती है, जो अक्षरों और अंकों का एक यूनिक संयोजन होता है, जिसका उपयोग हमारे API एंडपॉइंट तक पहुंचने के लिए किया जाता है। प्रमाणीकरण के लिए Text Difference and Patch API के साथ बस अपने बेयरर टोकन को Authorization हेडर में शामिल करें।
| हेडर | विवरण |
|---|---|
Authorization
|
आवश्यक
होना चाहिए Bearer access_key. जब आप सब्सक्राइब हों तो ऊपर "Your API Access Key" देखें।
|
कोई लंबी अवधि की प्रतिबद्धता नहीं। कभी भी अपग्रेड, डाउनग्रेड या कैंसल करें। फ्री ट्रायल में 50 रिक्वेस्ट तक शामिल हैं।
(वार्षिक बिलिंग के साथ 2 महीने बचाएँ 🎉)
अग्रणी कंपनियों का भरोसा
See exactly what changed between two texts. One call compares them by lines, words or characters and returns both a structured, machine readable difference and a unified patch string, the same format version control tools use.
Useful for tracking revisions of contracts, articles and documentation, audit logs that must show exactly what changed, review robots for configuration files, and detecting content changes in monitored pages.
The Compare Two Texts endpoint returns a structured difference between two texts, including parts flagged as added or removed, a summary count of changes, and a unified patch string. This allows users to see exactly what has changed in a clear format.
Key fields in the response include "mode" (indicating the granularity), "changes" (with counts of added and removed blocks), "diff" (showing individual text segments with flags), and "unified_patch" (the formatted patch string).
The response data is organized into a JSON structure. It includes a summary of changes, a detailed list of differences with flags for added or removed text, and a unified patch string formatted for easy application or storage.
उपयोगकर्ता "मोड" पैरामीटर को निर्दिष्ट कर सकते हैं ताकि तुलना की बारीकी चुन सकें: पंक्ति, शब्द या वर्ण यह आवश्यक विवरण के स्तर के आधार पर अनुकूलित तुलना की अनुमति देता है
विशिष्ट उपयोग के मामलों में अनुबंधों में संशोधनों को ट्रैक करना लेखों में परिवर्तनों की समीक्षा करना दस्तावेज़ों के लिए ऑडिट लॉग बनाए रखना और वेब पृष्ठों पर सामग्री परिवर्तनों की निगरानी करना शामिल है ताकि सटीक परिवर्तन ट्रैकिंग सुनिश्चित हो सके
उपयोगकर्ता विशेष परिवर्तनों के लिए "डिफ़" का विश्लेषण करके लौटाए गए डेटा का उपयोग कर सकते हैं "यूनिफाइड पैच" लागू करके दस्तावेजों को अपडेट कर सकते हैं या जोड़े और हटा दिए गए पाठ ब्लॉकों के सारांश की गणनाओं के आधार पर रिपोर्ट 생성 कर सकते हैं
Data accuracy is maintained by performing in-memory comparisons without storing the texts, ensuring that only the current state of the texts is analyzed, thus providing reliable and immediate results.
Users can expect a consistent structure in the response, with "added" and "removed" flags clearly indicating changes, and a unified patch that follows a standard format similar to version control systems, making it easy to interpret.