Price Calculator APIs

Calculate postage rates quickly and easily online for domestic and international shipping with Price Calculator APIs.

Register and Get Access to Web Tools APIs
Back to Full List of USPS Web Tools®

Rate Calculator APIs

Domestic Price Calculator Expand Collapse FAQ question

Calculate how much domestic shipping will cost with Priority Mail Express™, Priority Mail®, First-Class Mail™, Standard Post™, Media Mail®, and Library Mail services.

View Technical Document

Sample XML Request

http://SERVER/PATH?API=RateV4&XML=<RateV4Request USERID="XXXXXXXXXXXX" >
<Revision/>
<Package ID="1ST">
<Service>PRIORITY</Service>
<ZipOrigination>44106</ZipOrigination>
<ZipDestination>20770</ZipDestination>
<Pounds>1</Pounds>
<Ounces>8</Ounces>
<Container>NONRECTANGULAR</Container>
<Size>LARGE</Size>
<Width>15</Width>
<Length>30</Length>
<Height>15</Height>
<Girth>55</Girth>
</Package>
</RateV4Request>

 

Sample XML Response

<?xml version="1.0" encoding="UTF-8"?>
<RateV4Response>
<Package ID="1ST">
<ZipOrigination>44106</ZipOrigination>
<ZipDestination>20770</ZipDestination>
<Pounds>1</Pounds>
<Ounces>8</Ounces>
<Container>NONRECTANGULAR</Container>
<Size>LARGE</Size>
<Width>15</Width>
<Length>30</Length>
<Height>15</Height>
<Girth>55</Girth>
<Zone>3</Zone>
<Postage CLASSID="1">
<MailService>Priority Mail</MailService>
<Rate>24.85</Rate>
</Postage>
</Package>
</RateV4Response>

Get prices for Global Express Guaranteed®, Priority Mail Express International™, Priority Mail International®, First-Class Package International Service™, and First-Class Mail International® services. Unique mailing restrictions are provided for each country, along with declarations form information and Priority Mail Express International delivery areas.

View Technical Document

Sample XML Request

http://SERVER/PATH?API=IntlRateV2&XML=<IntlRateV2Request USERID="XXXXXXXXXXXX">
<Revision>2</Revision>
<Package>
<Pounds>69</Pounds>
<Ounces>0</Ounces>
<Machinable>True</Machinable>
<MailType>all</MailType>
<GXG>
<POBoxFlag>N</POBoxFlag>
<GiftFlag>N</GiftFlag>
</GXG>
<ValueOfContents>100.00</ValueOfContents>
<Country>Canada</Country>
<Container>RECTANGULAR</Container>
<Size>Regular</Size>
<Width>10</Width>
<Length>10</Length>
<Height>11</Height>
<Girth></Girth>
<CommercialFlag>y</CommercialFlag>
</Package>
</IntlRateV2Request>

 

Sample XML Response

<?xml version="1.0" encoding="UTF-8"?>
<IntlRateV2Response><Package ID="0">
<Prohibitions></Prohibitions>
<Restrictions> </Restrictions>
<Service ID="4">
<Pounds>69</Pounds>
<Ounces>0</Ounces>
<Machinable>True</Machinable>
<MailType>all</MailType>
<GXG>
<POBoxFlag>N</POBoxFlag>
<GiftFlag>N</GiftFlag>
</GXG>
<Container>RECTANGULAR</Container>
<Size>REGULAR</Size>
<Width>10</Width>
<Length>10</Length>
<Height>11</Height>
<Girth>0</Girth>
<Country>CANADA</Country>
<Postage>320.85</Postage>
<CommercialPostage>282.35</CommercialPostage>
<ExtraServices><ExtraService>
<ServiceID>1</ServiceID>
<ServiceName>Insurance</ServiceName>
<Available>True</Available>
<OnlineAvailable>True</OnlineAvailable>
<Price>1.00</Price>
<PriceOnline>1.00</PriceOnline>
<DeclaredValueRequired>True</DeclaredValueRequired>
</ExtraService></ExtraServices>
<ValueOfContents>100.00</ValueOfContents>
<SvcCommitments>1 - 3 business days</SvcCommitments>
<SvcDescription>Global Express Guaranteed&lt;sup&gt;&amp;reg;&lt;/sup&gt; (GXG)**</SvcDescription>
<MaxDimensions>Max. length 46", width 35", height 46" and max. length plus girth combined 108"</MaxDimensions>
<MaxWeight>70</MaxWeight>
</Service>
     </Package>
</IntlRateV2Response>