GET /v1/text-diffLine-by-line text diff
Format Utils lf-format-utils
Shows exactly which lines changed between two blocks of text. Line-by-line text diff
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
a | string | Yes | Original text |
b | string | Yes | New text |
Response Schema
added (array): Lines added
removed (array): Lines removed
unchanged (array): Unchanged lines
lines_added (integer): Count added
lines_removed (integer): Count removed
cURL Example
curl 'https://lf-format-utils.laminarforge.dev/v1/text-diff?a=<a>' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/text-diff'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'a': '<a>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())