Skip to content
Utilerio
All endpoints

List Compare

POST/api/v1/tools/list-compare

Compare two lists line by line — find what's only in each, their intersection, union and duplicates.

Authentication

Requires an API key in the X-API-Key header.

Try it

POST/api/v1/tools/list-compare

Parameters

listAstringrequired

First newline-separated list.

listBstringrequired

Second newline-separated list.

trimWhitespacebooleanoptional

Trim each line. Default true.

ignoreCasebooleanoptional

Case-insensitive comparison.

ignoreEmptybooleanoptional

Ignore blank lines. Default true.

Request body

{
  "listA": "a\nb\nc",
  "listB": "b\nc\nd"
}

Response codes

  • 200Success.
  • 400Invalid request — check your body or parameters.
  • 401Missing or invalid API key.
  • 403The API key is not scoped to this endpoint.
  • 429Rate limit exceeded — retry after a short wait.

Language

cURL

Request

curl -X POST https://utilerio.com/api/v1/tools/list-compare \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listA":"a\nb\nc","listB":"b\nc\nd"}'

Response

{ "onlyA": ["a"], "onlyB": ["d"], "intersection": ["b","c"], "union": ["a","b","c","d"], "duplicatesA": [], "duplicatesB": [] }