Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

Open Law

Open Law represents a commitment by the City and County of San Francisco to releasing one of our most important pieces of information -- the law -- to the public in formats that make it more accessible. Following on our landmark Open Data Policy, the laws of San Francisco are released in technologist-friendly formats that can power new applications that enhance understanding, improve access and lead to new insights around the laws.

These applications have yet to emerge, but we believe giving unprecedented access to the law will unleash creativity from the community. Imagine, for example, if you could:

  • Discover all the laws impacting small businesses in an easy, modern, browsable format
  • Find amusing or outdated laws from a bygone era
  • Explore the legal actions and ordinances that led to Municipal Code changes more easily
  • Share and discuss laws and get answers from certified legal resources in the community

Open Law is the first, necessary step to making these kinds of applications. We hope you join us and use the resources curated here to engage in the growing Open Law community.

You can learn more about the initiative here.

Structured Data (JSON) and API

If you would like to develop on top of structured data, you can access both bulk downloads and an API endpoint at provided by the Open Gov Foundation.


The files contained herein are raw data representations of certain Municipal Codes of the City and County of San Francisco for reuse in applications by anyone who chooses to do so. This is not the official copy of the City and County of San Francisco’s Code and should not be relied upon for legal or any other official purposes. Please refer to the Official Codes hosted by American Legal Publishing.

The City and County of San Francisco offers these files with no warranty as to accuracy or completeness.

Attribution Requirements

If you are using these files to produce an application on any platform (mobile, web, or desktop), you must indicate on every page of the application in either a footer or sidebar or other prominent place that users should reference the American Legal hosted official municipal codes. These will contain the most up to date legal reference for the City and County of San Francisco. Please use the following text in your attribution:

This is not an official copy of the Municipal Codes of San Francisco and should not be relied upon for legal or other official purposes. Please refer to the Official Codes hosted by American Legal Publishing for the verified and official codes.

If you republish these files on your own servers, you must maintain this notice in its original form for the benefit of others.

If you reuse these codes in an Application Programming Interface (API), you must indicate the same notice above in your API documentation in a prominent place.

Modification of the Codes

You may not modify these codes and then represent them as the original or official codes of the City and County of San Francisco. The code can only be officially changed through the legislative process and willfully misrepresenting modified code as the official code of the City and County of San Francisco is strictly prohibited.


Downloading, cloning, forking or using these files in any way indicates that you've read and accept the terms of use in the enclosed notice.







No packages published