openapi: 3.2.0 info: title: Zip Code Data Zipc API version: '1.0' description: The Zip Code API provides United States zip code data with a comprehensive data model in JSON format. Using REST design, this API can help you build zip validations, city searches, distance calculations, radius searches and many other key functions for your applications. contact: name: Support url: https://metadapi.com/support email: support@metadapi.com termsOfService: https://www.metadapi.com/API-Terms servers: - url: https://global.metadapi.com tags: - name: Zipc paths: /zipc/v1/zipcodes/{zipcode}: parameters: - schema: type: string name: zipcode in: path required: true description: 5 Digit US Zip Code get: summary: Zip Code Details tags: - Zipc responses: '200': description: OK content: application/json: schema: type: object properties: links: $ref: '#/components/schemas/Links' data: $ref: '#/components/schemas/Zipcode' examples: '90210': value: links: self: https://global.metadapi.com/zipc/v1/zipcodes/90210 data: zipCode: '90210' uspsMainCityKey: Z20259 uspsMainCityName: BEVERLY HILLS titleCaseCityName: Beverly Hills zipClassificationCode: 'null' zipClassificationDesc: Non-Unique Zip uspsFacilityCode: P uspsFacilityName: Post Office uspsCityMailingInd: true uspsDeliveryCode: Y uspsDeliveryDesc: Office Has City-Delivery Carrier Routes uspsCarrierRouteSortCode: B uspsCarrierRouteRateSortDesc: Carrier Route. Sortation/Rates. Apply-Merging Not Permitted uniqueZipNameInd: false uspsFinanceNumber: '050666' stateCode: CA stateName: California stateFipsCode: '06' stateAbbr: Calif. countyFipsCode: '037' uspsCountyName: LOS ANGELES titleCaseCountyName: Los Angeles latitude: 34.100517 longitude: -118.41463 landAreaMi2: 10.125 waterAreaMi2: 0.059 landAreaKm2: 26.22277 waterAreaKm2: 0.153478 divisionCode: '9' divisionName: Pacific Division regionCode: '4' regionName: West Region msaCode: '31080' msaName: Los Angeles-Long Beach-Anaheim, CA Metro Area cityAliases: - uspsCityKey: Z20259 uspsCityName: BEVERLY HILLS titleCaseCityName: Beverly Hills uspsCityAbbr: 'null' uspsCityMailingInd: true uspsMainCityInd: true zipCodeStatistics: - year: 2000 totalPopulation: 21396 malePopulation: 10061 femalePopulation: 11335 - year: 2010 totalPopulation: 21741 malePopulation: 10292 femalePopulation: 11449 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Errors' '401': description: Access Denied content: application/json: schema: description: '' type: object properties: statusCode: type: number message: type: string minLength: 1 required: - statusCode - message x-examples: example-1: statusCode: 401 message: Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription. '403': description: Quota Exceeded. The error message will display how long in dd:hh:mi:ss for the quota to be reset. content: application/json: schema: description: '' type: object properties: statusCode: type: number message: type: string minLength: 1 required: - statusCode - message x-examples: example-1: statusCode: 403 message: Out of call volume quota. Quota will be replenished in 28.08:33:23. examples: {} operationId: get-zipcode description: Gets the details of a single Zip code. security: - subscription-key: [] parameters: [] /zipc/v1/zipcodes: parameters: [] get: summary: List all Zip Codes tags: - Zipc responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ZipCodeResponse' examples: Sample Response: value: links: self: http://global.metadapi.com/zipc/v1/zipcodes?Offset=0&Limit=2 first: http://global.metadapi.com/zipc/v1/zipcodes?Offset=0&Limit=2 next: http://global.metadapi.com/zipc/v1/zipcodes?Offset=2&Limit=2 meta: count: 24 offset: 0 limit: 2 data: - zipCode: '32004' uspsMainCityKey: Y22734 uspsMainCityName: PONTE VEDRA BEACH titleCaseCityName: Ponte Vedra Beach zipClassificationCode: P zipClassificationDesc: PO Box Zip uspsFacilityCode: P uspsFacilityName: Post Office uspsCityMailingInd: true uspsDeliveryCode: N uspsDeliveryDesc: Office Does Not Have City-Delivery Carrier Routes uspsCarrierRouteSortCode: D uspsCarrierRouteRateSortDesc: Carrier Route. Sortation/Rates. Do Not Apply-Merging Not Permitted uniqueZipNameInd: false uspsFinanceNumber: '117665' stateCode: FL stateName: Florida stateFipsCode: '12' stateAbbr: Fla. countyFipsCode: '109' uspsCountyName: SAINT JOHNS titleCaseCountyName: Saint Johns latitude: 25.985128 longitude: -80.14726 landAreaMi2: 5.094 waterAreaMi2: 0.584 landAreaKm2: 13.192342 waterAreaKm2: 1.512196 divisionCode: '5' divisionName: South Atlantic Division regionCode: '3' regionName: South Region msaCode: '27260' msaName: Jacksonville, FL Metro Area cityAliases: - uspsCityKey: Y22733 uspsCityName: PONTE VEDRA titleCaseCityName: Ponte Vedra uspsCityAbbr: null uspsCityMailingInd: true uspsMainCityInd: false - uspsCityKey: Y22734 uspsCityName: PONTE VEDRA BEACH titleCaseCityName: Ponte Vedra Beach uspsCityAbbr: PONTE VEDRA uspsCityMailingInd: true uspsMainCityInd: true zipCodeStatistics: null - zipCode: '33009' uspsMainCityKey: Y22003 uspsMainCityName: HALLANDALE titleCaseCityName: Hallandale zipClassificationCode: null zipClassificationDesc: Non-Unique Zip uspsFacilityCode: P uspsFacilityName: Post Office uspsCityMailingInd: true uspsDeliveryCode: Y uspsDeliveryDesc: Office Has City-Delivery Carrier Routes uspsCarrierRouteSortCode: D uspsCarrierRouteRateSortDesc: Carrier Route. Sortation/Rates. Do Not Apply-Merging Not Permitted uniqueZipNameInd: false uspsFinanceNumber: '113720' stateCode: FL stateName: Florida stateFipsCode: '12' stateAbbr: Fla. countyFipsCode: '011' uspsCountyName: BROWARD titleCaseCountyName: Broward latitude: 25.985128 longitude: -80.14726 landAreaMi2: 5.094 waterAreaMi2: 0.584 landAreaKm2: 13.192342 waterAreaKm2: 1.512196 divisionCode: '5' divisionName: South Atlantic Division regionCode: '3' regionName: South Region msaCode: '33100' msaName: Miami-Fort Lauderdale-West Palm Beach, FL Metro Area cityAliases: - uspsCityKey: Y22003 uspsCityName: HALLANDALE titleCaseCityName: Hallandale uspsCityAbbr: null uspsCityMailingInd: true uspsMainCityInd: true - uspsCityKey: Y22005 uspsCityName: HALLANDALE BEACH titleCaseCityName: Hallandale Beach uspsCityAbbr: HALLANDLE BCH uspsCityMailingInd: true uspsMainCityInd: false - uspsCityKey: Y22676 uspsCityName: PEMBROKE PARK titleCaseCityName: Pembroke Park uspsCityAbbr: null uspsCityMailingInd: false uspsMainCityInd: false - uspsCityKey: 004979 uspsCityName: HALNDLE BCH titleCaseCityName: Halndle Bch uspsCityAbbr: null uspsCityMailingInd: true uspsMainCityInd: false - uspsCityKey: '014736' uspsCityName: HALLANDLE BCH titleCaseCityName: Hallandle Bch uspsCityAbbr: null uspsCityMailingInd: true uspsMainCityInd: false zipCodeStatistics: - year: 2000 totalPopulation: 34504 malePopulation: 16100 femalePopulation: 18404 - year: 2010 totalPopulation: 39341 malePopulation: 18762 femalePopulation: 20579 '400': description: Bad Request '401': description: Unauthorized '403': description: Forbidden operationId: get-zipcodes description: Returns a list of zip codes. Results are always paginated. Visit the Zip Code Data API product page for information on how to get an API key. security: - subscription-key: [] parameters: - schema: type: number example: 10 minimum: 0 in: query name: offset description: Offset is the position in the dataset to start retrieval of records. - schema: type: number example: 10 minimum: 1 maximum: 50 in: query name: limit description: Number of records to return in each page. - schema: type: string example: 90210,33162 in: query name: zipcode description: 5 Digit Zip Code query parameter. Can have multiple values (separated by comma). - schema: type: string example: Z20259 in: query name: uspsMainCityKey description: Parameter for USPS City / Town key identifier for the main city of the zip code. - schema: type: string example: P minLength: 1 maxLength: 1 in: query name: zipClassificationCode description: Parameter for zipClassificationCode - schema: type: string example: B in: query name: uspsFacilityCode description: Parameter for facility code. - schema: type: string in: query name: uspsDeliveryCode description: Parameter for delivery code. - schema: type: string in: query name: uspsCarrierRouteSortCode description: Parameter for carrier route sort code. - schema: type: boolean in: query name: uniqueZipNameInd description: Parameter for unique zip name indicator. - schema: type: string in: query name: uspsFinanceNumber description: Parameter for finance number. - schema: type: string example: CA minLength: 2 maxLength: 2 in: query name: stateCode description: Parameter for state code. - schema: type: string example: '06' in: query name: stateFipsCode description: Parameter for State FIPS code. - schema: type: string example: '037' in: query name: countyFipsCode description: Parameter for county FIPS code. - schema: type: string example: '9' in: query name: divisionCode description: 'Parameter for division code. ' - schema: type: string example: '4' in: query name: regionCode description: 'Parameter for region code. ' - schema: type: string example: '31080' in: query name: msaCode description: Parameter for msaCode. /zipc/v1/distance: parameters: [] get: summary: Distance Between 2 Zip Codes tags: - Zipc responses: '200': description: OK content: application/json: schema: description: '' type: object properties: links: type: object properties: self: type: string minLength: 1 required: - self data: type: object properties: zipCode1: type: string minLength: 1 zipCode2: type: string minLength: 1 distanceKm: type: number distanceMi: type: number required: - zipCode1 - zipCode2 - distanceKm - distanceMi required: - links - data x-examples: example-1: links: self: https://global.metadapi.com/zipc/v1/distance?zipcode1=33009&zipcode2=33967 data: zipCode1: '33009' zipCode2: '33967' distanceKm: 174.65 distanceMi: 108.52 examples: example-1: value: links: self: https://global.metadapi.com/zipc/v1/distance?zipcode1=33009&zipcode2=33967 data: zipCode1: '33009' zipCode2: '33967' distanceKm: 174.65 distanceMi: 108.52 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Errors' '401': description: Unauthorized '403': description: Forbidden operationId: get-distance description: Gets the distance (in miles and kilometers) between 2 zip codes passed as parameters. There are 2 mandatory query parameters (zipCode1 and zipCode2). security: - subscription-key: [] parameters: - schema: type: string example: '90210' in: query name: zipCode1 required: true description: Zip Code 1 - schema: type: string example: '33162' in: query name: zipCode2 required: true description: Zip Code 2 /zipc/v1/radius: parameters: [] get: summary: Zip Code Radius tags: - Zipc responses: '200': description: OK content: application/json: schema: description: '' type: object x-examples: example-1: links: self: https://global.metadapi.com/zipc/v1/radius?zipcode=90210&radius=2&uom=mi meta: count: 2 data: - zipCode: '90210' latitude: 34.100517 longitude: -118.41463 zipCodeUrl: https://global.metadapi.com/zipc/v1/zipcodes/90210 distanceKm: 0 distanceMi: 0 - zipCode: '90069' latitude: 34.09383 longitude: -118.3817 zipCodeUrl: https://global.metadapi.com/zipc/v1/zipcodes/90069 distanceKm: 3.1281612 distanceMi: 1.9437492 properties: links: type: object required: - self properties: self: type: string minLength: 1 description: Link to this response. meta: type: object required: - count properties: count: type: number description: Number of zip codes found in the radius data: type: array uniqueItems: true minItems: 1 items: type: object properties: zipCode: type: string minLength: 5 description: 5 Digit Zip Code. Zone Improvement Plan. maxLength: 5 example: '90210' latitude: type: number description: Zip Code Latitude longitude: type: number description: Zip Code Longitude zipCodeUrl: type: string minLength: 1 description: URL to Zip Code distanceKm: type: number description: Distance to query parameter zip code in kilometers distanceMi: type: number description: Distance to query parameter zip code in miles required: - zipCode - latitude - longitude - zipCodeUrl - distanceKm - distanceMi required: - links - meta - data '400': description: Bad Request content: application/json: schema: description: '' type: object properties: errors: type: array uniqueItems: true minItems: 1 items: required: - status - title - detail properties: status: type: string minLength: 1 title: type: string minLength: 1 detail: type: string minLength: 1 required: - errors x-examples: example-1: errors: - status: '400' title: Uom detail: Valid uom values must be mi or km - status: '400' title: radius detail: Radius Distance must be less than 322 kilometers or 200 miles '401': description: Unauthorized content: application/json: schema: description: '' type: object properties: statusCode: type: number message: type: string minLength: 1 required: - statusCode - message x-examples: example-1: statusCode: 401 message: Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API. examples: example-1: value: statusCode: 0 message: string '403': description: Quota Exceeded. The error message will display how long in dd:hh:mi:ss for the quota to be reset. operationId: get-radius description: Endpoint that returns the zip codes that fall within the specified radius of another zip code. The returned zip codes are sorted by distance. security: - subscription-key: [] parameters: - schema: type: string minLength: 5 maxLength: 5 in: query name: zipCode description: 5 Digit US Zip Code required: true - schema: type: integer in: query name: radius description: Radius distance. Max 322 km or 200 mi required: true - schema: type: string enum: - mi - km example: mi minLength: 2 maxLength: 2 in: query name: uom description: Unit of Measure required: true /zipc/v1/msagroups: parameters: [] get: summary: List All MSA Groups tags: - Zipc responses: '200': description: OK content: application/json: schema: description: Response type: object x-examples: example-1: links: self: http://localhost:7071/zipc/v1/msagroups?Offset=50&Limit=5 first: http://localhost:7071/zipc/v1/msagroups?Offset=0&Limit=5 next: http://localhost:7071/zipc/v1/msagroups?Offset=55&Limit=5 prev: http://localhost:7071/zipc/v1/msagroups?Offset=45&Limit=5 meta: count: 611 offset: 50 limit: 5 data: - msaCode: '12180' msaName: Auburn, NY Micro Area states: - stateCode: NY stateFipsCode: '36' stateName: New York counties: - countyFipsCode: '011' uspsCountyName: CAYUGA titleCaseCountyName: Cayuga - msaCode: '12220' msaName: Auburn-Opelika, AL Metro Area states: - stateCode: AL stateFipsCode: '01' stateName: Alabama counties: - countyFipsCode: 081 uspsCountyName: LEE titleCaseCountyName: Lee - msaCode: '12260' msaName: Augusta-Richmond County, GA-SC Metro Area states: - stateCode: GA stateFipsCode: '13' stateName: Georgia counties: - countyFipsCode: '033' uspsCountyName: BURKE titleCaseCountyName: Burke - countyFipsCode: '073' uspsCountyName: COLUMBIA titleCaseCountyName: Columbia - countyFipsCode: '181' uspsCountyName: LINCOLN titleCaseCountyName: Lincoln - countyFipsCode: '189' uspsCountyName: MCDUFFIE titleCaseCountyName: Mcduffie - countyFipsCode: '245' uspsCountyName: RICHMOND titleCaseCountyName: Richmond - stateCode: SC stateFipsCode: '45' stateName: South Carolina counties: - countyFipsCode: '003' uspsCountyName: AIKEN titleCaseCountyName: Aiken - countyFipsCode: '037' uspsCountyName: EDGEFIELD titleCaseCountyName: Edgefield - msaCode: '12300' msaName: Augusta-Waterville, ME Micro Area states: - stateCode: ME stateFipsCode: '23' stateName: Maine counties: - countyFipsCode: '011' uspsCountyName: KENNEBEC titleCaseCountyName: Kennebec - msaCode: '12380' msaName: Austin, MN Micro Area states: - stateCode: MN stateFipsCode: '27' stateName: Minnesota counties: - countyFipsCode: 099 uspsCountyName: MOWER titleCaseCountyName: Mower properties: links: type: object description: Response Link Navigation object required: - self properties: self: type: string minLength: 1 description: Link to this response. first: type: string minLength: 1 description: Link to the first group of records from API call. next: type: string minLength: 1 description: Link to next set of results from API call. prev: type: string minLength: 1 description: Link to the previous set of records from API call. meta: type: object description: Response Metadata Information required: - count - offset - limit properties: count: type: number description: 'Total number of records of the response. Note: the data object always has a limit number of records retrieved.' offset: type: number description: Offset position of where the first record returned. limit: type: number description: Total number of records returned in the data array. Specified by limit query parameter. data: type: array uniqueItems: true minItems: 1 items: type: object description: MSA Groups Data Object properties: msaCode: type: string minLength: 1 description: 5 digit MSA (Metropolitan Statistical Area) code. msaName: type: string minLength: 1 description: Name of the defined MSA code. states: type: array uniqueItems: true minItems: 1 description: Array with states and counties that make up MSA Group items: type: object description: State Information properties: stateCode: type: string minLength: 2 description: Standard 2 character state code. example: CA maxLength: 2 stateFipsCode: type: string minLength: 1 description: Federal Information Processing Standards 2 digit assigned code. stateName: type: string minLength: 1 description: State Name counties: type: array uniqueItems: true minItems: 1 description: Array with counties related to MSA group in the state. items: type: object description: County Information properties: countyFipsCode: type: string minLength: 1 description: FIPS code assigned to the county of the main city of the zip code. uspsCountyName: type: string minLength: 1 description: Name of the county of the main city for the zip code. USPS Standard. titleCaseCountyName: type: string minLength: 1 description: County Name in Title Case required: - countyFipsCode - uspsCountyName - titleCaseCountyName required: - stateCode - stateFipsCode - stateName - counties required: - msaCode - msaName - states required: - links - meta - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Errors' '401': description: Unauthorized '403': description: Forbidden operationId: get-msagroups description: This end point lists all the Metropolitan and Micropolitan Statistical Areas in the United States with the corresponding states and counties that make up the group. security: - subscription-key: [] parameters: - schema: type: integer maximum: 50 minimum: 1 in: query name: limit description: 'Number of records to return in each page. Max value: 50.' required: true - schema: type: integer minimum: 0 in: query name: offset description: Offset is the position in the dataset to start retrieval of records. required: true - schema: type: string example: CA minLength: 2 maxLength: 2 in: query name: stateCode description: Parameter for state code. /zipc/v1/msagroups/{msaCode}: parameters: - schema: type: string example: '11580' minLength: 5 maxLength: 5 name: msaCode in: path required: true description: 5 digit MSA (Metropolitan Statistical Area) code. get: summary: Metro/Micro Statistical Area Details tags: - Zipc responses: '200': description: OK content: application/json: schema: description: '' type: object x-examples: example-1: links: self: http://localhost:7071/zipc/v1/msagroups/11580 meta: count: 1 data: msaCode: '11580' msaName: Arcadia, FL Micro Area states: - stateCode: FL stateFipsCode: '12' stateName: Florida counties: - countyFipsCode: '027' uspsCountyName: DESOTO titleCaseCountyName: Desoto properties: links: type: object required: - self description: Response Link Navigation object properties: self: type: string minLength: 1 description: Link to this response. meta: type: object required: - count description: Response Metadata Information properties: count: type: number description: 'Total number of records of the response. Note: the data object always has a limit number of records retrieved.' data: type: object required: - msaCode - msaName - states description: Response Data array. properties: msaCode: type: string minLength: 1 description: 5 digit MSA (Metropolitan Statistical Area) code. msaName: type: string minLength: 1 description: Name of the defined MSA code. states: type: array uniqueItems: true minItems: 1 description: Array with states and counties that make up MSA Group items: type: object properties: stateCode: type: string minLength: 1 description: Standard 2 character state code. stateFipsCode: type: string minLength: 1 description: Federal Information Processing Standards 2 digit assigned code. stateName: type: string minLength: 1 description: State Name counties: type: array uniqueItems: true minItems: 1 description: Array with counties related to MSA group in the state. items: type: object properties: countyFipsCode: type: string minLength: 1 description: FIPS code assigned to the county of the main city of the zip code. uspsCountyName: type: string minLength: 1 description: Name of the county of the main city for the zip code USPS Standard. titleCaseCountyName: type: string minLength: 1 description: County Name in Title Case required: - countyFipsCode - uspsCountyName - titleCaseCountyName required: - stateCode - stateFipsCode - stateName required: - links - meta - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Errors' '401': description: Unauthorized '403': description: Forbidden operationId: get-msagroups-msacode description: Gets the details of a single Metropolitan Statistical Area code passed as a path parameter. security: - subscription-key: [] /zipc/v1: get: summary: Validate License Key tags: - Zipc responses: '204': description: No Content '401': description: Unauthorized content: application/json: schema: type: object properties: statusCode: type: integer message: type: string x-examples: Example 1: statusCode: 401 message: Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription. examples: Missing API Key: value: statusCode: 401 message: Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API. Invalid API Key: value: statusCode: 401 message: Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription. operationId: get-zipc-v1 description: Endpoint used to validate license key only. Returns 204 on Success security: - subscription-key: [] components: schemas: Errors: description: List of Errors generated by the request. type: object x-examples: example-1: errors: - status: '400' title: Invalid Path Parameter detail: 'Path Parameter: 33x09 Error Message: Invalid Zip Code Format. 5 character long, numbers only' properties: errors: type: array uniqueItems: true minItems: 1 description: Errors Array items: type: object properties: status: type: string minLength: 1 description: Status Code of Error title: type: string minLength: 1 description: Error Title detail: type: string minLength: 1 description: Detail information about the error. required: - status - title - detail required: - errors Zipcode: description: Zip Code Data Model type: object x-examples: Sample Zip Code Response: zipCode: '90210' uspsMainCityKey: Z20259 uspsMainCityName: BEVERLY HILLS titleCaseCityName: Beverly Hills zipClassificationCode: 'null' zipClassificationDesc: Non-Unique Zip uspsFacilityCode: P uspsFacilityName: Post Office uspsCityMailingInd: true uspsDeliveryCode: Y uspsDeliveryDesc: Office Has City-Delivery Carrier Routes uspsCarrierRouteSortCode: B uspsCarrierRouteRateSortDesc: Carrier Route. Sortation/Rates. Apply-Merging Not Permitted uniqueZipNameInd: false uspsFinanceNumber: '050666' stateCode: CA stateName: California stateFipsCode: '06' stateAbbr: Calif. countyFipsCode: '037' uspsCountyName: LOS ANGELES titleCaseCountyName: Los Angeles latitude: 34.100517 longitude: -118.41463 landAreaMi2: 10.125 waterAreaMi2: 0.059 landAreaKm2: 26.22277 waterAreaKm2: 0.153478 divisionCode: '9' divisionName: Pacific Division regionCode: '4' regionName: West Region msaCode: '31080' msaName: Los Angeles-Long Beach-Anaheim, CA Metro Area cityAliases: - uspsCityKey: Z20259 uspsCityName: BEVERLY HILLS titleCaseCityName: Beverly Hills uspsCityAbbr: null uspsCityMailingInd: true uspsMainCityInd: true zipCodeStatistics: - year: 2000 totalPopulation: 21396 malePopulation: 10061 femalePopulation: 11335 - year: 2010 totalPopulation: 21741 malePopulation: 10292 femalePopulation: 11449 title: Zip Code properties: zipCode: type: string minLength: 5 example: '90210' maxLength: 5 description: 5 Digit Zip Code. Zone Improvement Plan. uspsMainCityKey: type: string minLength: 1 description: USPS City / Town key identifier for the main city of the zip code. uspsMainCityName: type: string minLength: 1 description: USPS City / Town Name for the main city of the zip code. USPS Upper Case Format. titleCaseCityName: type: string minLength: 1 description: USPS City / Town Name for the main city of the zip code. Title Case Format. zipClassificationCode: type: - string - 'null' minLength: 1 description: Code provided by USPS for the type of Zip Code it represents. P = PO Box Zip, U = Unique Zip, M = APO/FPO Military Zip , null (not provided by USPS),N = Non-Unique Zip. zipClassificationDesc: type: string minLength: 1 description: Description of the zip classification code. P = PO Box Zip, U = Unique Zip, M = APO/FPO Military Zip , null (not provided by USPS), = Non-Unique Zip. uspsFacilityCode: type: string minLength: 1 description: Facility code provided by the USPS. B=Branch, C=Community Post Office, N = Non-Postal Community Name, former postal facility or place name, P= Post Office, S=Station, U = Urbanization uspsFacilityName: type: string minLength: 1 description: USPS Facility Name B=Branch, C=Community Post Office, N = Non-Postal Community Name, former postal facility or place name, P= Post Office, S=Station, U = Urbanization uspsCityMailingInd: type: boolean description: City names with the City State Mailing Name indicator flag set to True are considered part of a complete and standardized address; city names with the flag set to false file should not be used in a complete and standardized address. uspsDeliveryCode: type: string minLength: 1 description: Determines if the zip code city has Carrier Routes. uspsDeliveryDesc: type: string minLength: 1 description: Determines if the zip code city has Carrier Routes. uspsCarrierRouteSortCode: type: string minLength: 1 description: Code for the available carrier route. uspsCarrierRouteRateSortDesc: type: string minLength: 1 description: Description for the carrier route code. uniqueZipNameInd: type: boolean description: True = Unique Zip Code Name. False the zip code name is not unique. uspsFinanceNumber: type: string minLength: 1 description: USPS Provided Finance Number. This code is assigned to postal service facilities. stateCode: type: string minLength: 1 description: Standard 2 character state code. stateName: type: string minLength: 1 description: State Name stateFipsCode: type: string minLength: 1 description: Federal Information Processing Standards 2 digit assigned code. stateAbbr: type: string minLength: 1 description: Abbreviation for state name. countyFipsCode: type: string minLength: 1 description: FIPS code assigned to the county of the main city of the zip code. uspsCountyName: type: string minLength: 1 description: Name of the county of the main city for the zip code. titleCaseCountyName: type: string minLength: 1 description: Main County Name in Title Case latitude: type: - number - 'null' description: Zip Code Latitude longitude: type: - number - 'null' description: Zip Code Longitude landAreaMi2: type: - number - 'null' description: Zip Code Land area in Square Miles waterAreaMi2: type: - number - 'null' description: Zip Code Water Area in Square Miles landAreaKm2: type: - number - 'null' description: Zip Code Land Area in square kilometers. waterAreaKm2: type: - number - 'null' description: Zip Code water area in Square kilometers. divisionCode: type: string minLength: 1 description: Division Code. Part of the geographical hierarchy of the US provided by the united states census. divisionName: type: string minLength: 1 description: Division Name. Part of the geographical hierarchy of the US provided by the united states census. regionCode: type: string minLength: 1 description: Region Code. Part of the geographical hierarchy of the US provided by the united states census. regionName: type: string minLength: 1 description: Region Name. Part of the geographical hierarchy of the US provided by the united states census. msaCode: type: string minLength: 1 description: 5 digit MSA (Metropolitan Statistical Area) code. msaName: type: string minLength: 1 description: Name of the defined MSA code. cityAliases: type: array uniqueItems: true minItems: 1 description: Array that contains all the city aliases for the given zip code. items: type: object properties: uspsCityKey: type: string minLength: 1 description: USPS City / Town key identifier city of the zip code. uspsCityName: type: string minLength: 1 description: USPS City / Town Name for the zip code. All uppercase. titleCaseCityName: type: string minLength: 1 description: USPS City / Town Name for the zip code. uspsCityAbbr: type: - string - 'null' minLength: 1 description: Main city abbreviation provided by USPS. Null if not provided. Uppercase. uspsCityMailingInd: type: boolean description: City names with the City State Mailing Name indicator flag set to True are considered part of a complete and standardized address; city names with the flag set to false file should not be used in a complete and standardized address. uspsMainCityInd: type: boolean description: If true, the city name and code is the main zip code city name. (Preferred USPS city). required: - uspsCityKey - uspsCityName - titleCaseCityName - uspsCityAbbr - uspsCityMailingInd - uspsMainCityInd zipCodeStatistics: type: - array - 'null' uniqueItems: true minItems: 1 description: Available statistics by year of the Zip Code. items: type: object properties: year: type: number description: Year for the captured statistic totalPopulation: type: number description: Total population of the zip code malePopulation: type: number description: Total Male population of the zip code. femalePopulation: type: number description: Total female population of the zip code. required: - year - totalPopulation - malePopulation - femalePopulation required: - zipCode - uspsMainCityKey - uspsMainCityName - titleCaseCityName - zipClassificationCode - zipClassificationDesc - uspsFacilityCode - uspsFacilityName - uspsCityMailingInd - uspsDeliveryCode - uspsDeliveryDesc - uspsCarrierRouteSortCode - uspsCarrierRouteRateSortDesc - uniqueZipNameInd - uspsFinanceNumber - stateCode - stateName - stateFipsCode - stateAbbr - countyFipsCode - uspsCountyName - titleCaseCountyName - landAreaMi2 - waterAreaMi2 - landAreaKm2 - waterAreaKm2 - divisionCode - divisionName - regionCode - regionName - msaCode - msaName - cityAliases - zipCodeStatistics meta: title: meta type: object description: Response Metadata. Provides additional context about the data response. properties: count: type: number description: 'Total number of records of the response. Note: the data object always has a limit number of records retrieved.' example: 24 offset: type: number description: Offset position of where the first record returned. example: 0 limit: type: number description: 'Total number of records returned in the data array. ' example: 2 required: - count - offset - limit ZipCodeResponse: title: ZipCodeResponse type: object properties: links: $ref: '#/components/schemas/Links' meta: $ref: '#/components/schemas/meta' data: type: array items: $ref: '#/components/schemas/Zipcode' description: 'Succesful response of the ' Links: title: links type: object description: API Response Links properties: self: type: string description: Link to this response. example: https://global.metadapi.com/zipc/v1/zipcodes?Offset=20&Limit=10 first: type: string description: Link to the first group of records from API call. example: https://global.metadapi.com/zipc/v1/zipcodes?Offset=0&Limit=10 next: type: string description: Link to next set of results from API call. example: https://global.metadapi.com/zipc/v1/zipcodes?Offset=30&Limit=10 prev: type: string description: Link to the previous set of records from API call. example: https://global.metadapi.com/zipc/v1/zipcodes?Offset=10&Limit=10 last: type: string description: 'Link to last set of records from API call. ' example: https://global.metadapi.com/zipc/v1/zipcodes?Offset=60&Limit=10 securitySchemes: subscription-key: type: apiKey in: header description: API Key provided by the metadapi subscription. name: Ocp-Apim-Subscription-Key