Skip to content

Flickr Upload and API Export

Note

This guide is a work in progress. It documents a practical Flickr upload and metadata-export workflow that can be adapted by other archives, museums, and local history organizations.

Goal

Upload access JPGs to Flickr, organize them in albums, and export Flickr metadata and image URLs for reuse in local description systems.

Who This Guide Is For

  • Archives staff publishing access images to Flickr
  • Small organizations using Flickr as a public access platform
  • Future maintainers who need to understand the upload and export workflow

What This Guide Covers

  • Preparing files before upload
  • Uploading and organizing images in Flickr
  • Getting a Flickr API key and account user ID
  • Running a Python script to export Flickr metadata to CSV
  • Reusing Flickr image URLs in other systems

Prerequisites

  • Access JPGs are already prepared
  • Embedded metadata is already reviewed
  • Any watermarks or access-only image processing are complete
  • A Flickr account with permission to upload and manage albums
  • Python 3 installed on the workstation used for exports
  • A local copy of the Flickr export script described in the Flickr Metadata Export Script reference page

Warning

Do not upload preservation TIFF files to Flickr. Use access JPGs only.

For most staff and small organizations, a simple Windows workstation setup is enough for the Flickr export workflow.

Recommended tools:

Basic Python Setup

  1. Download and install Python from the official Python website.
  2. During install, enable the option to add Python to your system PATH if that option is offered.
  3. Open PowerShell and confirm Python is available:
python --version

If python does not work, try:

py --version

Simple PATH Example

If a command-line program is installed but PowerShell says the command is not recognized, the program folder may need to be added to the Windows Path environment variable.

Example program folders:

  • C:\Python313\
  • C:\Python313\Scripts\
  • C:\Program Files\SomeTool\

Basic Windows steps:

  1. Open the Start menu and search for environment variables.
  2. Select Edit the system environment variables.
  3. In System Properties, select Environment Variables.
  4. Under User variables, select Path, then choose Edit.
  5. Add the folder path for the program you want to run in PowerShell or Command Prompt.
  6. Select OK to save the change.
  7. Close and reopen PowerShell, then test the command again.

Example:

  • if python.exe is in C:\Python313\, add C:\Python313\
  • if pip.exe is in C:\Python313\Scripts\, add C:\Python313\Scripts\

Why Use VS Code

VS Code is a practical default editor for this workflow because it gives staff:

  • a plain-text editor for Python and INI files
  • an integrated terminal for running scripts
  • installable Python support for syntax highlighting and debugging
  • an easier handoff path for future maintainers than ad hoc text editors

Before You Upload

Confirm the access files are ready:

  • Titles or filenames reflect the intended image order
  • Embedded descriptive metadata is present
  • Tags and description text are already normalized if your workflow writes them into the image files
  • The files are the correct access derivative, not the master preservation files

If album order matters, plan the order before upload. Flickr sorting can be corrected later, but it is easier to keep the sequence consistent from the start.

Upload Access JPGs to Flickr

  1. Sign in to the Flickr account that will publish the images.
  2. Open the Flickr upload interface.
  3. Drag and drop the completed access JPGs into the upload window, or browse to the folder manually.
  4. Review the batch before publishing.
  5. If the sequence matters, sort or retitle items so the display order is predictable.
  6. Confirm that Flickr has carried over the expected title, description, and tags when your local metadata workflow is designed to supply them.
  7. Add the images to the appropriate album or albums.
  8. Publish the upload.

Organize and Review New Images

After upload, use Flickr's organization tools to review the batch and make corrections.

Typical post-upload tasks:

  • confirm titles and descriptions
  • correct or expand tags
  • add or remove album membership
  • review dates
  • review people tags or geolocation when your institution uses them

Set Up Flickr API Access

The export workflow requires a Flickr API key and the Flickr user ID for the account owner.

Get an API Key

  1. Sign in to Flickr with the account that owns the images.
  2. Open Flickr account settings.
  3. Go to the API key area under Flickr's sharing or extending settings.
  4. Create a key if one does not already exist.
  5. Store the API key in a local configuration file, not in public documentation or version control.

Tip

Treat the API key like local workstation configuration. Keep it out of Git repositories, shared screenshots, and public manuals.

Find the Flickr User ID

The Flickr screen name or profile alias is not the same as the account user ID used by the API.

Use Flickr's flickr.urls.lookupUser API method with the public account URL:

https://www.flickr.com/services/rest/?method=flickr.urls.lookupUser&api_key=YOUR_API_KEY&url=https://www.flickr.com/people/YOUR_ACCOUNT_ALIAS/&format=json&nojsoncallback=1

Look for the user.id value in the JSON response. That value is the Flickr user ID, also called the NSID.

Configure the Export Script

The current export script expects a local INI file named flickr_accounts.ini in the same folder as the Python script.

Example:

[default]
api_key = YOUR_FLICKR_API_KEY
user_id = YOUR_FLICKR_USER_ID

Recommended setup rules:

  • keep the INI file next to the script unless you intentionally rewrite the script
  • store only the values needed for export
  • do not commit the INI file to a public repository
  • document the local script folder for the next maintainer

Run the Export Script

Open a terminal in the folder containing the script and configuration file, then run:

python .\flickr_metadata_export.py

The script prompts for one of two export modes:

  • album: export all photos from a single Flickr album
  • date: export all photos uploaded within a date range

Album Export

Choose album when you want one CSV for a specific project, collection, exhibit, or processing batch.

When prompted, enter either:

  • the Flickr album ID
  • the full Flickr album URL

Date Export

Choose date when you want everything uploaded within a defined date range.

When prompted, enter:

  • minimum upload date in YYYY-MM-DD
  • maximum upload date in YYYY-MM-DD

Output CSV

The script writes a CSV file locally. By default it uses a filename based on the export mode, but you can enter a different path when prompted.

Save the CSV with the related project files so future staff can reconnect exported metadata to the uploaded image set.

What the CSV Includes

The export captures Flickr metadata and image URLs that are useful for downstream description or website work, including:

  • local identifier value when it can be extracted
  • Flickr photo ID
  • title and description
  • upload date and date taken
  • owner information
  • tags
  • view counts
  • original-format information
  • direct image URLs at several sizes
  • public Flickr photo page URL

These URLs can be reused in systems such as ArchivesSpace, spreadsheets, websites, or local tracking documents.

Local Adaptation Notes

Each organization should define its own local decisions for:

  • album naming rules
  • whether image order is driven by filenames, titles, or manual sorting
  • what metadata must be embedded before upload
  • whether Flickr descriptions should include local identifiers
  • where export CSV files are stored for long-term reference

If you are writing this up for another institution, replace local examples with that institution's Flickr account URL, naming rules, and description standards.

QC Checklist

  • [ ] Access JPGs, not TIFFs, were uploaded
  • [ ] Album membership is correct
  • [ ] Titles, descriptions, and tags were spot-checked after upload
  • [ ] The API key and Flickr user ID were confirmed
  • [ ] The export script ran without errors
  • [ ] The CSV was saved with the related project files
  • [ ] Sample image URLs from the CSV open correctly

Troubleshooting

  • Missing metadata after upload: confirm the metadata was actually embedded in the JPG files before upload
  • Wrong image order: correct titles or album ordering and recheck the display sequence
  • API export fails immediately: verify Python, the API key, the user ID, and the local flickr_accounts.ini file
  • Album URL does not work: confirm the script can extract the album ID from that URL format
  • CSV is incomplete: check whether the Flickr account or selected album contains more items than expected, then rerun the export