Alpha Coders API
HTTP JSON access to family-friendly desktop wallpapers, mobile wallpapers, avatars, and gifs.
All calls are GET requests to https://api.alphacoders.com/4.0.
Every response has success and query_time in seconds. Failures also have a short error.
{
"query_time": 0.0123,
"success": true
}
{
"error": "invalid_auth",
"query_time": 0.0123,
"success": false
}
Try without a key
These five exact URLs work without auth, so you can see a live response first. Any other combination needs a key.
Content types
Filter with content_type.
desktop maps to wallpaper. phone maps to mobile_wallpaper.
Results are family-friendly only, skip duplicates, and skip items that are not ready to display.
| Value | What you get |
|---|---|
| all | Desktop wallpaper, mobile wallpaper, avatar, and gif (default) |
| avatar | Avatar |
| gif | Gif |
| mobile_wallpaper | Mobile wallpaper |
| wallpaper | Desktop wallpaper |
Parameters
Shared query arguments for list endpoints.
| Parameter | Required | Value | Description |
|---|---|---|---|
| auth | yes, except the five test URLs | string | Your key |
| content_type | no | all | wallpaper | mobile_wallpaper | avatar | gif | Default all |
| sort | no | newest | highest_rated | contents and search default to newest. tag defaults to highest_rated |
| width | no | int (with height) | Filter by width |
| height | no | int (with width) | Filter by height |
| operator | no | max | equal | min | How width and height are compared. Default equal |
| min_ratio | no | float (with max_ratio) | Minimum width/height |
| max_ratio | no | float (with min_ratio) | Maximum width/height |
| page | no | int 1 to 200 | Default 1. 30 items per page. Page 201 or higher returns invalid_page |
List endpoints return at most 30 items. There is no total or last_page.
Request the next page until contents or tags is empty, or has fewer than 30 items.
That is the end of the list. Random is not paged.
Content object
file_size is bytes. thumb is always a still image, including for gifs and live wallpapers, so it is safe in an <img> tag.
{
"alt_text": "string",
"content_id": 1,
"content_type": "wallpaper",
"created": "2024-01-01 00:00:00",
"favorite_count": 0,
"file_size": 2500000,
"file_type": "jpg",
"height": 1080,
"md5_checksum": "string",
"name": "string",
"src": "https://images8.alphacoders.com/...",
"submitted_by": {"id": 1, "name": "string", "url": "https://alphacoders.com/..."},
"tags": [{"id": 1, "name": "string", "slug": "string"}],
"thumb": "https://images8.alphacoders.com/...",
"thumb_1920": "https://images8.alphacoders.com/...",
"upvote_count": 0,
"url_page": "https://wall.alphacoders.com/...",
"view_count": 0,
"width": 1920
}
GET /4.0/contents/{id}
One item by contents.id.
https://api.alphacoders.com/4.0/contents/{id}
curl "https://api.alphacoders.com/4.0/contents/3302856?auth=YOUR_KEY"
$api_result = file_get_contents("https://api.alphacoders.com/4.0/contents/3302856?auth=YOUR_KEY");
$results = json_decode($api_result);
echo $results->content->name;
import json
import urllib.request
with urllib.request.urlopen("https://api.alphacoders.com/4.0/contents/3302856?auth=YOUR_KEY") as response:
results = json.loads(response.read().decode())
print(results["content"]["name"])
{
"content": {},
"success": true
}
GET /4.0/contents
A page of content.
https://api.alphacoders.com/4.0/contents
curl "https://api.alphacoders.com/4.0/contents?auth=YOUR_KEY&content_type=wallpaper&sort=newest"
$api_result = file_get_contents("https://api.alphacoders.com/4.0/contents?auth=YOUR_KEY&content_type=wallpaper&sort=newest");
$results = json_decode($api_result);
foreach($results->contents as $content) {
echo $content->content_id;
}
import json
import urllib.request
with urllib.request.urlopen("https://api.alphacoders.com/4.0/contents?auth=YOUR_KEY&content_type=wallpaper&sort=newest") as response:
results = json.loads(response.read().decode())
for content in results["contents"]:
print(content["content_id"])
{
"contents": [],
"page": 1,
"success": true
}
GET /4.0/query-count
This key's query count.
https://api.alphacoders.com/4.0/query-count
curl "https://api.alphacoders.com/4.0/query-count?auth=YOUR_KEY"
$api_result = file_get_contents("https://api.alphacoders.com/4.0/query-count?auth=YOUR_KEY");
$results = json_decode($api_result);
echo $results->count;
import json
import urllib.request
with urllib.request.urlopen("https://api.alphacoders.com/4.0/query-count?auth=YOUR_KEY") as response:
results = json.loads(response.read().decode())
print(results["count"])
{
"count": 0,
"success": true
}
GET /4.0/random
Up to 30 random items.
https://api.alphacoders.com/4.0/random
curl "https://api.alphacoders.com/4.0/random?auth=YOUR_KEY&content_type=avatar"
$api_result = file_get_contents("https://api.alphacoders.com/4.0/random?auth=YOUR_KEY&content_type=avatar");
$results = json_decode($api_result);
foreach($results->contents as $content) {
echo $content->content_id;
}
import json
import urllib.request
with urllib.request.urlopen("https://api.alphacoders.com/4.0/random?auth=YOUR_KEY&content_type=avatar") as response:
results = json.loads(response.read().decode())
for content in results["contents"]:
print(content["content_id"])
{
"contents": [],
"success": true
}
GET /4.0/search
term is required (max 128 characters). If it matches an approved tag, tagged content is returned and the response includes that tag. Otherwise we search alt text.
https://api.alphacoders.com/4.0/search
curl "https://api.alphacoders.com/4.0/search?auth=YOUR_KEY&content_type=wallpaper&term=star+wars"
$api_result = file_get_contents("https://api.alphacoders.com/4.0/search?auth=YOUR_KEY&content_type=wallpaper&term=star+wars");
$results = json_decode($api_result);
foreach($results->contents as $content) {
echo $content->content_id;
}
import json
import urllib.request
with urllib.request.urlopen("https://api.alphacoders.com/4.0/search?auth=YOUR_KEY&content_type=wallpaper&term=star+wars") as response:
results = json.loads(response.read().decode())
for content in results["contents"]:
print(content["content_id"])
{
"contents": [],
"page": 1,
"success": true,
"tag": {}
}
GET /4.0/tags/{id}
Content for one tag.
https://api.alphacoders.com/4.0/tags/{id}
curl "https://api.alphacoders.com/4.0/tags/246230?auth=YOUR_KEY&content_type=mobile_wallpaper"
$api_result = file_get_contents("https://api.alphacoders.com/4.0/tags/246230?auth=YOUR_KEY&content_type=mobile_wallpaper");
$results = json_decode($api_result);
foreach($results->contents as $content) {
echo $content->content_id;
}
import json
import urllib.request
with urllib.request.urlopen("https://api.alphacoders.com/4.0/tags/246230?auth=YOUR_KEY&content_type=mobile_wallpaper") as response:
results = json.loads(response.read().decode())
for content in results["contents"]:
print(content["content_id"])
{
"contents": [],
"page": 1,
"success": true,
"tag": {}
}
GET /4.0/tags
Approved tags that have wallpaper, mobile wallpaper, avatar, or gif content. Optional term prefix-matches the tag name.
https://api.alphacoders.com/4.0/tags
curl "https://api.alphacoders.com/4.0/tags?auth=YOUR_KEY&term=naruto"
$api_result = file_get_contents("https://api.alphacoders.com/4.0/tags?auth=YOUR_KEY&term=naruto");
$results = json_decode($api_result);
foreach($results->tags as $tag) {
echo $tag->id;
}
import json
import urllib.request
with urllib.request.urlopen("https://api.alphacoders.com/4.0/tags?auth=YOUR_KEY&term=naruto") as response:
results = json.loads(response.read().decode())
for tag in results["tags"]:
print(tag["id"])
{
"page": 1,
"success": true,
"tags": []
}