Hello everyone, I’ve written some code in R to search for officer objects corresponding to a list of names. For very common names the below call returns a lot of results, but increasing items_per_page= above 200 doesn’t seem to return more than 200 results. Is there any way to return more than 200 results in a call like this?
fh_url <- modify_url("https://api.companieshouse.gov.uk/search/officers", query=list(q=.x))
res <- GET(paste0(fh_url, "&items_per_page=200"), authenticate(key, ""))
jsonlite::fromJSON(content(res, "text",encoding = "utf-8"), flatten = TRUE)
I am wrapping this in a map() call against a character vector containing names for persons of interest, so .x here is the current position in the character vector.
I hold dates of birth for the officers I am trying to identify and could make my initial get request more specific, but as per the API documentation there doesn’t seem to be a straightforward way to add dob as a match criterion to a search company officers requests.
Is there an undocumented way that dob can be added as a search criterion to make the results of this query more specific for very common officer names?
I’d be grateful for any help.
Jan