Add providers to the GTFS feed response

Open
#1,910 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api

Research direction

Start by locating the GET /v1/gtfs_feeds/{id} response schema and the code that assembles a feed from its latest dataset. Trace how published agency and publisher records are linked, and check the endpoint’s existing tests. Done means the response includes the specified feed_providers array, including an empty array when none are published, while existing fields remain unchanged.

Written by the indexing model from the issue text.

Description

Describe the problem

Agencies and publishers linked to a feed (from its latest dataset's agency.txt and feed_info.txt) are not exposed. API consumers only get the free-text provider field, which does not tell them who operates or publishes a feed, or how to contact them.

Proposed solution
  • Add an optional feed_providers array to the GET /v1/gtfs_feeds/{id} response.
  • Each item returns the provider's id, name, role (agency or publisher), name aliases and contacts (website, email, phone).
  • Only providers with status=published are returned.
  • Additive only: the existing provider field is unchanged. Its description clarifies that it is the curated display name, while feed_providers lists the linked provider records.
  • Wording: no "canonical" in fields or descriptions.

Acceptance criteria:

  • A feed with no published providers returns an empty feed_providers array.
  • Existing response fields are unchanged.
Alternatives you've considered
  • A separate /v1/gtfs_feeds/{id}/feed_providers endpoint: rejected, providers belong to the feed resource.
  • Exposing raw agency.txt / feed_info.txt per dataset: out of scope, dataset-level data is not public for now.
Additional context
Dominant language
Python
Stars
34
Forks
7
Avg merge
3d 3h
Merged PRs (30d)
22

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MobilityData/mobility-feed-api

All issues in MobilityData/mobility-feed-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.