Skip to main content
RapidDev - Software Development Agency
bubble-integrationsBubble API Connector

Pixabay API

Pixabay is one of the simplest external APIs you can connect to Bubble: no OAuth, no token exchange — just a single API key added as a Private Shared URL Parameter in the API Connector. A GET call to https://pixabay.com/api/ with your search term, image type, and per_page bound to Bubble inputs returns a hits array of royalty-free images ready to display in a Repeating Group. Set the Data path to hits and show thumbnails using the webformatURL field.

What you'll learn

  • How to register for a Pixabay API key and where to find it
  • How to add the API key as a Private Shared URL Parameter in Bubble's API Connector
  • Why setting the Data path to 'hits' is critical for Repeating Group binding
  • How to bind search inputs, image type dropdowns, and pagination controls to the Pixabay API call
  • How to display images using webformatURL in a Bubble Image element and save largeImageURL to the database
  • How to add a Custom State debounce to avoid hitting Pixabay's 100 req/min rate limit
  • How to configure a separate video search call using the Pixabay videos API endpoint
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner17 min read1–2 hoursMedia & ContentLast updated July 2026RapidDev Engineering Team
TL;DR

Pixabay is one of the simplest external APIs you can connect to Bubble: no OAuth, no token exchange — just a single API key added as a Private Shared URL Parameter in the API Connector. A GET call to https://pixabay.com/api/ with your search term, image type, and per_page bound to Bubble inputs returns a hits array of royalty-free images ready to display in a Repeating Group. Set the Data path to hits and show thumbnails using the webformatURL field.

Quick facts about this guide
FactValue
ToolPixabay API
CategoryMedia & Content
MethodBubble API Connector
DifficultyBeginner
Time required1–2 hours
Last updatedJuly 2026

Pixabay + Bubble: the stock image picker that takes under 2 hours to build

When Bubble founders need a royalty-free image picker in their app — a content creation tool, a social platform that lets users add header images, a template builder — Pixabay is the fastest path to working media search. No OAuth application process, no paid subscription, no approval period. Register, copy your API key, and start building.

In Bubble, the integration is a single GET call in the API Connector. Add your Pixabay API key as a Shared URL Parameter named `key` and tick the **Private** checkbox. Private means Bubble strips the parameter from any client-side representation of the request — even though Pixabay technically allows client-side calls, marking it Private is a good practice that keeps your key off browser network logs.

The critical setup detail that trips up first-time builders: Pixabay's API response wraps the image array in a root JSON object. The actual images are inside a `hits` key, alongside `total` and `totalHits` counts. If you leave Bubble's **Data path** field empty, the Repeating Group will see one item (the root object) instead of individual images. Set Data path to `hits` and the Repeating Group binds directly to the 20 or 30 image objects returned per page.

Each image object in the hits array contains the fields you need for a picker UI: `webformatURL` (up to ~1280px wide, for displaying in the Repeating Group), `largeImageURL` (full size, for preview modals or storage), `id`, `tags` (comma-separated string), `imageWidth`, `imageHeight`, `views`, and `downloads`. For videos, a second call to `https://pixabay.com/api/videos/` returns a similar structure with `hits[].videos` containing size variants.

The one behavioral pattern to get right in Bubble: do not fire the search API call on every keystroke in the search input. Pixabay's free tier allows 100 requests per minute. A fast typist filling in a search term generates 15-20 keystrokes in a few seconds. Use a Bubble Custom State as a debounce — update the Custom State on each keystroke, and only trigger the actual API call in a When condition that fires 500 milliseconds after the last Custom State change. This keeps your API usage well within limits and makes the picker feel more responsive.

Integration method

Bubble API Connector

One API Connector group with a single Private key URL parameter and a GET /api/ Data call. Bind q, image_type, per_page, and page to Bubble inputs for a live image search picker.

