From e93da2b7c43467c3864894c0bcd6392263a7752e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 21 Nov 2024 09:01:58 -0500 Subject: [PATCH] Add API options for search --- api/API.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/API.md b/api/API.md index 969c109f..1db22eb6 100644 --- a/api/API.md +++ b/api/API.md @@ -240,6 +240,13 @@ search parameter. A search with no matches will return a 200 HTTP code, a `success` value of `true`, and a `data` property that is an empty list (see below). +#### Other parameters + +Additional parameters for all search types: + +- `type`: limit the search to only actors of a certain type. One of 'planet', 'country', 'adm1', 'adm2', 'city', 'organization', 'site'. +- `order`: how to order the results. Can be 'population'. More in the future. + #### Output Standard output. `data` is an object representing the list of matching actors, each with the following properties: @@ -304,4 +311,3 @@ Standard output. `data` is an object with fields representing the different stat - `number_of_regions_with_targets`: count of regions (adm1 or adm2) with at least one targets record - `number_of_cities_with_emissions`: count of cities with at least one emissions record - `number_of_cities_with_targets`: count of cities with at least one emissions record -