from flushai.integrations.serpapi import PixabayAPIWrapper

Initialization

To use this wrapper, you must sign up for an API key by registering on the Pixabay website.

wrapper = PixabayAPIWrapper("your_api_key")

Retrieving Results

The search function can be used to retrieve results by passing in a prompt. By default, only 10 images are retrieved, but you can pass in a custom number of images to retrieve.

wrapper.search("texas flag", num=3)

A Document is returned. For reference, we provide the images returned below: