Articles · API, Matching

A matching API that shows its working

Published By Crown Intelligence team

The new matching endpoint scores a person, company or vessel against a collection and explains every score, feature by feature. Here is how to call it and how to read the answer.

A score is not an explanation#

A screening hit has to be reviewed by a person, and often defended to an auditor. A bare number such as 0.87 does not help either of them. They need to see which details agreed: the name, the birth date, the nationality, an IMO number.

Calling the API#

Send one or more queries to POST /api/match/<collection>, where the collection is one of default, sanctions, peps, crime or maritime:

curl -X POST "https://api.crownintelligence.net/api/match/sanctions" \
  -H "content-type: application/json" \
  -d '{"queries":{"q1":{"schema":"Person",
       "properties":{"name":["Jane Example"],
                     "birthDate":["1970"],
                     "nationality":["ca"]}}}}'

Each query can carry a name, birth date, nationality, IMO number and entity type. Several queries can go in one request, each under its own key.

Reading the answer#

For each query, the response lists candidate records with an overall score, a match flag, and a features list. Each feature names what was compared, its score and weight, and a plain-language explanation, for example which name tokens agreed and how closely. Every result also names its source list, programme where published, and the date it was last seen at the source, with a link to the full record.

Also new#

  • /api/search/<collection> searches within a single collection.
  • /api/reconcile/<collection> serves the same matching to OpenRefine, so a spreadsheet of names can be reconciled against our data.