AnalogDB
the collection of film photography
the collection of film photography
This document outlines the AnalogDB API. This API provides film photographs and metadata in JSON form as a REST-style service. The API is open-source and available on github.
The AnalogDB project is currently under development and subject to change. All film pictures are scrapped from reddit. All credit goes to the original photographers.
Use the following URI to access the endpoints: https://api.analogdb.com
The Analogdb API currently places a limit of 60 requests/min. Current rate limit status is returned in response headers after each request including remaining requests and reset time in unix epoch seconds.
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
x-ratelimit-reset: 1691712960
All collection endpoints are paginated with keyset pagination. By default, 20 records are returned per page. Pagination can be controlled with the following parameters:
param | description |
---|---|
page_size | set the number of records to return on each page (default 20, maximum 200) |
page_id | request a specific page of results. Each request returns a next_page_id that can be used to access the next page of results |
The image
resource contains the URL of the image as well as information about the resolution.
field name | type | description |
---|---|---|
url | string | link to image |
resolution | string | low, medium, high, raw |
width | integer | width of image in pixels |
height | integer | height of image in pixels |
The post
resource contains a list of image
(same picture, multiple resolutions) as well as metadata about the post (title, author, etc).
field name | type | description |
---|---|---|
id | integer | unique identifier |
title | string | title of post |
author | string | author of post |
permalink | string | url of post source |
score | integer | total votes of post |
timestamp | integer | time of post creation (unix time) |
nsfw | bool | image is NSFW (not safe for work, 18+) |
grayscale | bool | image is graysacle (black & white) |
sprocket | bool | image is a sprocket shot (exposed film sockets) |
images | array[image] | list of image |
The meta
resource contains supplementary information about a collection of post
resources.
field name | type | description |
---|---|---|
total_posts | integer | total number of posts served by endpoint query |
page_size | integer | maximum number of posts returned per page |
next_page_id | integer | unique identifier of next page |
next_page_url | string | url path to fetch next page |
Returns a collection of post
resources with accompanying meta
resource.
Posts can be sorted by time, score, or pseudo-randomly. Limits can be placed for maximum number of returned posts. If total number of posts exceeds the limit, results will be paginated.
param | description | default | options |
---|---|---|---|
sort | how to order the posts | latest | latest, top, random |
page_size | maximum number of posts returned | 20 | 1-200 |
page_id | ID of page to retrieve | null |
Additionally, posts can be filtered to include, exclude or only return grayscale, nsfw and sprocket images.
If filter query parameters are not provided (null), posts of that type are included in response. If filter is set to true
only photos of that type are returned. If set to false
, posts of that type are excluded.
param | description |
---|---|
nsfw | include nsfw (18+) images |
grayscale | include grayscale (black & white) images |
sprocket | include sprocket images |
Returns a single specific post
resource as identified by ID.