For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://api-doc-new.gideononline.com/gideon-api-1-0/diseases/llms.txt. For full documentation content, see https://api-doc-new.gideononline.com/gideon-api-1-0/diseases/llms-full.txt.

# /diseases/surveys/filter-options

GET https://api.gideononline.com/diseases/surveys/filter-options

Returns **distinct filter values** for building survey filter UIs, aligned with **`GET /diseases/surveys/filter`**. Pass the same optional query parameters to reflect the current filter context.

With **no** parameters, the server uses a faster path over the full survey set. With **any** parameter present, each facet’s options are computed so that dimension is not over-constrained by its own filter (you can still narrow other dimensions).

- **`regions`** — Populated only when **`country`** is supplied and matching surveys include subdivision-level geography; each item has `region_id` and `region_name`.
- **`survey_size`** — Buckets that actually appear in the filtered data; `size` is a display label (some ranges use comma formatting), `size_id` is what you pass as `size` on the filter endpoint.
- **`years`** — `survey_start_years` merges distinct start years with publication years; `survey_end_years` uses end year or start when end is missing.

#### **Query parameters**

| Name | Description |
| --- | --- |
| `disease` | Disease id; limits options to surveys for that disease. |
| `country` | GIDEON country code; enables populated `regions` when subdivision-level data exists. |
| `survey_start_year` | Minimum survey start year; influences `years.survey_start_years`. |
| `survey_end_year` | Maximum survey end year (uses start year when a survey has no end year). |
| `test_type` | Substring match on test-type labels. |
| `pathogen` | Substring match on pathogen labels. |
| `population` | Survey population group id. |
| `region` | Subdivision (state) code. |
| `type` | `Prevalence` or `Seroprevalence`. |
| `percentRange` | Primary percent filter; same syntax as `GET /diseases/surveys/filter`. |
| `size` | Survey size bucket; use a `size_id` value from `survey_size` in the response. |

#### **Response**

`data` is an object with: `diseases`, `countries`, `populations`, `test_types`, `pathogens`, `regions`, `survey_types`, `survey_size`, `years`. The saved example trims each facet; live responses are larger.

Reference: https://api-doc-new.gideononline.com/gideon-api-1-0/diseases/diseases-surveys-filter-options

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /diseases/surveys/filter-options:
    get:
      operationId: diseases-surveys-filter-options
      summary: /diseases/surveys/filter-options
      description: >-
        Returns **distinct filter values** for building survey filter UIs,
        aligned with **`GET /diseases/surveys/filter`**. Pass the same optional
        query parameters to reflect the current filter context.


        With **no** parameters, the server uses a faster path over the full
        survey set. With **any** parameter present, each facet’s options are
        computed so that dimension is not over-constrained by its own filter
        (you can still narrow other dimensions).


        - **`regions`** — Populated only when **`country`** is supplied and
        matching surveys include subdivision-level geography; each item has
        `region_id` and `region_name`.

        - **`survey_size`** — Buckets that actually appear in the filtered data;
        `size` is a display label (some ranges use comma formatting), `size_id`
        is what you pass as `size` on the filter endpoint.

        - **`years`** — `survey_start_years` merges distinct start years with
        publication years; `survey_end_years` uses end year or start when end is
        missing.


        #### **Query parameters**


        | Name | Description |

        | --- | --- |

        | `disease` | Disease id; limits options to surveys for that disease. |

        | `country` | GIDEON country code; enables populated `regions` when
        subdivision-level data exists. |

        | `survey_start_year` | Minimum survey start year; influences
        `years.survey_start_years`. |

        | `survey_end_year` | Maximum survey end year (uses start year when a
        survey has no end year). |

        | `test_type` | Substring match on test-type labels. |

        | `pathogen` | Substring match on pathogen labels. |

        | `population` | Survey population group id. |

        | `region` | Subdivision (state) code. |

        | `type` | `Prevalence` or `Seroprevalence`. |

        | `percentRange` | Primary percent filter; same syntax as `GET
        /diseases/surveys/filter`. |

        | `size` | Survey size bucket; use a `size_id` value from `survey_size`
        in the response. |


        #### **Response**


        `data` is an object with: `diseases`, `countries`, `populations`,
        `test_types`, `pathogens`, `regions`, `survey_types`, `survey_size`,
        `years`. The saved example trims each facet; live responses are larger.
      tags:
        - subpackage_diseases
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Diseases_/diseases/surveys/filter-options_Response_200
servers:
  - url: https://api.gideononline.com
  - url: https://api-test.gideononline.com
