Algorithm Auto Change Picture to Pixabay Uploads
Pixabay API
Welcome to the Pixabay API documentation. Our API is a RESTful interface for searching and retrieving free images and videos released nether the Pixabay License.
Complimentary Images If you make utilise of the API, show your users where the images and videos are from, whenever search results are displayed. A link to Pixabay is required and you may use our logo for this purpose. That's the ane thing we kindly request in return for gratis API usage.
The API returns JSON-encoded objects. Hash keys and values are example-sensitive and character encoding is in UTF-8. Hash keys may be returned in whatsoever random gild and new keys may be added at any fourth dimension. We will do our best to notify our users before removing hash keys from results or adding required parameters.
Charge per unit Limit
By default, you tin make upwards to 100 requests per minute. Requests are associated with the API key, and non with your IP address. The response headers tell y'all everything yous demand to know about your current rate limit condition:
Header proper name | Description |
---|---|
X-RateLimit-Limit | The maximum number of requests that the consumer is permitted to make in 30 minutes. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The remaining time in seconds after which the current rate limit window resets. |
To keep the Pixabay API fast for everyone, requests must be buried for 24 hours. Also, the API is fabricated for real human requests; do non send lots of automatic queries. Systematic mass downloads are not immune. If needed, nosotros can increment this limit at whatever time - given that you've implemented the API properly.
Hotlinking
Returned epitome URLs may exist used for temporarily displaying search results. However, permanent hotlinking of images (using Pixabay URLs in your app) is not allowed. If you intend to use the images, please download them to your server first. Videos may exist embedded directly in your applications. Nonetheless, we recommend storing them on your server.
Mistake Treatment
If an fault occurs, a response with propper HTTP error status code is returned. The body of this response contains a description of the event in plain text. For example, once you become over the rate limit you volition receive an HTTP error 429 ("Too Many Requests") with the message "API rate limit exceeded".
Search Images
GEThttps://pixabay.com/api/
Parameters
key (required) | str | Please login to come across your API key here. Login | Sign up |
---|---|---|
q | str | A URL encoded search term. If omitted, all images are returned. This value may not exceed 100 characters. Example: "yellowish+flower" |
lang | str | Language code of the linguistic communication to be searched in. Accepted values: cs, da, de, en, es, fr, id, it, hu, nl, no, pl, pt, ro, sk, fi, sv, tr, vi, th, bg, ru, el, ja, ko, zh Default: "en" |
id | str | Recall individual images by ID. |
image_type | str | Filter results past image blazon. Accepted values: "all", "photo", "illustration", "vector" Default: "all" |
orientation | str | Whether an image is wider than it is alpine, or taller than it is wide. Accustomed values: "all", "horizontal", "vertical" Default: "all" |
category | str | Filter results by category. Accepted values: backgrounds, fashion, nature, scientific discipline, teaching, feelings, wellness, people, religion, places, animals, industry, computer, nutrient, sports, transportation, travel, buildings, concern, music |
min_width | int | Minimum prototype width. Default: "0" |
min_height | int | Minimum paradigm height. Default: "0" |
colors | str | Filter images by color properties. A comma separated list of values may exist used to select multiple properties. Accepted values: "grayscale", "transparent", "red", "orangish", "yellowish", "green", "turquoise", "bluish", "lilac", "pink", "white", "gray", "black", "brown" |
editors_choice | bool | Select images that accept received an Editor'south Selection honor. Accepted values: "true", "simulated" Default: "imitation" |
safesearch | bool | A flag indicating that simply images suitable for all ages should be returned. Accustomed values: "true", "faux" Default: "faux" |
order | str | How the results should exist ordered. Accepted values: "popular", "latest" Default: "pop" |
page | int | Returned search results are paginated. Use this parameter to select the page number. Default: one |
per_page | int | Decide the number of results per folio. Accepted values: three - 200 Default: twenty |
callback | string | JSONP callback function proper noun |
pretty | bool | Indent JSON output. This option should not be used in production. Accustomed values: "truthful", "false" Default: "false" |
Case
Retrieving photos of "yellow flowers". The search term q needs to be URL encoded: "{ KEY }" has to replaced with your API central.
https://pixabay.com/api/?key={ Fundamental }&q=yellow+flowers&image_type=photo
Response for this asking:
{ "total": 4692, "totalHits": 500, "hits": [ { "id": 195893, "pageURL": "https://pixabay.com/en/blossom-blossom-flower-195893/", "type": "photo", "tags": "flower, flower, blossom", "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/go/ed6a9369fd0a76647_1920.jpg", "imageURL": "https://pixabay.com/become/ed6a9364a9fd0a76647.jpg", "imageWidth": 4000, "imageHeight": 2250, "imageSize": 4731420, "views": 7671, "downloads": 6439, "likes": 5, "comments": 2, "user_id": 48777, "user": "Josch13", "userImageURL": "https://cdn.pixabay.com/user/2013/xi/05/02-ten-23-764_250x250.jpg", }, { "id": 73424, ... }, ... ] }
Response fundamental | Description |
---|---|
total | The total number of hits. |
totalHits | The number of images accessible through the API. By default, the API is express to return a maximum of 500 images per query. |
id | A unique identifier for this image. |
pageURL | Source page on Pixabay, which provides a download link for the original image of the dimension imageWidth x imageHeight and the file size imageSize. |
previewURL | Low resolution images with a maximum width or pinnacle of 150 px (previewWidth 10 previewHeight). |
webformatURL | Medium sized image with a maximum width or height of 640 px (webformatWidth 10 webformatHeight). URL valid for 24 hours. Replace '_640' in any webformatURL value to access other prototype sizes:Replace with '_180' or '_340' to get a 180 or 340 px alpine version of the prototype, respectively. Replace with '_960' to get the image in a maximum dimension of 960 x 720 px. |
largeImageURL | Scaled image with a maximum width/top of 1280px. |
views | Total number of views. |
downloads | Total number of downloads. |
likes | Total number of likes. |
comments | Full number of comments. |
user_id, user | User ID and proper name of the contributor. Profile URL: https://pixabay.com/users/{ USERNAME }-{ ID }/ |
userImageURL | Profile pic URL (250 x 250 px). |
The post-obit response key/value pairs are only available if your business relationship has been approved for full API access. These URLs requite yous admission to the original images in full resolution and - if available - in vector format:
Response key | Clarification |
---|---|
fullHDURL | Full Hard disk scaled image with a maximum width/height of 1920px. |
imageURL | URL to the original paradigm (imageWidth x imageHeight). |
vectorURL | URL to a vector resource if available, else omitted. |
Search Videos
Gethttps://pixabay.com/api/videos/
Parameters
primal (required) | str | Your API key |
---|---|---|
q | str | A URL encoded search term. If omitted, all videos are returned. This value may not exceed 100 characters. Example: "yellow+blossom" |
lang | str | Linguistic communication lawmaking of the linguistic communication to exist searched in. Accepted values: cs, da, de, en, es, fr, id, information technology, hu, nl, no, pl, pt, ro, sk, fi, sv, tr, 6, thursday, bg, ru, el, ja, ko, zh Default: "en" |
id | str | Retrieve individual videos by ID. |
video_type | str | Filter results by video type. Accepted values: "all", "film", "blitheness" Default: "all" |
category | str | Filter results by category. Accepted values: backgrounds, style, nature, science, teaching, feelings, wellness, people, faith, places, animals, manufacture, computer, food, sports, transportation, travel, buildings, business, music |
min_width | int | Minimum video width. Default: "0" |
min_height | int | Minimum video elevation. Default: "0" |
editors_choice | bool | Select videos that take received an Editor's Choice award. Accepted values: "truthful", "false" Default: "false" |
safesearch | bool | A flag indicating that only videos suitable for all ages should be returned. Accepted values: "truthful", "false" Default: "faux" |
order | str | How the results should exist ordered. Accustomed values: "popular", "latest" Default: "pop" |
folio | int | Returned search results are paginated. Use this parameter to select the folio number. Default: ane |
per_page | int | Determine the number of results per page. Accepted values: 3 - 200 Default: xx |
callback | string | JSONP callback office proper noun |
pretty | bool | Indent JSON output. This option should not be used in production. Accepted values: "true", "false" Default: "simulated" |
Instance
Retrieving videos about "yellow flowers". The search term q needs to be URL encoded. "{ Fundamental }" has to replaced with your API key.
https://pixabay.com/api/videos/?key={ KEY }&q=xanthous+flowers
Response for this asking:
{ "total": 42, "totalHits": 42, "hits": [ { "id": 125, "pageURL": "https://pixabay.com/videos/id-125/", "blazon": "motion picture", "tags": "flowers, yellow, blossom", "duration": 12, "picture_id": "529927645", "videos": { "large": { "url": "https://role player.vimeo.com/external/135736646.hd.mp4?s=ed02d71c92dd0df7d1110045e6eb65a6&profile_id=119", "width": 1920, "height": 1080, "size": 6615235 }, "medium": { "url": "https://player.vimeo.com/external/135736646.hd.mp4?due south=ed02d71c92dd0df7d1110045e6eb65a6&profile_id=174", "width": 1280, "tiptop": 720, "size": 3562083 }, "small": { "url": "https://player.vimeo.com/external/135736646.sd.mp4?s=db2924c48ef91f17fc05da74603d5f89&profile_id=165", "width": 950, "height": 540, "size": 2030736 }, "tiny": { "url": "https://role player.vimeo.com/external/135736646.sd.mp4?s=db2924c48ef91f17fc05da74603d5f89&profile_id=164", "width": 640, "tiptop": 360, "size": 1030736 } }, "views": 169, "downloads": 66, "likes": iii, "comments": 2, "user_id": 1281706, "user": "CoverrFreeFootage", "userImageURL": "https://cdn.pixabay.com/user/2015/10/xvi/09-28-45-303_250x250.png" }, { "id": 473, ... }, ... ] }
Response central | Description |
---|---|
total | The total number of hits. |
totalHits | The number of videos accessible through the API. By default, the API is limited to render a maximum of 500 videos per query. |
id | A unique identifier for this video. |
pageURL | Source folio on Pixabay. |
picture_id | This value may be used to retrieve static preview images of the video in diverse sizes: https://i.vimeocdn.com/video/{ PICTURE_ID }_{ SIZE }.jpg Available sizes: 100x75, 200x150, 295x166, 640x360, 960x540, 1920x1080 Exampe: https://i.vimeocdn.com/video/529927645_295x166.jpg |
videos | A prepare of differently sizes video streams: "large" usually has a dimension of 1920x1080. If a big video version is non available, an empty URL value and a size of zero is returned. "medium" typically has a dimension of 1280x720 and is available for all Pixabay videos. "pocket-sized" typically has a dimension of 960x540, older videos take a dimension of 640x360. This size is bachelor for all videos. "tiny" typically has a dimension of 640x360, older videos have a dimension of 480x270. This size is available for all videos. Append the GET parameter "download=1" to any of the video stream URLs to accept them served every bit downloads. |
views | Full number of views. |
downloads | Full number of downloads. |
likes | Total number of likes. |
comments | Total number of comments. |
user_id, user | User ID and name of the contributor. Contour URL: https://pixabay.com/users/{ USERNAME }-{ ID }/ |
userImageURL | Profile pic URL (250 10 250 px). |
JavaScript Case
var API_KEY = 'YOUR_API_KEY'; var URL = "https://pixabay.com/api/?key="+API_KEY+"&q="+encodeURIComponent('red roses'); $.getJSON(URL, function(data){ if (parseInt(data.totalHits) > 0) $.each(data.hits, office(i, hit){ panel.log(hit.pageURL); }); else console.log('No hits'); });
Support
Request full API access for retrieving loftier resolution images.
Contact us if y'all have whatever questions nigh the API.
Source: https://pixabay.com/api/docs/
0 Response to "Algorithm Auto Change Picture to Pixabay Uploads"
Enregistrer un commentaire