# searchVideos

## Returns

A List of Video objects matching the given parameters.

## Parameters

| Name                | Type                |
| ------------------- | ------------------- |
| postQueryParameters | PostQueryParameters |

### Allowed Fields

* sort
* languages
* videoTypes
* conditions
* topics
* channelIds
* organizations
* offset
* limit

## Usage Example

{% code lineNumbers="true" %}

```java
HolodexClient holodexClient = new HolodexClient("HOLODEX_API_KEY");

ObjectMapper objectMapper = JsonMapper.builder()
                .addModule(new JavaTimeModule())
                .build();

PostQueryParameters postQueryParameters = new PostQueryParameters();
postQueryParameters.setVideoTypes(new String[]{VideoType.STREAM});

List<Video> videos = holodexClient.searchVideos(postQueryParameters);

System.out.println(objectMapper
    .writerWithDefaultPrettyPrinter()
    .writeValueAsString(videos));
```

{% endcode %}

## Result Example

```
[ {
  "id" : "oXxS8AwgTUw",
  "title" : "【はろーぼー】ろぼさー用ボクのフリーチャット&スケジュール【#ロボ子さん】",
  "type" : "stream",
  "published_at" : "2020-01-22T21:29:36.000Z",
  "available_at" : "2025-05-23T13:00:00.000Z",
  "duration" : 0,
  "status" : "upcoming",
  "live_viewers" : 0,
  "songcount" : 0,
  "channel" : {
    "id" : "UCDqI2jOz0weumE8s7paEk6g",
    "name" : "Roboco Ch. - ロボ子",
    "english_name" : "Roboco-san",
    "type" : "vtuber",
    "photo" : "https://yt3.ggpht.com/ytc/AGIKgqOGep-9Pkw2EAzaMN16N-gnpuYkwu-_rEDILZPPLA=s800-c-k-c0x00ffffff-no-rj",
    "inactive" : false
  }
}, {
  "id" : "Z5ebW9A0DOs",
  "title" : "Lịch stream mới nhất của Du Ca | Du Ca's Streaming Schedule (all time in GMT+7)",
  "type" : "stream",
  "published_at" : "2023-05-05T09:18:30.000Z",
  "available_at" : "2025-05-05T09:20:00.000Z",
  "duration" : 0,
  "status" : "upcoming",
  "live_viewers" : 0,
  "songcount" : 0,
  "channel" : {
    "id" : "UC5RSxmHP5c4pU9Og1Pxx4wg",
    "name" : "Du Ca Ch. 響ゆうか【NIJIGEN】",
    "english_name" : "Hibiki Du Ca",
    "type" : "vtuber",
    "photo" : "https://yt3.ggpht.com/yZZIEyXrBVzcMIQzZkS3qXDgvTzCMOp2qTXsFNuBw_UPBBDm-XlGRo5zn3Q-w9_F2MmHruobAVE=s800-c-k-c0x00ffffff-no-rj",
    "inactive" : false
  }
}]
```
