Ethics Commission
City and County of San Francisco

Application Programming Interface (API) – Contact Lobbyist Disclosure

The Lobbyist API provides application developers with access to download the contents of each lobbyist filing. The Netfile API provides live access to the Commission’s lobbyist database and always provides the most up-to-date information.

Alternatives to the Netfile API include the SODA API which provides access to the data stored in the SF OpenData datasets.  The SODA API data updates once daily, whereas the Netfile API data is live.

Netfile API Version 1.1

Change Notes

Version 1.1

  • Updated JSON formatting
  • Changed date format to ISO8601

The API returns Javascript Object Notation (JSON) from GET requests. The following methods are accessible from the API:

Insert the required variable in the URL where { } are provided below. The { } should be removed from the URL after inserting a variable.

All Filers by Year

This method returns all lobbyists that have filed at least one statement in the calendar year and includes contact information, filer ID, and current status.

  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filers/{year}

All Filings by Filer

This method returns a list of all filings filed by a lobbyist filer with the Commission. The lookup filer ID is obtained using the prior method.

  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filers/{filerId}/Filings

All Clients and Entities Reported on a Filing

These methods return all clients or entities reported on a particular filing. The filing ID is obtained using the prior method. A “Full Name” is the name of the client or entity as reported by the lobbyist. The “Mapped Name” is the name of the client or entity as corrected by Commission staff for the purposes of consistent spelling or mapping Aides to the correct member of the Board of Supervisors.

  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filings/{filingId}/Clients
  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filings/{filingId}/Entities

All Contacts of a Public Official, Political Contributions, Activity Expenses, and Payments Promised by Clients Reported on a Filing

These methods return all Contacts of a Public Official, Political Contributions, Activity Expenses, and Payments Promised by Clients reported on a particular filing. The filing ID is obtained using the “All Filings by Filer” method.

  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filings/{filingId}/ContactsOfPublicOfficials
  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filings/{filingId}/PoliticalContributions
  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filings/{filingId}/ActivityExpenses
  • https://netfile.com/Sunlight/Api/Lobbyist/Sf/v11/Filings/{filingId}/PaymentsPromisedByClients

Lobbyist Photos

At the time of registration with the Ethics Commission, lobbyists must supply a digital color photograph of the lobbyist’s head and shoulders. All photos are stored in JPEG format at 130 x 150 pixels. Lobbyist photographs are stored using the following URL format:

  • https://netfile.com/Sunlight/sf/lobbyist/picture/{year}/1/{filerId}

Monitor New Lobbyist Filings

New lobbyist filings can also be tracked by monitoring the following RSS feed.  The feed is updated when a new filing is accessible in the database.

  • https://netfile.com/Sunlight/sf/Lobbyist/FilingRSSFeed

SODA API

Assistance with the API

For additional assistance, please contact the Ethics Commission at ethics.commission@sfgov.org or at 415-252-3100.

Was this page helpful?

Scan with a QR reader to access page:
QR Code to Access Page
https://sfethics.org/disclosures/lobbyist-disclosure/lobbyist-disclosure-application-programming-interface-api