# /hrw/reports/search

`POST /api/hrw/reports/search`

Price: 20 credits

Search Human Rights Watch reports by keyword, country, topic and year, newest first

## How to use it

Values inside one filter are combined with OR and different filters with AND. Pass a result's url to hrw/reports for the full text and PDF downloads.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `keyword` (string, nullable) — Words matched against report titles (examples: "Sudan", "children"; minLength: 1)
- `countries` (array, nullable) — Keep reports tagged with any of these regions or countries (one of: "Africa", "African Union", "Angola", "Benin", "Botswana", "Burkina Faso", "Burundi", "Cameroon", "Cape Verde", "Central African Republic", "Chad", "Comoros", "Congo (Brazzaville)", "Côte d'Ivoire", "Democratic Republic of Congo", "Djibouti", "Equatorial Guinea", "Eritrea", "Eswatini (formerly Swaziland)", "Ethiopia", "Gabon", "Gambia", "Ghana", "Guinea", "Guinea-Bissau", "Kenya", "Lesotho", "Liberia", "Madagascar", "Malawi", "Mali", "Mauritius", "Mozambique", "Namibia", "Niger", "Nigeria", "Rwanda", "Senegal", "Seychelles", "Sierra Leone", "Somalia", "South Africa", "South Sudan", "Sudan", "Tanzania", "Togo", "Uganda", "Zambia", "Zimbabwe", "Americas", "Antigua and Barbuda", "Argentina", "Bahamas", "Barbados", "Belize", "Bolivia", "Brazil", "Canada", "Chile", "Colombia", "Costa Rica", "Cuba", "Dominican Republic", "Ecuador", "El Salvador", "Falklands/Malvinas", "Grenada", "Guatemala", "Guyana", "Haiti", "Honduras", "Jamaica", "Mexico", "Nicaragua", "Panama", "Paraguay", "Peru", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Suriname", "Trinidad and Tobago", "Uruguay", "Venezuela", "Asia", "Afghanistan", "Australia", "Bangladesh", "Bhutan", "Brunei", "Cambodia", "China and Tibet", "Cook Islands", "Federated States of Micronesia", "Fiji", "India", "Indonesia", "Japan", "Kiribati", "Laos", "Malaysia", "Maldives", "Marshall Islands", "Mongolia", "Myanmar (Burma)", "Nauru", "Nepal", "New Zealand", "Niue", "North Korea", "Pakistan", "Palau", "Papua New Guinea", "Philippines", "Samoa", "Singapore", "Solomon Islands", "South Korea", "Sri Lanka", "Taiwan", "Thailand", "Timor-Leste", "Tonga", "Tuvalu", "Vanuatu", "Vietnam", "Europe/Central Asia", "Albania", "Andorra", "Armenia", "Austria", "Azerbaijan", "Belarus", "Belgium", "Bosnia and Herzegovina", "Bulgaria", "Croatia", "Cyprus", "Czech Republic", "Denmark", "Estonia", "European Union", "Finland", "France", "Georgia", "Germany", "Greece", "Holy See", "Hungary", "Iceland", "Ireland", "Italy", "Kazakhstan", "Kyrgyzstan", "Latvia", "Liechtenstein", "Lithuania", "Macedonia", "Malta", "Moldova", "Monaco", "Montenegro", "Netherlands", "Norway", "Poland", "Portugal", "Romania", "Russia", "San Marino", "Serbia/Kosovo", "Slovak Republic", "Slovenia", "Spain", "Sweden", "Switzerland", "Tajikistan", "Türkiye", "Turkmenistan", "Ukraine", "United Kingdom", "Uzbekistan", "Global", "Middle East/North Africa", "Algeria", "Bahrain", "Egypt", "Iran", "Iraq", "Israel/Palestine", "Jordan", "Kuwait", "Lebanon", "Libya", "Mauritania", "Morocco/Western Sahara", "Oman", "Qatar", "Saudi Arabia", "Syria", "Tunisia", "United Arab Emirates", "Yemen", "United States", "Criminal Justice", "Immigrants' Rights and Border Policy", "National Security", "US Foreign Policy", "Democracy", "Economic Justice", "Racial Justice")
- `topics` (array, nullable) — Keep reports tagged with any of these topics (one of: "Arms", "Cluster Munitions", "Killer Robots", "Landmines", "Explosive Weapons in Populated Areas", "Incendiary Weapons", "Children's Rights", "Education", "Attacks on Education", "Children Separated from Families", "Children and Armed Conflict", "Child Labor", "Youth Justice", "Migrant and Refugee Children", "Intersex Children", "Crisis and Conflict", "Disability Rights", "Shackling", "Economic Justice and Rights", "Corporate Accountability", "Oil, Mining, and Natural Resources", "Poverty and Inequality", "World Bank, IMF", "Environment and Human Rights", "Climate Change", "Deforestation", "Fossil Fuels", "Free Speech", "Press Freedom", "Religious Freedom", "Health", "Sexual and Reproductive Health", "Detention Centers", "Disasters and Displaced Populations", "Environment and Health", "Health Care Access", "HIV/AIDS and Tuberculosis", "Palliative Care", "Attacks on Health", "LGBT Rights", "Refugees and Migrants", "Asylum Seekers", "Internally Displaced People", "Exploitation, Forced Labor & Trafficking", "Migrants", "Rights of Older People", "International Justice", "Charles Taylor", "International Criminal Court", "Joseph Kony - Lord's Resistance Army", "Peace and Justice", "Bosco Ntaganda", "Universal Jurisdiction", "Sport and Human Rights", "Technology and Rights", "Digital Investigations Lab", "Terrorism / Counterterrorism", "CIA Activities", "Detention without Trial", "Edward Snowden", "Guantanamo", "Guantanamo - Military Commissions", "Targeted Killings and Drones", "Torture", "United Nations", "Human Rights Council", "Women's Rights", "Forced Marriage", "Gender Based Violence", "Domestic Workers", "Gender Equality", "Reproductive Rights", "Sexual Violence", "Labor Rights", "Sex Work", "Women and Armed Conflict", "Women's Health")
- `year` (integer, nullable) — Keep reports published in this year (examples: 2019; min: 1978; max: 2100)
- `count` (integer, required) — Max number of reports to return (min: 1; max: 1000)

## Response

### 200 — Successful Response

- `@type` (string) (default: "HrwCard")
- `url` (string, required)
- `kind` (string, nullable)
- `subtitle` (string, nullable)
- `description` (string, nullable)
- `label` (string, nullable)
- `published_date` (string, nullable)
- `image` (string, nullable)
- `language` (string, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

