scraper-pmf
v1.0.3
Published
scraper for private market flood website
Downloads
4
Readme
Private Market Flood Insurance Scraper
Installation
npm install --save scraper-pmf
Parameters
Paramaters for the a
and v
flood zones can be found in /schema/index.js
.
A Flood Zone
| Key | Type | Description | Criteria | Required | | ------------- |:-------------:| -----:| -------------------:| --------:| | floodReady | boolean | is the house prepped for a flood | | False | | occupancy | string/enum | how many units in the building | "twotofour", "fiveplus", "other_noneresident" | True | | buildingCoverageAmt | int | amount to cover your building | | True | | contentsCoverageAmt | int | amount to cover your belongings | | True | | deductible | string/enum | out of pocket cost | "2000", "5000" | True | | effectiveDate | string/enum | | "before", "after" | False | foundationType | string/enum | foundation of your home | "slab on ground", "basement", "split level slab", "split level basement", "elevated building with no enclosure", "elevated building with an enclosure", "walkout basement", "crawlspace", "below grade crawlspace" | True | | isOwnerOccupied | boolean | does the owner live in the home for at least 292 days out of the year | |True| | isPre1984 | boolean | was the home created prior to 1984 || True | | isSingleResidential | boolean | is the home only occupied by one family || True | | premiumPeriod | string/enum | how long you would like to keep your premium | "one year", "one year with one year rate lock", "one year with two year rate lock", "two years", "three years" | True | | state | string | what state the home is in | no abbreviations. capitalize words | True | | replacementCostAmt | int | | keep numbers even, ex. 250000| True | | zipCode | string | | zipcode of the home | True |
V Flood Zone
| Key | Type | Description | Criteria | Required | | ------------- |:-------------:| -----:| -------------------:| --------:| | occupancy | string/enum | units in building | "twotofour", "fiveplus", "other_nonresident" | True | | buildingCoverageAmt | int | amount to cover your building || True | | contentsCoverageAmt | int | amount to cover your belongings || True | | deductible | string/enum | out of pocket cost | "2000", "5000" | True | effectiveDate | string/enum | | "before", "after" | False | | hasCrawlSpace | boolean | does the home have crawl space underneath || True | | isOwnerOccupied | boolean | does the owner live in the home for at least 292 days || True| | isSingleResidential | boolean | is the home only occupied by one family | | True | | numberOfFloors | string/enum | how many floors | "one", "two", "three plus" | True | | premiumPeriod | string/enum | how long you would like to keep your premium | "one year", "one year with one year rate lock", "one year with two year rate lock", "two years", "three years" | True | | state | string | what state the home is in | no abbreviations. capitalize words | True | | replacementCostAmt | int | | keep numbers even, ex. 250000| True | | zipCode | string | | zipcode of the home | True |
Making the call
const scraper = require('scraper-pmf');
const aParams = {...};
const vParams = {...};
const aTotals = scraper.aFloodZone(aParams);
const zTotals = scraper.vFloodZone(vParams);
Response
For all array values, they are int
types. Index 0 is the dollar amount and index 1 is the cents amount. Response looks the same for both flood types.
{
total: [120, 0],
building: [220, 20],
contents: [1000, 0],
icc: [5000, 20],
state: [1050, 50],
policy: [0, 0]
}
Expected responses can also be found in /schema/index.js
.