Skip to content

Commit

Permalink
Add API options for search
Browse files Browse the repository at this point in the history
  • Loading branch information
evanp committed Nov 21, 2024
1 parent 874dccd commit e93da2b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit e93da2b

Please sign in to comment.