How can I restrict the search space when querying GEO?
You can use the following query to first search GEO to get a list of GEO Series of interest, then find all linked SRA runs and perform a second filter step to keep only the SRA runs that satisfy another set of criteria as shown below.
esearch \
  -db gds \
  -query &quot;daf-2[all fields] \
    AND expression profiling by high throughput sequencing [DataSet Type] \
    AND Caenorhabditis elegans [organism]&quot; \
  | elink \
  -db gds -target sra \
  | esearch \
  -query &quot;(#3) \
    AND Caenorhabditis elegans [organism]&quot; \
  | efetch -format runinfo

Here, I am combining two independent queries using the (#3) term in the second query. More information about this is in the &quot;Combining Independent Queries&quot; subsection of &quot;Searching and Filtering&quot; section of the Entrez Direct documentation.