<div dir="ltr">Hi! <div><br></div><div>A rgbif user is asking me about a particular download query, see <a href="https://github.com/ropensci/rgbif/issues/245">https://github.com/ropensci/rgbif/issues/245</a> </div><div><br></div><div>TLDR: AFAICT this can't work as the API is set up right now. Or am I wrong?  </div><div><br></div><div>That is, he wants to get data for records that match</div><div><br></div><div>- 10 taxa with their taxonKey value</div><div>- 3 different basisofrecord values</div><div>- country = US </div><div>- hasCoordinate = TRUE</div><div>- hasGeospatialIssue = FALSE</div><div>- year range between 1949 and 2011</div><div>- month range between 3 and 8</div><div><br></div><div>For the taxonKey values, I think he needs to combine those with <b>OR</b> operator:</div><div><br></div><div><div>"predicate": {</div><div>        "type": "or",</div><div>        "predicates": [</div><div>            {</div><div>                "type": "equals",</div><div>                "key": "TAXON_KEY",</div><div>                "value": "2475470"</div><div>            },</div><div>            {</div><div>                "type": "equals",</div><div>                "key": "TAXON_KEY",</div><div>                "value": "2475470"</div><div>            }</div><div>        ]</div><div>    }</div></div><div><br></div><div>However, he should combine the other parameters (basisofrecord, hasCoordinate, year, month, etc) using <b>AND</b> AFAICT. </div><div><br></div><div><b>BUT</b>, AFAICT the API only allows one <b>predicate</b> key so you can't do what I think is needed here. That is, to say (taxonkey = 1 OR 2 OR 3) + (country = US AND hasCoordinate = true, etc.)</div><div><br></div><div>I tried sending two <b>predicate</b> keys in the API and only the second goes through. </div><div><br></div><div>Any guidance much appreciated :)</div><div><br></div><div>The best solution I can think of is to do the query he's doing, but do one for each taxon. Seem like a good solution?</div><div><br></div><div>Best, Scott<br></div></div>