> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avert.ldeo.columbia.edu/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Visible Imagery

> Search for visible images based on site, volcano number, and optional time range

## Overview

This endpoint allows you to search for visible images captured by cameras directed towards target volcanoes. You can filter results by site, volcano number, and time range.

## Usage Examples

### Basic Query

Search for all visible images from a specific site and volcano:

```python theme={null}
import requests

response = requests.get(
    "https://avert-legacy.ldeo.columbia.edu/api/imagery/visible/query",
    params={
        "site": "CLNE",
        "vnum": 311240
    }
)
images = response.json()
```

### Time-Range Query

Search for visible images within a specific time range:

```python theme={null}
import requests

response = requests.get(
    "https://avert-legacy.ldeo.columbia.edu/api/imagery/visible/query",
    params={
        "site": "CLNE",
        "vnum": 311240,
        "search_from": "2022-10-01T00:00",
        "search_to": "2022-10-02T00:00"
    }
)
images = response.json()
```

### Download as Zip

Download results as a zip file instead of JSON metadata (works only for ≤ 100 results):

```python theme={null}
import requests

response = requests.get(
    "https://avert-legacy.ldeo.columbia.edu/api/imagery/visible/query",
    params={
        "site": "CLNE",
        "vnum": 311240,
        "search_from": "2022-10-01T00:00",
        "search_to": "2022-10-02T00:00",
        "download": True
    }
)
# Response will be a zip file containing images (not JSON)
with open("visible_images.zip", "wb") as f:
    f.write(response.content)
```

## Notes

* **Default behavior**: Returns JSON metadata about images matching your criteria
* **Large result sets**: Queries without time ranges can return thousands of results
* **With `download=true`**: Returns a zip file containing the actual image files (≤100 results only)
* Time parameters should be in ISO 8601 format

## Playground Testing Tips

The playground is pre-configured with optimal defaults that return \~10 results:

* **Default time range**: `2024-05-30 12:00` to `2024-05-30 14:00` (2-hour midday window)
* **Expected results**: \~11 visible images
* **Response size**: Manageable JSON that displays properly

### Quick Test

<Steps>
  <Step title="Click Try It">Click the green Try It button above</Step>

  <Step title="Check required fields">
    Required fields are already filled: `site=CLNE`, `vnum=311240`
  </Step>

  <Step title="Verify time range">
    Time range defaults are set for optimal testing
  </Step>

  <Step title="Send request">
    Click **"Send"** - you'll see clean JSON with \~10 results!
  </Step>
</Steps>

<Warning>
  Leaving time fields empty returns 70K+ results that may overwhelm the
  playground.
</Warning>

### Troubleshooting Playground Issues

The playground may have limitations with JSON display, but the AVERT API
itself works perfectly. For reliable testing, we recommend using the [testing
alternatives](/api-reference/imagery/playground-alternative) which provide a
much better experience.


## OpenAPI

````yaml GET /imagery/visible/query
openapi: 3.1.0
info:
  title: AVERT Imagery API
  description: >-
    API for accessing infrared and visible imagery data from AVERT volcanic
    monitoring systems
  license:
    name: MIT
  version: 0.0.2
servers:
  - url: https://avert-legacy.ldeo.columbia.edu/api
    description: AVERT Production API
security: []
paths:
  /imagery/visible/query:
    get:
      tags:
        - Visible Imagery
      summary: Query visible imagery data
      description: >-
        Search for visible images based on site, volcano number, and optional
        time range. Returns JSON metadata by default.
      parameters:
        - name: site
          in: query
          required: true
          description: Site identifier (e.g., CLNE)
          schema:
            type: string
            example: CLNE
        - name: vnum
          in: query
          required: true
          description: Volcano number identifier
          schema:
            type: integer
            example: 311240
        - name: search_from
          in: query
          required: false
          description: >-
            Start time for search (ISO 8601 format). Playground defaults to a
            2-hour window with ~10 results.
          schema:
            type: string
            format: date-time
            example: 2024-05-30T12:00
            default: 2024-05-30T12:00
        - name: search_to
          in: query
          required: false
          description: >-
            End time for search (ISO 8601 format). Use short time ranges for
            manageable results.
          schema:
            type: string
            format: date-time
            example: 2024-05-30T14:00
            default: 2024-05-30T14:00
        - name: limit
          in: query
          required: false
          description: Maximum number of results to return
          schema:
            type: integer
            example: 10
        - name: download
          in: query
          required: false
          description: >-
            Download images as zip file instead of returning JSON metadata (only
            works for <= 100 results)
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: List of visible images matching the search criteria
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ImageResult'
              example:
                - id: 269014
                  image_id: 311240.CLNE.2024.152_000004-0000
                  site: CLNE
                  vnum: 311240
                  timestamp: '2024-05-31T00:00:01'
                  file_format: jpg
                  url: >-
                    /data/vulcand/archive/imagery/visible/311240/2024/CLNE/still/152/311240.CLNE.2024.152_000004-0000.jpg
                  frame: 0
                  quality: 0
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                type: array
                items: {}
              example: []
        '404':
          description: Not Found - The requested URL was not found on the server
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Error message
                  status:
                    type: integer
                    description: HTTP status code
                  title:
                    type: string
                    description: Error title
                  type:
                    type: string
                    description: Error type
              example:
                detail: >-
                  The requested URL was not found on the server. If you entered
                  the URL manually please check your spelling and try again.
                status: 404
                title: Not Found
                type: about:blank
components:
  schemas:
    ImageResult:
      type: object
      required:
        - id
        - image_id
        - site
        - vnum
        - timestamp
        - file_format
        - url
      properties:
        id:
          type: integer
          description: Database ID of the image record
          example: 269011
        image_id:
          type: string
          description: Unique identifier for the image file
          example: 311240.CLNE.2024.152_000001-0000
        site:
          type: string
          description: Site identifier
          example: CLNE
        vnum:
          type: integer
          description: Volcano number identifier
          example: 311240
        timestamp:
          type: string
          format: date-time
          description: When the image was captured
          example: '2024-05-31T00:00:01'
        file_format:
          type: string
          description: Image file format
          example: jpg
        url:
          type: string
          description: Relative path to the image file
          example: >-
            /data/vulcand/archive/imagery/visible/311240/2024/CLNE/still/152/311240.CLNE.2024.152_000001-0000.jpg
        frame:
          type: integer
          description: Frame number for video sequences
          example: 0
        quality:
          type: integer
          description: Image quality indicator
          example: 0

````