~partytax/unofficial-municode-api-documentation

An attempt to document the API underlying Municode city ordinance websites.
8086ab85 — Nathan Wyand 3 months ago
add year and name to license
ee5b1b00 — Nathan Wyand 3 months ago
add license
e2eddfa4 — Nathan Wyand 9 months ago
create rough outline of openapi 3.1.0 documentation of API

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~partytax/unofficial-municode-api-documentation
read/write
git@git.sr.ht:~partytax/unofficial-municode-api-documentation

You can also use your local clone with git send-email.

#Unofficial Municode API Documentation

Many cities, towns, and counties in the United States use Municode software to publish their codes of ordinances on the web. Municode presents ordinance content in a single-page app, and does not advertise any type of machine-readable API for accessing this content. This project is an attempt to reverse engineer the API Municode uses behind their SPA. I hope to make it possible for policy researchers, NLP experts, and developers of accessible clients to programmatically access the rules that govern our lives.

#Domain

All Municode API endpoints can be accessed at https://api.municode.com.

#Endpoints

#Code of Ordinances

#GET /codesToc/children
#Description

Get the children of a node in the document tree.

#Parameters
  • jobId (integer):
  • nodeId (string): ID of the desired node in the document tree
  • productId (integer):
#Responses
  • 200
    • [items 0 through ∞] (objects): contains information about particular child node
      • Id (string): node ID
      • Heading (string): formatted heading/title of node
      • NodeDepth (number - integer): seems to be -1 regardless of depth
      • HasChildren (boolean): whether the node has child nodes
      • ParentId (string): ID of parent node
      • DocOrderId (number - integer): position of node in the larger document
      • Children (array): empty
      • Data (object):
        • NodeKey (null):
        • IsUpdated (boolean):
        • IsAmended (boolean):
        • HasAmendedDescendant (boolean):
        • CompareStatus (number - integer):
        • DocType (number - integer):
        • DepthOverride (null):
        • ChunkGroupStartingId (null):
  • 404
#GET /CodesContent
#Description

Access the content of the current node in the document tree, as well as that of all child nodes.

#Parameters
  • jobId (integer):
  • nodeId (string): ID of the desired node in the document tree
  • productId (integer):
#Responses
  • 200
  • 404

#MuniDocs

#GET /search
#Description

Search MuniDocs for a word or phrase.

#Parameters
  • clientId (number - integer):
  • contentTypeId (string):
  • fragmentSize (number - integer):
  • isAdvanced (boolean):
  • isAutocomplete (boolean):
  • mode (string):
  • pageNum (number - integer):
  • pageSize (number - integer):
  • searchText (string): search query
  • sort (number - integer):
  • stateId (integer):
  • titlesOnly (boolean):
#Responses
  • 200
    • NumberOfHits (number - integer): the number of search results returned
    • Hits (array): numbered result objects
    • ProductFacets (array): empty
    • ContentTypeFacets (object)
    • AncestorFacets (array): empty
    • YearFacets (array): empty
    • MunidocFolderFacets (array):
    • MunidocTypeFacets (array):
    • SavedSearch (null):
  • 404

#Others

#GET /Clients/stateAbbr
#Description

Get a list of Municode clients in a particular US state.

#Parameters
  • stateAbbr (string): two-character US state abbreviation
#Responses
  • 200
  • 404
#GET /States/abbr
#Description

Get information about a US state based on its abbreviation.

#Parameters
  • stateAbbr (string): two-character US state abbreviation
#Responses
  • 200
    • StateId (number - integer) US state ID
    • StateName (string) full name of US state
    • StateAbbreviation (string): two character US state abbreviation
  • 404
#GET /Clients/name
#Description

Get general information about a client based on its name and state.

#Parameters
  • clientName (string): name of city or county
  • stateAbbr (string): two-character US state abbreviation
#Responses
  • 200
  • 404
#GET /ClientContent/<clientId>
#Description

Get all Municode products a client has subscribed to, and what features are enabled for those products.

#Parameters
#Responses
  • 200
  • 404
#GET /Products/name
#Description

Get information on a particular product a client subscribes to.

#Parameters
  • clientId (number - integer) ID of client
  • productName (string): name of product that client subscribes to
#Responses
  • 200
  • 404
#GET /Jobs/latest/<jobId>
#Description

Get information about a particular job. I am guessing that a Job is a service supplied by Municode according to a contract with a particular government and over a certain period of time.

#Parameters
  • None known
#Responses
  • Id
  • Name
  • ProductId
  • Product
    • ContentType
      • Id
      • Name
      • DefaultOrder
      • IsSearchable
    • Features
      • CodeBank
      • NOW
      • OrdBank
      • AutomatedOrdLink
      • CodeBankCompare
      • HideInLibrary
      • IntegratedSearch
      • PublicationNotifications
      • ShowGoogleTranslate
    • Client
      • PopRangeId
      • ClassificationId
      • Phone
      • ClientID
      • ClientName
      • State
        • StateID
        • StateName
        • StateAbbreviation
      • Address
      • Address2
      • City
      • ZipCode
      • Website
      • ShowAdvanceSheet
      • LibraryHomePageTemplateName
      • LibraryMobileHomePageTemplateName
      • Meetings
      • MeetingsUrl
    • ProductID
    • ProductName
    • HasNOW
    • Disclaimer
    • WebIntro
    • BannerText
    • HasDocxFolder
    • PaddedProductId
    • LandingPageID
    • ExternalCodeLink
    • SearchIntegrationTypeId
    • SearchIntegrationBaseUrl
  • PublishDate
  • MaxTrackingDate
  • OnlinePostDate
  • IsLatest
  • BannerText
  • OnlineDate