Prerequisites

  • A free Pixabay account — register at pixabay.com (free, no credit card required)
  • Your Pixabay API key from pixabay.com/api/docs (displayed after logging in at the top of the documentation page)
  • The API Connector plugin installed in your Bubble app (Plugins tab → Add plugins → search 'API Connector' by Bubble)

Step-by-step guide

1

Register for a Pixabay API key

Go to **pixabay.com** and click **Sign Up** in the top-right corner. Create a free account with an email address — no credit card required. Once logged in, visit **pixabay.com/api/docs** (or hover over your username → API). At the top of the API documentation page, Pixabay displays your personal API key in a blue highlighted box labeled 'Your API Key'. It looks like a long number — for example, `39847215-a1b2c3d4e5f6g7h8i9j0k1l2m`. Copy this key and save it somewhere accessible (a password manager or secure notes). You will paste it into Bubble in the next step. **Note on high-resolution access**: The `webformatURL` field (up to ~1280px) is available immediately on all free API keys. The full-resolution `imageURL` field (original upload resolution) is restricted by default — Pixabay requires you to contact them to enable high-res access, which is granted for applications with genuine editorial or commercial use cases. For a stock image picker embedded in a Bubble app, `largeImageURL` (available by default) is sufficient for most UI and storage purposes.

Pro tip: Do not use the Pixabay API key as a direct test in a browser URL if you can avoid it — some browsers cache the URL including the key in history. Bubble's API Connector keeps the key server-side when the Private checkbox is ticked.

Expected result: You have a Pixabay API key copied and ready to paste. You can verify it by visiting: https://pixabay.com/api/?key=YOUR_KEY&q=nature&per_page=3 in a browser and seeing a JSON response with a hits array.

2

Add the Pixabay API Connector in Bubble with a Private key parameter

In your Bubble editor, open the **Plugins tab** (puzzle piece icon in the left sidebar). Click **Add plugins**, search for **API Connector**, and install the plugin by Bubble (first result, free). Click **API Connector** in the plugins list to open the configuration panel. Click **Add another API** and name it `Pixabay`. Set **Authentication** to **No authentication** — Pixabay uses URL parameters, not OAuth or Bearer tokens. Under **Shared parameters**, click **Add a shared parameter**: - **Key**: `key` - **Value**: paste your Pixabay API key - **Tick the Private checkbox** — this tells Bubble to strip this parameter from any client-side representation of the request, keeping your API key server-side even though Pixabay would technically allow it to be exposed Your configuration at this point: ```json { "api_name": "Pixabay", "authentication": "none", "shared_params": { "key": "<private: YOUR_PIXABAY_API_KEY>" } } ``` Click **Save** on the API group (do not add a call yet — that is the next step).

pixabay-connector-config.json
1{
2 "api_name": "Pixabay",
3 "authentication": "none",
4 "shared_params": {
5 "key": "<private: YOUR_PIXABAY_API_KEY>"
6 }
7}

Pro tip: The Private checkbox on the shared parameter is what keeps your API key off browser network requests. Without it, the key appears in every API call's URL in your users' browser developer tools — a minor security concern but poor practice. Always tick Private for API keys, even ones that are technically public.

Expected result: The Pixabay API group is created in the API Connector with Authentication set to 'No authentication' and the key URL parameter added with the Private checkbox ticked.

3

Create the image search Data call and set the Data path to 'hits'

