Licenses & Inspections Data API (Beta)

Permit, license, inspection, case and violation data from the Department of Licenses & Inspections.

API Endpoints

Base Service URLhttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/
Locationshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations
Permitshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/permits
Licenseshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/licenses
Licensed Contractorshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/licensedcontractors
Caseshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/cases
Violation Detailshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/violationdetails
Zoning Board Appealshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/zoningboardappeals
L&I Review Board Appealshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/lireviewboardappeals
Building Board Appealshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/buildingboardappeals
Appeal Hearingshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/appealhearings
Hearing Dateshttp://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/hearingdates

Locations

A location is typically a street address for a parcel of land or a sub-unit of a parcel. Each location is associated with a city, state, ZIP code, and geographic X-Y coordinates, as well as geographic divisions such as City Council District, Census Tract, Census Block Group, and Political Ward.

Permits

A permit grants legal permission to commence work on physical changes or zoning changes to a lot or structure. These include but are not limited to new constructions, alterations, demolitions, occupancy changes, and installations of and modifications to electrical, mechanical, and plumbing systems.

Each permit has a unique Permit Number. The Application Type Description (and the abbreviated Application Type) indicates the general nature of the permit application (for example: whether the permit is for new construction or mechanical work).

The Permit Code Description is more specific and describes in detail the objectives of the permitted work. For example, in the case of mechanical work a Code Description may specify the type and number of appliances to be installed (MEC-EQUIPMENT/APPLIANCE INSTAL). There is then a Description of Work for each specific permit to summarize the intent of the work. The Status and Last Modified Date indicate the current standing of the project. Contact information is provided for the primary contact and/or the contractor working on the project.

View all permit codes & descriptions.

Licenses

Licenses are required for individuals and businesses to engage in select commercial activities. For example, vendors and restaurants require a license in order to sell goods and food and trades-people, such as plumbers and contractors, require a license in order to practice their trade. License Type and License Type Description indicates generally the type of license.

Each license has a unique License Number, an issue date (given when payment and all pre-requisites have been met), and a month and year of expiration. Status indicates whether the license is Active, Inactive, or Expired. Inactive Date indicates if and when a license became inactive before expiring. Primary contact information is provided for each license.

View all license codes & descriptions.

Licensed Contractors

Building contractors and certain trades-people such as plumbers and electricians require licenses to practice their trade. Each Licensed Contractor is issued a unique Contractor License Number. Contact information is given for the individual being licensed.

Cases

A case is a recorded instance, created when a property is inspected and cited for one or more violations of the Philadelphia Code. A property will be re-inspected after a certain time interval to see whether or not the violations on the case have been complied. Further actions may be taken by the department to resolve a case. These actions may include clean & seals, demolitions, or sending a case to court. Each case has a unique Case Number and cites a specific Location in violation.

Each Case is also assigned a Priority, indicating whether the property is Non Hazardous, Unsafe, or Imminently Dangerous. Relevant dates are associated with each Case to indicate when the case was created/added, when it was last updated, and, in the event of a resolution, when the case was resolved.

Violation Details

Each Case cites the sections of the Philadelphia Code of which a property is found in violation. These citations are known as Violations, which are given a unique Violation ID for each time the property is found to be in violation. The Violation Code corresponds to the section of the Philadelphia Code being violated and is further described in the synonymous Violation Description. Each Violation has a corresponding Case number and Location, initial date of violation, and Status from the most recent inspection of the Location.

Zoning Board Appeals

See details of appeal review below.

L&I Review Board Appeals

See details of appeal review below.

Building Board Appeals

See details of appeal review below.

Appeal Hearings

Hearing Dates

Sample Data Requests

Get all Locations for Zip Code 19107 ordered by Street Name and Street Number:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations?$filter=substringof('19107',zip)%20eq%20true&orderby=street_name,street_number

Get all Locations for Zip Code 19107 ordered by Street Name and Street Number with a JSON format response and callback:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations?$filter=substringof('19107',zip)%20eq%20true&orderby=street_name,street_number&$format=json&$callback=cb

Get a Location by address with a JSON format. Due to how the database stores street numbers, it would be best to use substringof:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations?$filter=substringof('1234',street_number) eq true and (street_name eq 'MARKET') and (street_suffix eq 'ST')&$format=json

Get all Licenses along with related Locations:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/licenses?$expand=locations

Get a Location for a Permit Number 49648:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/permits('49648')/locations

Get all Zoning Board Appeals for a Location Id 525027:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations(525027)/zoningboardappeals

Get all Cases with a Resolution Code "CLOSED" for a Location Id 525027:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations(525027)/cases?$filter=resolution%20eq%20'CLOSED'

Get all Cases with a Resolution "CLOSED" ordered by Added Datetime descending:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/cases?$filter=resolution%20eq%20'CLOSED'&orderby=added_datetime%20desc

Get all Violations by Location ID:

http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations(525027)/violationdetails

Sample API Consumption (JavaScript)

          <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
          <script type="text/javascript">
            var mMapReq;
              function ConsumeAPI() {
                mMapReq = $.ajax({
                url: "http://services.phila.gov/PhillyApi/Data/v0.7/Service.svc/locations(2777)?$format=json",
                dataType: "jsonp",
                timeout: 20000,
                jsonp: "$callback",
                jsonpCallback: "RenderLocation"
                });
              }

              function RenderLocation(data) {
              if (data.d != null) {
                var mAddress = data.d.street_number + " ";
                mAddress = mAddress + data.d.street_direction + " ";
                mAddress = mAddress + data.d.street_name + " ";
                mAddress = mAddress + data.d.street_suffix + " ";
                mAddress = mAddress + data.d.city + ", ";
                mAddress = mAddress + data.d.state;
                $("#AddressHeaderText").html(mAddress);
              }
            }
          </script>
        

Notes

Three separate boards hear and review appeals for citations, permit denials and revocations, and building variances issued by the Department of Licenses and Inspections and other City agencies. The Zoning Board of Adjustment (ZBA) hears and decides appeals in zoning matters, considers special exceptions, and grants variances. The L&I Review Board (LIRB) hears appeals to property violations issued by the Department of Licenses and Inspections and, in some instances, other city agencies, such as the Water Department and the Art and Historical Commissions. The Board of Building Standards (BBS) is an advisory board that reviews appeals related to building safety and the application of Philadelphia’s Building Code.

Each Appeal has a unique Appeal Key that can be used to get further information about that appeal. Such information about each appeal includes an appeal number, application type, grounds (reason) for the appeal, the primary applicant applying for the appeal, and the associated Case or Permit. Further information includes the date of a previous or upcoming hearing and the decisions made at previous hearings. If an Appeal is denied, an applicant may progress the Appeal to Court. If the Appeal progresses to Court, information is available for the resulting Court Case once a decision has been reached, including the action date, case number, court action, court result, and any provisos.

This API conforms to the OData protocol specification. More information on the OData specification, including documentation and pre-built client libraries can be found on the OData web site.