Create Case
The Create Case endpoint allows you to initiate a media watcher case by specifying various parameters for the search. You can define criteria such as the search type, target entity name, countries, language preferences, and specific keywords. This endpoint is used to create a new adverse media search case.
Endpoint: https://api.amlwatcher.com/api/adverse-media/create
Method: POST
- HTTP
- Javascript
- PHP
- Python
- Ruby
- Java
- cURL
- C#
- Go
Sample Request
POST /api/adverse-media/create HTTP/1.1
Host: api.amlwatcher.com
Authorization: Bearer Token
Content-Type: application/json
Content-Length: 573
{
"name": "Joe Biden",
"search_type": "exact_match",
"country": "US",
"language": "en",
"keywords_criteria": {
"include": "politics",
"exclude": "corrupt",
"any": "court force"
},
"data_duration": {
"number": "10",
"unit": "years"
}
}
Sample Request
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer Token");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
name: "Joe Biden",
search_type: "exact_match",
country: "US",
language: "en",
keywords_criteria: {
include: "politics",
exclude: "corrupt",
any: "court force",
},
data_duration: {
number: "10",
unit: "years",
},
});
var requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow",
};
fetch("https://api.amlwatcher.com/api/adverse-media/create", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Sample Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.amlwatcher.com/api/adverse-media/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"name": "Joe Biden",
"search_type": "exact_match",
"country": "US",
"language": "en",
"keywords_criteria": {
"include": "politics",
"exclude": "corrupt",
"any": "court force"
},
"data_duration": {
"number": "10",
"unit": "years"
}
}
',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sample Request
import requests
import json
url = "https://api.amlwatcher.com/api/adverse-media/create"
payload = json.dumps({
"name": "Joe Biden",
"search_type": "exact_match",
"country": "US",
"language": "en",
"keywords_criteria": {
"include": "politics",
"exclude": "corrupt",
"any": "court force"
},
"data_duration": {
"number": "10",
"unit": "years"
}
})
headers = {
'Authorization': 'Bearer Token',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Sample Request
require "uri"
require "json"
require "net/http"
url = URI("https://api.amlwatcher.com/api/adverse-media/create")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"name": "Joe Biden",
"search_type": "exact_match",
"country": "US",
"language": "en",
"keywords_criteria": {
"include": "politics",
"exclude": "corrupt",
"any": "court force"
},
"data_duration": {
"number": "10",
"unit": "years"
}
})
response = https.request(request)
puts response.read_body
Sample Request
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
HttpURLConnection connection = null;
DataOutputStream outputStream = null;
try {
// Define the URL
URL url = new URL("https://api.amlwatcher.com/api/adverse-media/create");
// Open a connection to the URL
connection = (HttpURLConnection) url.openConnection();
// Set the request method to POST
connection.setRequestMethod("POST");
// Set the request headers
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Authorization", "Bearer Token");
// Enable input/output streams
connection.setDoOutput(true);
// Define the JSON request body
String jsonPayload = "{\n" +
" \"name\": \"Joe Biden\",\n" +
" \"search_type\": \"exact_match\",\n" +
" \"country\": [\"US\"],\n" +
" \"language\": \"en\",\n" +
" \"keywords_criteria\": {\n" +
" \"include\": \"politics\",\n" +
" \"exclude\": \"corrupt\",\n" +
" \"any\": \"court force\"\n" +
" },\n" +
" \"data_duration\": {\n" +
" \"number\": \"10\",\n" +
" \"unit\": \"years\"\n" +
" },\n" +
"}";
// Write the JSON request body
outputStream = new DataOutputStream(connection.getOutputStream());
outputStream.writeBytes(jsonPayload);
outputStream.flush();
// Get the response code
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader in;
if (responseCode >= 200 && responseCode < 300) {
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
} else {
in = new BufferedReader(new InputStreamReader(connection.getErrorStream()));
}
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("Response: " + response.toString());
connection.disconnect();
} catch (Exception e) {
e.printStackTrace();
}
}
}
Sample Request
curl --location --request POST 'https://api.amlwatcher.com/api/adverse-media/create'
--header 'Content-Type: application/json'
--data '{
"name": "Joe Biden",
"search_type": "exact_match",
"country": "US",
"language": "en",
"keywords_criteria": {
"include": "politics",
"exclude": "corrupt",
"any": "court force"
},
"data_duration": {
"number": "10",
"unit": "years"
}
}'
Sample Request
using RestSharp;
using System;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var options = new RestClientOptions("https://api.amlwatcher.com")
{
ThrowOnAnyError = true,
Timeout = TimeSpan.FromMilliseconds(-1),
};
var client = new RestClient(options);
var request = new RestRequest("/api/adverse-media/create", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = new
{
name= "Joe Biden",
search_type= "exact_match",
country= "US",
language= "en",
keywords_criteria= {
"include": "politics",
"exclude": "corrupt",
"any": "court force"
},
data_duration= {
"number": "10",
"unit": "years"
}
};
request.AddJsonBody(body);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
}
}
Sample Request
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.amlwatcher.com/api/adverse-media/create"
method := "POST"
payload := strings.NewReader(`{
name= "Joe Biden",
search_type= "exact_match",
country= "US",
language= "en",
keywords_criteria= {
"include": "politics",
"exclude": "corrupt",
"any": "court force"
},
data_duration= {
"number": "10",
"unit": "years"
}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Request
Parameters | Required | Type | Description |
---|---|---|---|
name | Yes | String | The name of the entity to search. Must be between 2 and 100 characters and should not be composed entirely of special characters or numbers. |
search_type | Yes | String | The type of search. Use exact_match for precise results or fuzzy for broader matching. Default is exact_match. |
country | No | String | The country code from which to gather adverse media results. See Countries Example: US. |
language | No | String | The language code in which the search should be conducted. See Languages Example: en or es. |
keywords_criteria | No | Object | Criteria for keyword filtering. Contains three optional sub-fields (include, exclude, any), each limited to 50 characters. |
data_duration | No | Object | Specifies the time range for the search. Consists of: - number: Amount of time. - unit: One of days, weeks, months, or years. Default is 10 years. |
Response
Parameters | Description |
---|---|
error | Whenever there is an error in your request, this param will have details of that error; otherwise it’ll remain empty. |
status | The status field is set to either “SUCCESS” or “FAIL”, indicating that the API request resulted in a successful or failure/error condition respectively. |
data | An array containing the actual response elements. |
Sample Response
{
"error": false,
"status": "SUCCESS",
"data": {
"adverse_search_reference": "814ee9e06cb4f236027f13a2",
"created_at": "Wed, 01 Jan 2025 05:12:52 GMT",
"more_results_available": true,
"results": [
{
"description": "President’s son is accused of avoiding at least $1.4m in taxes while enjoying lucrative income from business dealings.",
"link": "https://www.aljazeera.com/news/2024/9/5/hunter-biden-set-to-plead-guilty-in-us-federal-tax-case",
"media_response": {
"adverse_keywords": [
"tax evasion",
"guilty plea",
"misdemeanor",
"felony",
"gun charges",
"fraud",
"drug",
"escorts"
],
"adverse_media_status": true,
"author_name": "Al Jazeera",
"category": "Financial Crimes",
"entity_relevance": true,
"entity_type": "person",
"industry": "Others",
"occupation": "Others",
"publication_date": null,
"sentiment": "Moderately Negative",
"sentiment_analysis": "The article centers on Hunter Biden's guilty plea to federal tax evasion charges, involving significant unpaid taxes and alleged spending on personal luxuries. The case is highly relevant to his father, President Joe Biden, particularly given its timing during the election cycle and accusations of leveraging political influence for business dealings. This directly implicates Hunter Biden in adverse media.",
"sentiment_impact": "negative",
"sentiment_score": -2
},
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTgdz05NJLI4m3ZNSLzpKqKWdltzAWELUo9dGN8AWsmSxfB_RgR1prQH8g&s",
"title": "Hunter Biden pleads guilty in US federal tax evasion case"
},
{
"description": "Biden ended his first presidential campaign during a break in the confirmation hearings of Supreme Court nominee Robert Bork. As chair of the Senate Judiciary Committee, Biden sunk the nomination.",
"link": "https://www.npr.org/2019/12/21/789323826/for-joe-biden-1987-brought-triumph-in-the-wake-of-political-setback",
"media_response": {
"adverse_keywords": ["plagiarism", "scandal"],
"adverse_media_status": true,
"author_name": "NPR",
"category": "Misconduct",
"entity_relevance": true,
"entity_type": "person",
"industry": "Not Applicable",
"occupation": "Politician",
"publication_date": null,
"sentiment": "Slightly Negative",
"sentiment_analysis": "The article discusses Joe Biden's withdrawal from the 1988 presidential race due to plagiarism charges. While it also highlights his success in blocking Robert Bork's Supreme Court nomination, the primary focus is on the negative impact of the plagiarism scandal on his campaign. The sentiment is negative due to the scandal and its impact on Biden's presidential aspirations.",
"sentiment_impact": "negative",
"sentiment_score": -1
},
"thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTAawVPbrve1LiYkwbYeVqMOIzwKoIOuWoVhyr_AFzoTIk-3eeN70V18f53&s",
"title": "For Joe Biden, 1987 Brought Triumph In The Wake Of Political Setback"
}
],
"search_filters": {
"country": "United States",
"data_duration": {
"number": "10",
"unit": "years"
},
"keywords_criteria": {
"any": "court force",
"exclude": "corrupt",
"include": "politics"
},
"language": "English",
"name": "Joe Biden",
"search_type": "exact_match",
"sources_criteria": {}
},
"summary": {
"adverse_categories": {
"Financial Crimes": 1,
"Misconduct": 1
},
"adverse_keywords": {
"drug": 1,
"escorts": 1,
"felony": 1,
"fraud": 1,
"guilty plea": 1,
"gun charges": 1,
"misdemeanor": 1,
"plagiarism": 1,
"scandal": 1,
"tax evasion": 1
},
"entity_type": "person",
"industry": ["Not Applicable", "Others"],
"occupations": ["Politician", "Others"],
"sentiment": "Moderately Negative",
"sentiment_score": -2
},
"total_results": 2
}
}
Response
Parameter | Description |
---|---|
error | Indicates whether an error occurred during the API request. In this response, "error": false signifies that the request was successful without any issues. |
status | The status of the API request, confirming its success as "SUCCESS" in this response. |
data | The main payload containing detailed information retrieved from the API, encompassing the search metadata, results, and summary. |
data.adverse_search_reference | The unique reference ID for the adverse media search. This ID can be used to track or reference the search request. |
data.created_at | The date and time when the search was created in GMT format ("Tue, 29 Oct 2024 10:35:00 GMT"). |
data.match_status | The status of the match. "Potential Match" indicates that the searched case is a match. |
data.more_results_available | A boolean indicating if there are more results available than are provided in the current response. true here implies additional results are accessible beyond the three returned. |
data.results | An array of objects where each entry provides specific information about an article or piece of media related to the entity (e.g., adverse media reports on Nawaz Sharif). |
data.results[].description | A brief description or excerpt of the article's content, providing context about the adverse media topic. |
data.results[].link | The direct URL to the source article, allowing users to view the full content. |
data.results[].media_response | An object containing detailed information about the adverse media findings, including keywords, sentiment analysis, and the adverse media status. |
data.results[].media_response.adverse_keywords | An array of keywords associated with adverse mentions in the article, such as "corruption" and "arrest". |
data.results[].media_response.adverse_media_status | A boolean or string indicating if the article qualifies as adverse media. true or "TRUE" signifies adverse media was detected. |
data.results[].media_response.author_name | The author or publishing entity of the article (e.g., "NDTV.com"). |
data.results[].media_response.category | The category of the adverse event (e.g., "Financial Crimes"), providing context for the nature of the media coverage. |
data.results[].media_response.entity_relevance | A boolean indicating if the entity is relevant to the adverse media, with true signifying direct relevance. |
data.results[].media_response.entity_type | The type of entity discussed in the article, such as "Person". |
data.results[].media_response.occupation | The occupation of the entity, here indicating "Politician". |
data.results[].media_response.publication_date | The date when the article was published, if available. |
data.results[].media_response.sentiment_analysis | A summary describing the sentiment of the article, such as accusations or legal challenges involving the entity, and its implication on the entity’s reputation. |
data.results[].media_response.sentiment_impact | The impact of the article’s sentiment, typically "negative" in adverse media contexts. |
data.results[].media_response.sentiment_score | A numeric sentiment score, with values closer to zero generally indicating negative sentiment. |
data.results[].source_country | The country of origin for the article or media source (e.g., "India"). |
data.results[].thumbnail | A URL to a thumbnail image representing the article, if available. |
data.results[].title | The title of the article, giving a brief headline or subject of the content. |
data.search_filters | Object containing the search filters applied to the adverse media search, like keywords and time duration. |
data.search_filters.country | The country filter applied in the search, if specified. |
data.search_filters.data_duration | Object defining the duration of data for the search, including "number" (e.g., 1) and "unit" (e.g., "days"). |
data.search_filters.keywords_criteria | Object defining the criteria for keywords included, excluded, or matched in any part of the search. |
data.search_filters.language | The language filter applied in the search, if any. |
data.search_filters.name | The entity name being searched, in this case, "nawaz sharif". |
data.search_filters.search_type | The type of match used for the search, such as "exact_match". |
data.search_filters.sources_criteria | Criteria defining the sources included in the search, if any. |
data.summary | A summary object that consolidates adverse media insights, like categories, keywords, entity type, occupations, and sentiment. |
data.summary.adverse_categories | Object with categories of adverse media identified in the results, showing counts per category (e.g., "Financial Crimes": 4). |
data.summary.adverse_keywords | Object listing keywords that appear in the results, with counts showing frequency. |
data.summary.entity_type | Specifies the entity type, "Person" in this context. |
data.summary.occupations | An array of occupations associated with the entity (e.g., "Politician"). |
data.summary.sentiment_score | An aggregated sentiment score across all results, with lower values indicating generally negative sentiment. |
data.total_results | The total number of results found in the search, providing a count (3 in this example). |