With the Pixabay group configured, click **Add a call** to create the image search call. Configure the call: - **Name**: `Search Images` - **Use as**: **Data** (this returns a list of items for a Repeating Group) - **Method**: GET - **URL**: `https://pixabay.com/api/` Under **URL parameters**, add the following parameters (these control search behavior and will be bound to Bubble UI inputs later): - `q` — the search query. Set a test value of `nature` for the Initialize step - `image_type` — values: `all`, `photo`, `illustration`, `vector`. Set test value: `photo` - `orientation` — values: `all`, `horizontal`, `vertical`. Set test value: `all` - `category` — optional (nature, people, fashion, science, etc.). Leave blank or `all` - `per_page` — number of results per page. Values 3–200. Set test value: `20` - `page` — current page number starting at 1. Set test value: `1` - `safesearch` — set to `true` for apps with mixed audiences - `lang` — set to `en` for English-tagged results ```json { "method": "GET", "url": "https://pixabay.com/api/", "params": { "q": "<dynamic:search_query>", "image_type": "<dynamic:image_type>", "orientation": "all", "per_page": "20", "page": "<dynamic:page_number>", "safesearch": "true", "lang": "en" } } ``` Now click **Initialize call**. Pixabay returns a response like: ```json { "total": 148592, "totalHits": 500, "hits": [ { "id": 12345, "webformatURL": "https://pixabay.com/get/..._640.jpg", "largeImageURL": "https://pixabay.com/get/..._1280.jpg", "imageWidth": 3840, "imageHeight": 2160, "tags": "nature, forest, trees", ... } ] } ``` **Critical step**: after the Initialize call succeeds, look for the **Data path** field in the call configuration. Set it to `hits`. This tells Bubble to treat the `hits` array — not the root object — as the list of items. Without this setting, a Repeating Group bound to this call shows one item (the root object with total, totalHits, and hits nested inside) instead of individual images. Click **Save**.

pixabay-search-images-call.json
1{
2 "method": "GET",
3 "url": "https://pixabay.com/api/",
4 "shared_params": {
5 "key": "<private: YOUR_API_KEY>"
6 },
7 "call_params": {
8 "q": "<dynamic:search_query>",
9 "image_type": "photo",
10 "orientation": "all",
11 "per_page": "20",
12 "page": "1",
13 "safesearch": "true"
14 }
15}

Pro tip: If the Initialize call returns an error message 'There was an issue setting up your call', check that your API key is correct by testing the full URL in a browser tab first: https://pixabay.com/api/?key=YOUR_KEY&q=nature&per_page=3. A valid response confirms the key is working before you debug Bubble's connector.

Expected result: Initialize call succeeds. Bubble auto-detects all image fields: id, webformatURL, largeImageURL, imageWidth, imageHeight, tags, views, downloads, user, userImageURL. Data path is set to 'hits'. The call is saved.

4

Build the image picker UI with a Repeating Group and debounced search input