components:
  schemas:
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataYears:
      type: object
      properties:
        survey_end_years:
          type: array
          items:
            type: integer
        survey_start_years:
          type: array
          items:
            type: integer
      required:
        - survey_end_years
        - survey_start_years
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataYears
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataDiseasesItems:
      type: object
      properties:
        disease_id:
          type: integer
        disease_name:
          type: string
      required:
        - disease_id
        - disease_name
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataDiseasesItems
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataCountriesItems:
      type: object
      properties:
        country_id:
          type: string
        country_name:
          type: string
      required:
        - country_id
        - country_name
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataCountriesItems
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataPathogensItems:
      type: object
      properties:
        pathogen_id:
          type: integer
        pathogen_name:
          type: string
      required:
        - pathogen_id
        - pathogen_name
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataPathogensItems
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataTestTypesItems:
      type: object
      properties:
        test_type_id:
          type: integer
        test_type_name:
          type: string
      required:
        - test_type_id
        - test_type_name
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataTestTypesItems
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataPopulationsItems:
      type: object
      properties:
        population_id:
          type: integer
        population_name:
          type: string
      required:
        - population_id
        - population_name
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataPopulationsItems
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataSurveySizeItems:
      type: object
      properties:
        size:
          type: string
        size_id:
          type: string
      required:
        - size
        - size_id
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataSurveySizeItems
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataSurveyTypesItems:
      type: object
      properties:
        survey_id:
          type: string
        survey_name:
          type: string
      required:
        - survey_id
        - survey_name
      title: >-
        DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataSurveyTypesItems
    DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        years:
          $ref: >-
            #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataYears
        regions:
          type: array
          items:
            description: Any type
        diseases:
          type: array
          items:
            $ref: >-
              #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataDiseasesItems
        countries:
          type: array
          items:
            $ref: >-
              #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataCountriesItems
        pathogens:
          type: array
          items:
            $ref: >-
              #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataPathogensItems
        test_types:
          type: array
          items:
            $ref: >-
              #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataTestTypesItems
        populations:
          type: array
          items:
            $ref: >-
              #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataPopulationsItems
        survey_size:
          type: array
          items:
            $ref: >-
              #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataSurveySizeItems
        survey_types:
          type: array
          items:
            $ref: >-
              #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaDataSurveyTypesItems
      required:
        - years
        - regions
        - diseases
        - countries
        - pathogens
        - test_types
        - populations
        - survey_size
        - survey_types
      title: DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaData
    Diseases_/diseases/surveys/filter-options_Response_200:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/DiseasesSurveysFilterOptionsGetResponsesContentApplicationJsonSchemaData
      required:
        - data
      title: Diseases_/diseases/surveys/filter-options_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

```

## SDK Code Examples

```python Diseases_/diseases/surveys/filter-options_example
import requests

url = "https://api.gideononline.com/diseases/surveys/filter-options"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Diseases_/diseases/surveys/filter-options_example
const url = 'https://api.gideononline.com/diseases/surveys/filter-options';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Diseases_/diseases/surveys/filter-options_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.gideononline.com/diseases/surveys/filter-options"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Diseases_/diseases/surveys/filter-options_example
require 'uri'
require 'net/http'

url = URI("https://api.gideononline.com/diseases/surveys/filter-options")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Diseases_/diseases/surveys/filter-options_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.gideononline.com/diseases/surveys/filter-options")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php Diseases_/diseases/surveys/filter-options_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.gideononline.com/diseases/surveys/filter-options', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Diseases_/diseases/surveys/filter-options_example
using RestSharp;

var client = new RestClient("https://api.gideononline.com/diseases/surveys/filter-options");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Diseases_/diseases/surveys/filter-options_example
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.gideononline.com/diseases/surveys/filter-options")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```