<!-- Source: https://9pic.ai/blog/export-race-photos-by-bib-number/ -->
![Abstract stripes background](/images/stripes.svg)

[Back to Blog](/blog/)

![How to export race photos by bib number: every bib with the list of photo IDs it appears in](https://bgimg.9pic.ai/images/blog/export-race-photos-by-bib-number.jpg?title=How+to+Export+Race+Photos+by+Bib+Number&amp;subtitle=Every+bib+with+the+list+of+photo+IDs+it+appears+in%2C+as+one+JSON+file.&amp;kicker=BibTrack+Guide&amp;author=9Pic+AI+Team&amp;readTime=6+min)

**In short**: open your event, go to **Photo**, then **Tools**, and choose **Bib to Data Export**. Select **Export**; there are no fields to choose. When it shows **Ready**, select **Download JSON**. Each bib in the file maps to a plain list of photo IDs.

When you want photos by bib
---------------------------

Start here when the people using the data start from a runner, not from a photo:

- **A results or timing partner** who wants to show a photo count or a photo link next to each finisher.
- **Your race office**, answering "how many photos do we have of bib 1024?" without opening the gallery.
- **A coverage check**: which registered runners have no photos at all.


If you start from the photos instead, and want bibs, tags, file names or paths for each one, use [Photos to Data Export](/blog/export-event-photo-data-json/).

Step 1: Export
--------------

In the dashboard, open the event, go to **Photo** and select the **Tools** tab. Choose **Bib to Data Export**. It was called Bib to Photos Export before, and old links still open it.

This export has nothing to configure, so the left column only has the **Export** button. Select it. The export runs in the background and shows how many photos it has read. You can leave the page, and a large event takes about a minute.

When it shows **Ready**, the **Latest export** box lists when it ran, the file size and three counts: **Photos**, **Bibs** and **Photos without bibs**. Select **Download JSON** to save the file.

Step 2: Read the file
---------------------

The file opens with `event_id`, `export_type`, `generated_at`, `options` (always empty for this export) and `counts`. The bibs are under `data`, each with an array of photo IDs:

    {
      "event_id": 6109,
      "export_type": "bib_to_photos",
      "generated_at": "2026-11-17T09:30:00+00:00",
      "options": [],
      "counts": {"photos": 30240, "bibs": 7374, "photos_without_bibs": 2086},
      "data": {
        "7": ["a81c...04de"],
        "1024": ["3f2a...c91e", "8b10...77e1", "c4e9...1a52"],
        "1025": ["9d03...6b7f"],
        "A17": ["5be2...90cd", "3f2a...c91e"]
      }
    }

- **Bibs are in order**: numbers first, smallest to largest, then bibs with letters.
- **One photo can sit under several bibs.** In the example, photo `3f2a...c91e` shows both 1024 and A17, so it is listed under each.
- **Only bibs with photos appear.** A runner with no photos has no entry. Photos with no bibs are not listed either; the `photos_without_bibs` count tells you how many there are.


A photo ID is the photo's unique ID in 9Pic AI, not its file name. The next section shows how to get file names.

Check it in the File preview
----------------------------

Under the latest export, **File preview** shows the start of the file. Select a bib to open its list of photo IDs. The preview holds the first 20 bibs and up to 5 photo IDs for each; a longer list ends with a line such as "… 12 more photos in the download". The `data` line shows the real number of bibs in the full file.

Use **Raw** for plain text with line numbers, or **Copy** to paste the preview into a message for your partner, so they can see the shape before you send the whole file.

Turn photo IDs into file names
------------------------------

Partners sometimes need file names rather than IDs, for example to pull the originals from the photographer's folder. Run a [Photos to Data Export](/blog/export-event-photo-data-json/) with **Original file name** ticked. Its entries are keyed by the same photo IDs, so the two files join on the ID.

Anyone comfortable with a few lines of Python can do it like this:

    import json

    bibs = json.load(open("bib-to-data.json"))["data"]
    photos = json.load(open("photos-to-data.json"))["data"]

    for bib, photo_ids in bibs.items():
        names = [photos[photo_id]["file_name"] for photo_id in photo_ids]
        print(bib, len(names), ", ".join(names))

Each line prints a bib, how many photos it has and their file names. Export both files at the same time so they describe the same tags.

Find runners with no photos
---------------------------

Because only bibs with photos are in the file, comparing it with your start list shows who is missing. Take the bibs from your registration export and check each one against the keys under `data`. The ones not there have no tagged photos yet.

Some of them did not start. Others were hidden in a pack or behind a jacket. Look for those runners in the gallery, by selfie if your event has selfie search, and tag the photos you find by hand; see [how to tag bibs after AI](/blog/manual-bib-tagging-after-ai/). Then export again.

What counts as a bib
--------------------

Only **processed** photos are included, and bibs follow the same rules as participant search:

- Bibs found with the event's bib detection settings. When the event uses its bib list, only listed bibs count.
- Minus detected bibs you removed in Manual Tagging.
- Plus your manual tags, even before they are published to participant search.


So a runner's list matches what they find when they type their bib, plus your newest manual tags.

FAQ
---

### Can I add the text read on each photo?

Not in this export: it lists photo IDs only, so the file stays small and simple. For text on each photo, run Photos to Data Export with **Detected text** ticked.

### Does the file update when tags change?

No. It reflects the tags at the moment it ran. After a tagging pass, select **Export again**. Each event keeps its latest export.

### Which plans include it?

Every plan, and it keeps working after a plan ends.

### Can my timing partner pull this automatically?

The export is a file you download and share. Partners who want live bib search in their own app can look at the [9Pic API](/products/api/).

What to do next
---------------

Run an export after your first tagging pass, open the File preview, and send the file to whoever runs your results. If you also need file names or paths, pair it with [Photos to Data Export](/blog/export-event-photo-data-json/). To get more bibs into the file in the first place, see how [BibTrack](/products/bibtrack/) reads them.

Ready to Get Started?
---------------------

Join event organizers who've delivered 100M+ photos to 5M+ participants across 5k+ events using 9Pic AI for hosting, AI search, and media delivery.

[Get Started](https://admin.9pic.ai/sign-up) [Book Demo](/contact/)