Now bind the Pixabay API call to a Bubble UI. This step builds a practical image picker — a search box, image type dropdown, Repeating Group of results, and pagination controls. **Create a Custom State for debouncing** (prevents firing an API call on every keystroke): - Select any element on the page (or the page itself) - In the Inspector panel, go to **States** → **Add new state** - Name: `search_query_debounced`, Type: text - Also add state: `current_page`, Type: number, Default: 1 **Add UI elements:** 1. **Search Input**: add an Input element. Placeholder: 'Search Pixabay images...'. On its **Trigger a workflow on content change** event, add a 500ms delayed action that sets the `search_query_debounced` Custom State to `Input's value`. (Use Bubble's workflow 'Add a pause before next action' set to 500ms, then Set State.) This prevents an API call on every character typed. 2. **Image Type Dropdown**: add a Dropdown element with static choices: `photo`, `illustration`, `vector`, `all`. Default: `all`. 3. **Repeating Group**: add a Repeating Group. Set: - **Type of content**: `Pixabay - Search Images` (the API response type Bubble created during Initialize) - **Data source**: `Get data from an external API` → `Pixabay - Search Images` - In the API call parameters, bind: - `q` → `Page's search_query_debounced` Custom State - `image_type` → `Dropdown's value` - `page` → `Page's current_page` Custom State - Set **Layout** to a 4-column grid, fixed height rows of 180px 4. **Image Element** inside the Repeating Group cell: set **Source** to `Current cell's Pixabay - Search Images's webformatURL`. This is the web-size preview image (up to 1280px). 5. **Select Button** inside the cell: on click, add a workflow that: - Creates or updates a Thing (your app's content record) setting a field (e.g., `featured_image_url`) to `Current cell's largeImageURL` - Closes the popup or navigates forward 6. **Pagination Controls**: add Previous and Next buttons: - Previous: set `current_page` Custom State to `current_page - 1`. Disable when `current_page = 1`. - Next: set `current_page` Custom State to `current_page + 1`. RapidDev's team has built image picker flows like this as part of larger Bubble content platforms — reach out at rapidevelopers.com/contact for a free scoping call if you need help wiring this into a more complex workflow.

Pro tip: The 500ms debounce Custom State pattern is important for API economy. Without it, a user typing 'nature landscape' generates 15+ API calls in rapid succession, potentially hitting Pixabay's 100 requests-per-minute limit and causing failed results mid-session. The debounce fires only after the user pauses typing, making the search feel more intentional.

Expected result: The page shows a search input, image type dropdown, and a Repeating Group grid of Pixabay image thumbnails. Typing in the search box updates results after a short pause. Clicking a result saves the image URL to the database.

5

Add the video search call for multimedia pickers

If your Bubble app needs video content (background clips, b-roll footage, intro videos), Pixabay's video API works almost identically to the image API with one URL change. In the Pixabay API Connector group, click **Add a call** again: - **Name**: `Search Videos` - **Use as**: **Data** - **Method**: GET - **URL**: `https://pixabay.com/api/videos/` (note the different endpoint from the image API) Add URL parameters: `q`, `video_type` (all/film/animation), `per_page=15` (fewer than images — video thumbnails are larger), `page=1`. ```json { "method": "GET", "url": "https://pixabay.com/api/videos/", "params": { "q": "<dynamic:search_query>", "video_type": "all", "per_page": "15", "page": "<dynamic:page>" } } ``` Click **Initialize call** (use `q=nature` as the test value again). The video response structure differs from images: the root object has a `hits` array, but each hit contains a `videos` object with size variants (`tiny`, `small`, `medium`, `large`) rather than a single URL. Set Data path to `hits`. To display video previews in Bubble, use a **Video** element inside the video Repeating Group cell. Bind the source to `Current cell's Search Videos' videos' medium's url` (navigate the nested videos object to the medium size variant). For mobile optimization, use `tiny` instead. The same rate limit (100 req/min) applies to video searches — use the same debounce Custom State pattern from Step 4.

pixabay-search-videos-call.json
1{
2 "method": "GET",
3 "url": "https://pixabay.com/api/videos/",
4 "shared_params": {
5 "key": "<private: YOUR_API_KEY>"
6 },
7 "call_params": {
8 "q": "<dynamic:search_query>",
9 "video_type": "all",
10 "per_page": "15",
11 "page": "<dynamic:page_number>",
12 "safesearch": "true"
13 }
14}

Pro tip: The video API's 'hits' data path works the same as images. However, video response objects are larger per item (multiple size variants with URLs, durations, and dimensions), so use a smaller per_page value (10–15) for video searches to keep load times fast.

Expected result: The Search Videos call initializes successfully. Bubble detects the video hit fields including the nested videos object with tiny, small, medium, and large size variants. A video Repeating Group can now be bound to this call.

Common use cases

In-app stock image picker for content creators

A Bubble content creation platform (blog tool, newsletter builder, social post creator) adds a Pixabay image picker popup. Users click 'Add image', a popup opens with a search input and image type dropdown (photo / illustration / vector), the Repeating Group displays matching results, and clicking an image stores the largeImageURL in the user's post draft. The user never leaves the Bubble app to find royalty-free images.

Bubble Prompt

Build a Bubble popup that lets users search Pixabay for images. Show a search input, an image type dropdown (photo/illustration/vector), and a Repeating Group of results with image thumbnails. Clicking an image saves its largeImageURL to the current user's Post's featured_image field and closes the popup.

Copy this prompt to try it in Bubble

Background image selector for profile or landing pages

A Bubble platform that lets users personalize their profile pages or mini-landing pages includes a Pixabay-powered background selector. The user searches for a mood or theme (e.g., 'ocean sunset', 'abstract blue'), previews results, and clicks to apply. The selected image URL is stored in the user's database record and rendered as the page background via a dynamic image URL in the Bubble element's background settings.

Bubble Prompt

Add a Pixabay image picker to a Bubble profile settings page. Users search for background images, see a grid of results, and click 'Use as background'. Store the selected largeImageURL in the User's background_url field and update the profile page preview immediately.

Copy this prompt to try it in Bubble

Video asset browser for video-content tools

A Bubble video production tool lets users search for royalty-free background footage via Pixabay's video API. A tab-switched Repeating Group shows image results on one tab and video results on another (using the separate /api/videos/ endpoint). Users preview video clips inline using a Bubble Video element bound to the video hit's medium-size URL, and save the selected video URL to their project.

Bubble Prompt

Create a Bubble media browser with two tabs: Images and Videos. The Images tab queries https://pixabay.com/api/ and the Videos tab queries https://pixabay.com/api/videos/. Both share the same search input. Show image thumbnails and video previews respectively. Saving a selection stores the URL in the current project's media_url field.

Copy this prompt to try it in Bubble

Troubleshooting

Repeating Group shows one item with nested data instead of individual image rows

Cause: The Data path in the API Connector call is not set to 'hits'. Bubble is treating the entire root response object (which contains total, totalHits, and the hits array) as a single item.

Solution: Open the API Connector → Pixabay group → Search Images call → locate the 'Data path' field below the Initialize call button. Type 'hits' in this field and click Save. The Repeating Group will now receive individual image objects directly.

API calls fire on every keystroke and results flash rapidly or return errors

Cause: The Repeating Group's data source is bound to a live search Input without a debounce delay. Pixabay's 100 requests-per-minute free tier limit is being exceeded during rapid typing.

Solution: Implement the Custom State debounce pattern described in Step 4: add a Custom State (e.g., search_query_debounced) to the page, update it on a 500ms delay after each input change, and bind the Repeating Group's API call 'q' parameter to the Custom State instead of directly to the Input element's value.

Bubble shows 'There was an issue setting up your call' when clicking Initialize

Cause: The Initialize call requires a real successful HTTP response from the Pixabay API. This error means the API key is incorrect, the URL is wrong, or no results were returned for the test query.

Solution: Test the full API URL in a browser tab first: https://pixabay.com/api/?key=YOUR_KEY&q=nature&per_page=3. If this returns JSON with a hits array, the key is valid. Return to Bubble and verify the key is pasted correctly in the Shared URL Parameters without extra spaces. If the issue persists, use a simpler test query like 'sky' which returns thousands of results.

Image elements show broken images or blank white boxes

Cause: The Image element source is bound to the wrong field. The webformatURL field provides correctly sized preview images; binding to imageURL (the original full-resolution field) may return empty strings on free API keys.

Solution: Make sure the Image element source is bound to 'Current cell's Pixabay - Search Images's webformatURL' (not imageURL). The webformatURL is always populated for images and videos on free keys. For full-size previews in a popup, use largeImageURL instead.

Video search returns hits but the Bubble Video element shows nothing

Cause: The video hit object nests playback URLs inside a 'videos' object with size variants (tiny, small, medium, large). Bubble's data binding must navigate this nesting to reach the actual URL string.

Solution: In the Video element's Source binding, navigate: Current cell's Search Videos → videos → medium → url. If 'medium' is not available in the field picker, re-initialize the video call with a real search result to ensure Bubble detected the nested videos structure. Alternatively use 'tiny' or 'small' size variants which have wider availability.

Best practices

  • Always tick the Private checkbox on the Pixabay API key Shared URL Parameter, even though Pixabay technically allows client-side calls. Keeping API keys server-side is good practice and prevents your key from appearing in browser network logs or being scraped from page source.
  • Set the Data path to 'hits' on the Search Images call before testing any UI — this is the single most common setup mistake for Pixabay in Bubble and causes confusing Repeating Group behavior if missed.
  • Use the Custom State debounce pattern (500ms delay) for the search input. Firing an API call on every keystroke exhausts Pixabay's 100 requests-per-minute limit quickly and creates a poor user experience with constantly refreshing results.
  • Store both the largeImageURL and the image id when a user selects an image. The id is Pixabay's permanent identifier for attribution tracking; the largeImageURL is the URL to display or upload. Storing only the URL without the id makes it impossible to attribute or re-fetch the image later.
  • Add safesearch=true to all API calls if your Bubble app has a general audience or is used by minors. Pixabay's default behavior without safesearch can return results inappropriate for all audiences.
  • Use per_page=20 or per_page=30 as a practical default — it provides enough images to fill a grid without excessive payload size. The maximum per_page is 200, but large pages increase API response time and Bubble Workload Units for parsing the larger JSON.
  • For Bubble apps where multiple users search Pixabay simultaneously, plan for WU consumption: each API call costs WU in Bubble's post-2023 pricing model. If usage is high, consider caching recent search results in a Bubble database table (key: search term + page, value: JSON response, expiry: 1 hour) to avoid redundant API calls for popular search terms.
  • Set Bubble's API Connector Cache duration on the Pixabay calls to 60 seconds for repeat searches of the same term. This reduces API calls and WU costs when multiple users search for the same popular terms like 'nature' or 'business' within a short window.

Alternatives

Frequently asked questions

Is the Pixabay API really free? Are there any hidden limits?

Yes, the Pixabay API is free for registered accounts with no credit card required. The main limit is 100 requests per minute on the free tier. There is no monthly request cap or paid tier — all API access is free. The only gated feature is high-resolution originals via the imageURL field, which requires contacting Pixabay for extended access. The largeImageURL (up to 1280px) is available on all free keys and is sufficient for most Bubble use cases.

Do I need to show attribution or a credit to Pixabay when displaying images?

Pixabay's Content License does not legally require attribution — images are available for free commercial use without credit. However, Pixabay's API Terms of Service ask that you include a 'Photos from Pixabay' label or link somewhere visible in your app as a courtesy. For most Bubble apps, a small 'Images courtesy of Pixabay' text near the picker or footer satisfies this request.

Why does my search return different results on Pixabay's website vs the API?

Pixabay's website uses a more advanced ranking algorithm (considering views, downloads, and user ratings) than the API's default sort order (best_match by default). Add the order=popular URL parameter to the API call to get results closer to Pixabay's website ranking. You can also add order=latest for chronological results.

Can I let users download the full-resolution original images?

Not by default. The imageURL field (full resolution) returns an empty string on free API keys. Pixabay requires you to contact their team to enable this access, and it is granted only for applications with a genuine editorial or content management use case. For most Bubble apps, largeImageURL provides images up to 1280px wide, which is sufficient for web display and cover images.

Will the Pixabay API call work on Bubble's Free plan?

Yes. Pixabay is a simple API Connector integration with no Backend Workflow requirement — it works fully on Bubble's Free plan. You can build a complete image picker, display results in a Repeating Group, and save image URLs to your database all without a paid Bubble subscription.

How do I search for images in a specific category (nature, business, technology)?

Add a 'category' URL parameter to the Search Images call with one of Pixabay's supported category values: backgrounds, fashion, nature, science, education, feelings, health, people, religion, places, animals, industry, computer, food, sports, transportation, travel, buildings, business, or music. Add a Bubble Dropdown element with these values and bind the dropdown's selected value to the category API parameter.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire Bubble integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.