## ONU / Sanções
Pesquisa indivíduos e entidades presentes na lista de sanções do conselho de segurança da Organização das Nações Unidas.


### Site URL
- https://www.un.org/securitycouncil/content/un-sc-consolidated-list

### Request
POST endpoint: `https://api.infosimples.com/api/v2/consultas/onu/sancoes`



| Parameter   | Description                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token*      | The token that will authenticate and authorize the request.                                                                                                                                                                                                                                                                                                                                                                   |
| query*      | Search term.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| min_score** | Valor entre 0 e 100 a ser usado como score de relevância para o retorno de um registro. Por padrão é 0, o que significa que retorna todos os registros com alguma relevância, mesmo que pequena. Este parâmetro não existe originalmente no site da ONU, mas foi adicionado pela Infosimples para permitir um controle mais fino sobre os resultados retornados. É baseado num algoritmo de busca de termos dentro de textos. |

> * Required parameter.

> ** Optional parameter. Sometimes it is necessary to set at least one of the optional parameters for the service to work properly.


### Response examples (OK)
```json
{
  "code": 200,
  "code_message": "A requisição foi processada com sucesso.",
  "errors": [],
  "header": {
    "api_version": "v2",
    "service": "onu/sancoes",
    "parameters": {
      "query": "SHARIFF"
    },
    "client_name": "Minha Empresa",
    "token_name": "Token de Produção",
    "billable": true,
    "price": "0.2",
    "requested_at": "2019-03-11T10:37:17.000-03:00",
    "elapsed_time_in_milliseconds": 3,
    "remote_ip": "111.111.111.111",
    "signature": "U2FsdGVkX18jDa8ba3Qxv00KvjK42XisK2lUMn7DwlVVG8UTWSt6H3I7oWZ2MQr33yWvx9n4k0ko68jtuSVuxA=="
  },
  "data_count": 1,
  "data": [
    {
      "count": 1,
      "resultados": [
        {
          "type": "INDIVIDUAL",
          "data_id": "1111111",
          "first_name": "Nome de Exemplo",
          "second_name": "Nome de Exemplo",
          "third_name": "Nome de Exemplo",
          "fourth_name": "Nome de Exemplo",
          "un_list_type": "Somalia",
          "reference_number": "SOi.111",
          "listed_on": "2012-08-23",
          "gender": "",
          "submitted_by": "",
          "submitted_on": null,
          "comments1": " INTERPOL-UN Security Council Special Notice web link: https://www.interpol.int/en/notice/search/un/5775564",
          "nationality": "",
          "nationality2": "",
          "title": "",
          "designation": "",
          "list_type": "UN List",
          "last_day_updated": null,
          "aliases": "; Makaburi; Sheikh Abubakar Ahmed; Abubaker Shariff Ahmed; Abu Makaburi Shariff; Abubaker Shariff; Abubakar Ahmed",
          "document_number": "",
          "delisted_on": null
        },
        {
          "type": "INDIVIDUAL",
          "data_id": "111111",
          "first_name": "Nome de Exemplo",
          "second_name": "Nome de Exemplo",
          "third_name": "Nome de Exemplo",
          "fourth_name": "Nome de Exemplo",
          "un_list_type": "Al-Qaida",
          "reference_number": "QDi.111",
          "listed_on": "2001-10-17",
          "gender": "",
          "submitted_by": "",
          "submitted_on": null,
          "comments1": "Apprehended in July 2004 and in custody for trial in the United States of\n            America, as at October 2010. Review pursuant to Security Council resolution 1822 (2008)\n            was concluded on 21 Jun. 2010. INTERPOL-UN Security Council Special Notice web link: https://www.interpol.int/en/notice/search/un/5947737",
          "nationality": "United Republic of Tanzania",
          "nationality2": "",
          "title": "",
          "designation": "",
          "list_type": "UN List",
          "last_day_updated": "2010-10-21",
          "aliases": "Ahmad, Abu Bakr; Ahmed, Abubakar; Ahmed, Abubakar K.; Ahmed, Abubakar Khalfan; Ahmed, Abubakary K.; Ahmed, Ahmed Khalfan; Ali, Ahmed Khalfan; Ghailani, Abubakary Khalfan Ahmed; Ghailani, Ahmed; Ghilani, Ahmad Khalafan; Hussein, Mahafudh Abubakar Ahmed Abdallah; Khalfan, Ahmed; Mohammed, Shariff Omar; Haythem al-Kini; Ahmed The Tanzanian; Foopie; Fupi; Ahmed, A; Al Tanzani, Ahmad; Bakr, Abu; Khabar, Abu; ; ; ",
          "document_number": "",
          "delisted_on": null
        }
      ],
      "site_origem": "https://wwww....",
      "site_receipt": null
    }
  ],
  "site_receipts": []
}
```


### Preview file

The preview file (`site_receipts`) in the response JSON is **generated by the source (website/app)** that processed the automation.

### Code snippets


#### Python
```python
# Tested with: Python 3.10.19, Python 3.14.0
import requests

url = 'https://api.infosimples.com/api/v2/consultas/onu/sancoes'
args = {
  "query":     "VALUE_OF_PARAMETER_QUERY",
  "min_score": "VALUE_OF_PARAMETER_MIN_SCORE",
  "token":     "WRITE_YOUR_TOKEN_HERE",
  "timeout":   "300"
}

response = requests.post(url, args)
response_json = response.json()
response.close()

if response_json['code'] == 200:
  print("Retorno com sucesso: ", response_json['data'])
elif response_json['code'] in range(600, 799):
  mensagem = "Resultado sem sucesso. Leia para saber mais: \n"
  mensagem += "Código: {} ({})\n".format(response_json['code'], response_json['code_message'])
  mensagem += "; ".join(response_json['errors'])
  print(mensagem)

print("Cabeçalho da consulta: ", response_json['header'])
print("URLs com arquivos de visualização (HTML/PDF): ", response_json['site_receipts'])
```


## We are here to help
Do you still need to figure something out? Reach us at [suporte@infosimples.com.br](mailto:suporte@infosimples.com.br) and our highly qualified support team will be happy to help.
