private static String getIfOnly(String name, String searchQuery, List<PropertiesJson> values) {
    if (values.size() > 1) {
      throw new IllegalArgumentException(
        "Multiple " + name + " for '" + searchQuery + "': " + values.stream().map(d -> d.id).collect(
          Collectors.joining(", ")));
    } else if (values.size() == 1) {
      return values.getFirst().urls.get("pbf");
    } else {
      return null;
    }
  }
Fetches the Geofabrik index and searches for a {@code .osm.pbf} resource to download where ID or name field
contains all the tokens in {@code searchQuery}.
<p>
If an exact match is found, returns that. Otherwise, looks for a resource that contains {@code searchQuery} as a
substring.
<p>
The index is only fetched once and cached after that.

@param searchQuery the tokens to search for
@param config      planetiler config with user-agent and timeout to use when downloading files
@return the URL of a {@code .osm.pbf} file with name or ID matching {@code searchQuery}
@throws IllegalArgumentException if no matches, or more than one match is found.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Geofabrik.java