Pixabay is a dynamic community of creatives sharing copyright-free images and videos. All content is published under the Pixabay license, making it safe to use without asking permission or giving credit to the artist - even for commercial purposes.
Pixabay API, which gives you access to over 1.9 million images, illustrations, vector graphics, and videos - for free - unlimited, reliable, stable, and easy-to-setup apps.
Β Pixabay API. It contains API is a RESTful interface to search and retrieve free photos and videos released under the Pixabay license. The API displays encrypted JSON objects. Keys and hash values are case-sensitive and character encoding is UTF-8. Hash keys may be returned in any random order and new keys may be added at any time.
Read more: Pixabay API
Home page | Select your keyWord |
---|---|
Result (images) | Gif |
Youtube: see video at youtube in this link FLUTTER Development - Gallery Application using Pixabay API
Youtube |
---|
This project is a Flutter app that helps find images via the Pixabay API. It provides API on the RESTful interface to find and restore free photos and videos released under the Pixabay license. The API displays encrypted JSON objects. I used this API to display beautifully designed images on mobile (Android and iOS), while developing a mobile cross-platform with a simple flutter code.
Some resources to get started with such a Flutter project:
- Lab: Write your first Flutter app
- Cookbook: Useful Flutter samples
- Data & backend
- Networking
- JSON and serialization
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Retrieving photos of "yellow flowers". The search term q needs to be URL encoded:
https://pixabay.com/api/?key=16582589-68a2e0e5d7a78080a8fa51cbe&q=yellow+flowers&image_type=photo
{
"total": 4692,
"totalHits": 500,
"hits": [
{
"id": 195893,
"pageURL": "https://pixabay.com/en/blossom-bloom-flower-195893/",
"type": "photo",
"tags": "blossom, bloom, flower",
"previewURL": "https://cdn.pixabay.com/photo/2013/10/15/09/12/flower-195893_150.jpg"
"previewWidth": 150,
"previewHeight": 84,
"webformatURL": "https://pixabay.com/get/35bbf209e13e39d2_640.jpg",
"webformatWidth": 640,
"webformatHeight": 360,
"largeImageURL": "https://pixabay.com/get/ed6a99fd0a76647_1280.jpg",
"fullHDURL": "https://pixabay.com/get/ed6a9369fd0a76647_1920.jpg",
"imageURL": "https://pixabay.com/get/ed6a9364a9fd0a76647.jpg",
"imageWidth": 4000,
"imageHeight": 2250,
"imageSize": 4731420,
"views": 7671,
"downloads": 6439,
"favorites": 1,
"likes": 5,
"comments": 2,
"user_id": 48777,
"user": "Josch13",
"userImageURL": "https://cdn.pixabay.com/user/2013/11/05/02-10-23-764_250x250.jpg",
},
{
"id": 73424,
...
},
...
]
}
- Unlimited requests,
- reliable,
- stable,
- simple to set up.
- Dart
- Flutter
- Internet connection
- key of pixabay.
Add this to your package's pubspec.yaml
file:
- http
- intl
- cupertino_icons: ^0.1.2
dependencies:
sdk: flutter
http: ^0.12.1
intl:
cupertino_icons: ^0.1.2
You can install packages from the command line:
with pub
:
$ pub get
with Flutter
:
$ flutter packages get
Now in your Dart
code, you can use:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:intl/intl.dart';
-
Download the repository files (project) from the download section or clone this project by typing in the bash the following command:
git clone https://github.com/djamelzerrouki/pixabay-flutter.git
-
Import it in Android studio or any other Flutter IDE and let Gradle download the required dependencies for you.
-
Run the application :D
If you want to contribute to this project and make it better with new ideas, your pull request is very welcomed. If you find any issue just put it in the repository issue section, thank you.
Email: djameljimmizerrouki@gmail.com
LinkedIn: DjamelZerrouki
Twitter: @DjamelZerrouki