---
title: "Match pairs of records"
method: POST
path: "/record-similarity"
tags: ["record-similarity"]
---

# Match pairs of records

`POST /record-similarity`

## Request

- Base URL: `https://api.rosette.com/rest/v1`
- URL: `https://api.rosette.com/rest/v1/record-similarity`
- Auth: API key in header `X-RosetteAPI-Key`

Compares two lists of records and returns a similarity score for each pair of records. Each record contains one to five fields. The fields can be any of the following entity types: PERSON, ORGANIZATION, ADDRESS, DATE, or IDENTIFIER/TEXT. The records do not have to contain the same fields; only fields with the same field name are compared. If one record has three fields and the other has two fields, the missing field will be ignored and the other two fields compared.

## Request body

- RecordRequest
  - `fields` Fields
    - `fieldname` object
      - `type` 'rni_name' | 'rni_address' | 'rni-date'
      - `weight` number: value indicating weighting
  - `properties` Properties
    - `threshold` number: results must be greater than threshold to be returned
    - `includeExplainInfo` boolean: true returns the full details of how the records matched
  - `records` Records
    - `left` FieldRecords[]
      - FieldProperties[]
        - `namefieldname` NameProperties[]
          - `text` string
          - `language` string
          - `entityType` 'PERSON' | 'LOCATION' | 'ORGANIZATION': the entity type of the object
          - `languageOfOrigin` string: ISO 639-3 code for the name's language
          - `script` string: ISSO 15924 code for the name's script
        - `datefieldname` DateProperties[]
          - `date` string
        - `addressfieldname` AddressProperties[]
          - `address` string
    - `right` FieldRecords[]
      - FieldProperties[]
        - `namefieldname` NameProperties[]
          - `text` string
          - `language` string
          - `entityType` 'PERSON' | 'LOCATION' | 'ORGANIZATION': the entity type of the object
          - `languageOfOrigin` string: ISO 639-3 code for the name's language
          - `script` string: ISSO 15924 code for the name's script
        - `datefieldname` DateProperties[]
          - `date` string
        - `addressfieldname` AddressProperties[]
          - `address` string

## Response `200`

OK

- RecordResponse
  - `fields` Fields
    - `fieldname` object
      - `type` 'rni_name' | 'rni_address' | 'rni-date'
      - `weight` number: value indicating weighting
  - `results` Results[]
    - `score` number
    - `left` union
      - Names
        - `fieldname` object
          - `text` string
      - Dates
        - `fieldname` object
          - `date` string
      - AddressResp
        - `fieldname` object
          - `address` string
    - `right` union
      - Names
        - `fieldname` object
          - `text` string
      - Dates
        - `fieldname` object
          - `date` string
      - AddressResp
        - `fieldname` object
          - `address` string
    - `explainIfo` union
      - ScoredFieldsName
        - `fieldname` object
          - `weight` number
          - `calculatedWeight` number
          - `rawScore` number
          - `finalScore` number
          - `details` object
            - `leftInput` NameDetails
              - …
            - `rightInput` NameDetails
              - …
            - `scoreTuples` ScoreTuples[]
              - …
            - `scoreAdjustments` ScoreAdjustments
              - …
            - `finalScore` number
            - `defaultInput` object
              - …
            - `empty` boolean
      - ScoredFieldsAddress
        - `fieldname` object
          - `weight` number
          - `calculatedWeight` number
          - `rawScore` number
          - `finalScore` number
          - `details` object
            - `leftInput` AddressDetails
              - …
            - `rightInput` AddressDetails
              - …
            - `scoreTuples` ScoreTuplesAddress[]
              - …
            - `scoreAdjustments` ScoreAdjustments
              - …
            - `finalScore` number
            - `fieldScores` FieldScores[]
              - …
            - `empty` boolean
            - `defaultInput` object
              - …
      - ScoredFieldsDate
        - `fieldname` object
          - `weight` number
          - `calculatedWeight` number
          - `rawScore` number
          - `finalScore` number
          - `details` object
            - `leftInput` DateDetails
              - …
            - `rightInput` DateDetails
              - …
            - `scoreTuples` ScoreTuplesDate[]
              - …
            - `scoreAdjustments` ScoreAdjustments
              - …
            - `finalScore` number
            - `scores` ScoreTuples[]
              - …
            - `defaultInput` object
              - …
            - `empty` boolean
    - `leftOnlyFields` string[]
    - `rightOnlyFields` string[]

---

[API](https://skmtc.dev/babelstreet/apis/rosette-text-analytics.md) · [All operations](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/revisions/7c1d1497a5dd?raw)
