Query by example matcher
Changed onMatch entities based on a complex set of criteria, like name, date of birth and nationality of a person. This works by submitting an entity formatted like those returned by the API.
Tutorials:
For example, the following would be a valid query:
"queries": {
"q": {
"schema": "Person",
"properties": {
"name": ["John Doe"],
"birthDate": ["1975-04-21"],
"nationality": ["us"]
}
}
}
The value for q can be chosen freely to correlate the result on the client side when the request is returned. The response will be given for the submitted example like this:
"responses": {
"q": {
"query": {},
"results": [...]
}
}
While more than one query can theoretically be submitted per request, batching is discouraged for performance and scalability reasons.
The precision of the results will be dependent on the amount of detail submitted with each example. The following properties are most helpful for particular types:
- Person: name, birthDate, nationality, idNumber, address
- Organization: name, country, registrationNumber, address
- Company: name, jurisdiction, registrationNumber, address, incorporationDate
Request
- Base URLhttps://api.opensanctions.org (the document declares no server; this is the origin it was published from)
- URLhttps://api.opensanctions.org/match/{dataset}
- Authnone declared
Path parameters
Data source or collection name to scope the query to.
Query parameters
The entity IDs supplied here do not have to be canonical. Supplying any of the referents of a merged entity will exclude that entity. This parameter may be useful for example to exclude false-positive matches that have been decided upon by a human.
Request body
Example request
{
"weights": {
"name_literal": 0.8
},
"config": {
"nm_number_mismatch": 0.4
}
}Response
Successful Response
Example response
{
"limit": 5
}Changes
- warning
removed the optional property
////from the response with the status - info
removed
subschema #1subschema #2from the////response propertyanyOflist for the response status - info
removed
subschema #1subschema #2from the////response propertyanyOflist for the response status - info
removed
subschema #1subschema #2from the////response propertyanyOflist for the response status - info
removed
subschema #1subschema #2from the////////response propertyanyOflist for the response status - info
removed
subschema #1subschema #2from the////////response propertyanyOflist for the response status - info
removed
subschema #1subschema #2from the////////response propertyanyOflist for the response status
- warning
- breaking
for the
queryrequest parameteralgorithm, default value was changed fromlogic-v1tobest - breaking
for the
queryrequest parametercutoff, default value was changed from0.5to0.7 - breaking
removed the required property
from the response with the status - breaking
removed the required property
////from the response with the status - info
added the new optional
queryrequest parameterexclude_entity_ids - info
added the new optional request property
- info
queryrequest parametercutoffwas deprecated - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
the response property
////became required for the status - info
the
response's property default valuefalsewas removed for the status - info
added the required property
////to the response with the status
- breaking