A subset of Flickr's API defined in Swagger format.
Bring your own key. This API needs your own Flickr key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("flickr/getAccessToken");One install, one key - the same client calls every API on the marketplace.
Returns an access token
Returns an oauth token and oauth token secret
Returns next and previous favorites for a photo in a user's favorites
/**
* Flickr - generated by OmniStream from Flickr's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/flickr";
export class FlickrError extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `Flickr error ${status}`);
this.name = "FlickrError";
this.status = status;
this.code = code;
}
}
export interface FlickrOptions {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class Flickr {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: FlickrOptions = {}) {
if (!token) throw new Error("Flickr: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new FlickrError(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Returns an access token */
getAccessToken(params: { "oauth_consumer_key": string; "oauth_nonce": string; "oauth_timestamp": string; "oauth_signature_method": string; "oauth_version": string; "oauth_signature": string; "oauth_verifier": string; "oauth_token": string }): Promise<any> {
return this._request("GET", "/oauth/access_token", { params });
}
/** Returns an oauth token and oauth token secret */
getRequestToken(params: { "oauth_consumer_key": string; "oauth_nonce": string; "oauth_timestamp": string; "oauth_signature_method": string; "oauth_version": string; "oauth_signature": string; "oauth_callback": string }): Promise<any> {
return this._request("GET", "/oauth/request_token", { params });
}
/** Returns next and previous favorites for a photo in a user's favorites */
getFavoritesContextByID(params: { "api_key": string; "photo_id": string; "user_id"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.favorites.getContext", { params });
}
/** Returns a list of the user's favorite photos. Only photos which the calling user has permission to see are returned. */
getFavoritesByPersonID(params: { "api_key": string; "user_id": string; "min_fave_date"?: number; "max_fave_date"?: number; "page"?: number; "per_page"?: number }): Promise<any> {
return this._request("GET", "/rest?method=flickr.favorites.getList", { params });
}
/** Returns a list of photos in a gallery. */
getGalleryPhotosByID(params: { "api_key": string; "gallery_id": string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.galleries.getPhotos", { params });
}
/** Get information on a group topic reply */
getGroupTopicRepliesByID(params: { "api_key": string; "topic_id": string; "reply_id": string; "group_id"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.groups.discuss.replies.getInfo", { params });
}
/** Get information about a group discussion topic */
getGroupTopicByID(params: { "api_key": string; "topic_id": string; "group_id"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.groups.discuss.topics.getInfo", { params });
}
/** Get a list of discussion topics in a group. */
getGroupDiscussionsByID(params: { "api_key": string; "group_id"?: string; "page"?: number; "per_page"?: number }): Promise<any> {
return this._request("GET", "/rest?method=flickr.groups.discuss.topics.getList", { params });
}
/** Get information about a group */
getGroupByID(params: { "api_key": string; "group_id"?: string; "group_path_alias"?: string; "lang"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.groups.getInfo", { params });
}
/** Returns next and previous photos for a photo in a group pool */
getrestMethodFlickrGroupsPoolsGetcontext(params: { "api_key": string; "photo_id": string; "group_id"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.groups.pools.getContext", { params });
}
/** Returns a list of pool photos for a given group */
getGroupPhotosByID(params: { "api_key": string; "group_id"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.groups.pools.getPhotos", { params });
}
/** Returns a person */
getPersonByID(params: { "api_key": string; "user_id"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.people.getInfo", { params });
}
/** Return photos from the given user's photostream */
getMediaByPersonID(params: { "api_key": string; "user_id": string; "safe_search"?: number; "min_upload_date"?: number; "max_upload_date"?: number; "min_taken_date"?: number; "max_taken_date"?: number; "content_type"?: number; "privacy_filter"?: number; "page"?: number; "per_page"?: number }): Promise<any> {
return this._request("GET", "/rest?method=flickr.people.getPhotos", { params });
}
/** Returns next and previous photos in a photo list */
getPhotolistContextByID(params: { "api_key": string; "photo_id": string; "photolist_id": string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photolist.getContext", { params });
}
/** Returns next and previous photos for a photo in a photostream */
getPhotostreamContextByID(params: { "api_key": string; "photo_id": string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photos.getContext", { params });
}
/** Retrieves a list of EXIF/TIFF/GPS tags for a given photo. The calling user must have permission to view the photo. */
getPhotoExifByID(params: { "api_key": string; "photo_id": string; "secret"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photos.getExif", { params });
}
/** Returns a photo */
getPhotoByID(params: { "api_key": string; "photo_id": string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photos.getInfo", { params });
}
/** Returns photo sizes */
getPhotoSizesByID(params: { "api_key": string; "photo_id": string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photos.getSizes", { params });
}
/** Fetches a list of available photo licenses for Flickr */
getLicenseByID(params: { "api_key": string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photos.licenses.getInfo", { params });
}
/** Return a list of photos matching some criteria. */
getMediaBySearch(params: { "api_key": string; "text"?: string; "tags"?: string; "user_id"?: string; "min_upload_date"?: string; "max_upload_date"?: string; "min_taken_date"?: string; "max_taken_date"?: string; "license"?: string; "sort"?: string; "privacy_filter"?: number; "bbox"?: string; "accuracy"?: string; "safe_search"?: number; "content_type"?: number; "machine_tags"?: string; "machine_tag_mode"?: string; "group_id"?: string; "contacts"?: string; "woe_id"?: string; "place_id"?: string; "media"?: string; "has_geo"?: string; "geo_context"?: string; "lat"?: string; "lon"?: string; "radius"?: number; "radius_units"?: string; "is_commons"?: boolean; "in_gallery"?: boolean; "is_getty"?: boolean; "per_page"?: number; "page"?: number }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photos.search", { params });
}
/** Returns next and previous photos for a photo in a set */
getAlbumContextByID(params: { "api_key": string; "photo_id": string; "photoset_id"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photosets.getContext", { params });
}
/** Returns the albums belonging to the specified user */
getAlbumsByPersonID(params: { "api_key": string; "user_id": string; "page"?: number; "per_page"?: number }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photosets.getList", { params });
}
/** Returns a list of photos in an album. */
getAlbumByID(params: { "api_key": string; "photoset_id": string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.photosets.getPhotos", { params });
}
/** Echos the input parameters back in the response */
echo(params: { "api_key": string; "echo"?: string }): Promise<any> {
return this._request("GET", "/rest?method=flickr.test.echo", { params });
}
/** Uploads a new photo to Flickr */
uploadPhoto(): Promise<any> {
return this._request("POST", "/upload", { });
}
}
export default Flickr;
No reviews yet. Be the first to rate this API.
Yes. Flickr uses apiKey authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
A subset of Flickr's API defined in Swagger format. It exposes 25 endpoints over GET, POST, including GET /oauth/access_token, GET /oauth/request_token, GET /rest?method=flickr.favorites.getContext.
Install the OmniStream SDK for your language and call Flickr through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Flickr itself, and Flickr's own rate limits still apply to your provider key.
Giphy: Search, translate, trending, and random GIFs and stickers from the GIPHY library.
Returns a list of the user's favorite photos. Only photos which the calling user has permission to see are returned.
Returns a list of photos in a gallery.
Get information on a group topic reply
Get information about a group discussion topic
Get a list of discussion topics in a group.
Get information about a group
Returns next and previous photos for a photo in a group pool
Returns a list of pool photos for a given group
Returns a person
Return photos from the given user's photostream
Returns next and previous photos in a photo list
Returns next and previous photos for a photo in a photostream
Retrieves a list of EXIF/TIFF/GPS tags for a given photo. The calling user must have permission to view the photo.
Returns a photo
Returns photo sizes
Fetches a list of available photo licenses for Flickr
Return a list of photos matching some criteria.
Returns next and previous photos for a photo in a set
Returns the albums belonging to the specified user
Returns a list of photos in an album.
Echos the input parameters back in the response
Uploads a new photo to Flickr