Unit Switch API

The Unit Switch API effortlessly streamlines unit conversions, offering accurate and flexible capabilities that cater to a wide range of applications.

About the API:  

The Unit Switch API serves as a vital tool for developers, businesses, and applications seeking accurate and straightforward unit conversions. Acting as a seamless connector between different systems, it ensures compatibility and simplifies the conversion of measurements such as length, weight, volume, and temperature.

This API automates unit conversions, making it invaluable for applications managing diverse datasets or operating across industries with varying standard units. Its comprehensive coverage across different measurement categories enhances its adaptability in various environments.

For globally-operating applications, the Unit Switch API facilitates smooth transitions between region-specific units. This capability is particularly beneficial in sectors like e-commerce, logistics, and travel, where users can input or receive measurements tailored to their location or preference, thereby improving convenience and precision.

In essence, the Unit Switch API is indispensable for applications and systems that require accurate and efficient unit conversions. Whether managing multiple measurement systems, enabling real-time conversions, or offering advanced functionalities, the API simplifies complexities associated with diverse units of measurement. It optimizes processes, enhances interoperability, and contributes to overall efficiency and user satisfaction across digital platforms.

 

What this API receives and what your API provides (input/output)?

It will receive parameters and provide you with a JSON.

 

What are the most common uses cases of this API?

  1. E-commerce Platforms: Facilitate unit conversions for product dimensions, weights, and volumes to ensure accurate and standardized information for online shoppers.

    Travel and Navigation Apps: Convert distances, speeds, and temperatures to accommodate international users, providing consistent and user-friendly information in travel applications.

    Health and Fitness Apps: Support conversions of units for weight, height, and nutrition, enabling users to track and understand their health metrics in their preferred units.

    Engineering and Construction Software: Seamlessly convert measurements for length, area, and volume in engineering and construction applications to ensure precision in project planning and execution.

    Finance and Investment Platforms: Assist in currency and unit conversions for financial calculations, facilitating seamless transactions and investment analyses.

 

Are there any limitations to your plans?

Besides the number of API calls, there is no other limitation.

API Documentation

Endpoints


To use this endpoint just run it and you will get all the units of measurement.



                                                                            
GET https://zylalabs.com/api/4754/unit+switch+api/5883/measurements
                                                                            
                                                                        

Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"kg-g":{"value":1000,"name":"kilograms to grams"},"g-kg":{"value":0.001,"name":"grams to kilograms"},"lb-kg":{"value":0.453592,"name":"pounds to kilograms"},"kg-lb":{"value":2.20462,"name":"kilograms to pounds"},"oz-g":{"value":28.3495,"name":"ounces to grams"},"g-oz":{"value":0.035274,"name":"grams to ounces"},"km-m":{"value":1000,"name":"kilometers to meters"},"m-km":{"value":0.001,"name":"meters to kilometers"},"mi-km":{"value":1.60934,"name":"miles to kilometers"},"km-mi":{"value":0.621371,"name":"kilometers to miles"},"l-ml":{"value":1000,"name":"liters to milliliters"},"ml-l":{"value":0.001,"name":"milliliters to liters"},"gal-l":{"value":3.78541,"name":"gallons to liters"},"l-gal":{"value":0.264172,"name":"liters to gallons"},"ft-m":{"value":0.3048,"name":"feet to meters"},"m-ft":{"value":3.28084,"name":"meters to feet"},"in-cm":{"value":2.54,"name":"inches to centimeters"},"cm-in":{"value":0.393701,"name":"centimeters to inches"},"F-C":{"value":[-32,0.5556],"name":"Fahrenheit to Celsius"},"C-F":{"value":[32,1.8],"name":"Celsius to Fahrenheit"},"N-kgf":{"value":0.10197,"name":"Newtons to kilogram-force"},"kgf-N":{"value":9.80665,"name":"kilogram-force to Newtons"},"atm-Pa":{"value":101325,"name":"Atmosphere to pascal"},"Pa-atm":{"value":9.86923e-6,"name":"pascal to atmosphere"},"J-cal":{"value":4.184,"name":"joules to calories"},"cal-J":{"value":0.239006,"name":"calories to joules"},"J-kWh":{"value":2.77778e-7,"name":"joules to kilowatt-hours"},"kWh-J":{"value":3600000,"name":"kilowatt-hours to joules"},"mph-kmh":{"value":1.60934,"name":"miles per hour to kilometers per hour"},"kmh-mph":{"value":0.621371,"name":"kilometers per hour to miles per hour"},"kW-hp":{"value":1.34102,"name":"kilowatts to horsepower"},"hp-kW":{"value":0.7457,"name":"horsepower to kilowatts"},"N-lbf":{"value":0.224809,"name":"Newtons to pound-force"},"lbf-N":{"value":4.44822,"name":"pound-force to Newtons"},"W-hp":{"value":0.001341,"name":"watts to horsepower"},"hp-W":{"value":745.7,"name":"horsepower to watts"},"J-BTU":{"value":0.000947817,"name":"joules to British thermal units"},"BTU-J":{"value":1055.056,"name":"British thermal units to joules"},"J-Wh":{"value":0.000277778,"name":"joules to watt-hours"},"Wh-J":{"value":3600,"name":"watt-hours to joules"},"Pa-bar":{"value":1.0e-5,"name":"pascal to bar"},"bar-Pa":{"value":100000,"name":"bar to pascal"},"Pa-psi":{"value":0.000145038,"name":"pascal to pound per square inch"},"psi-Pa":{"value":6894.76,"name":"pound per square inch to pascal"},"kg-tonne":{"value":0.001,"name":"kilograms to metric tonne"},"tonne-kg":{"value":1000,"name":"metric tonne to kilograms"},"deg-rad":{"value":0.0174533,"name":"degrees to radians"},"rad-deg":{"value":57.2958,"name":"radians to degrees"},"m\/s-ft\/s":{"value":3.28084,"name":"meters per second to feet per second"},"ft\/s-m\/s":{"value":0.3048,"name":"feet per second to meters per second"},"m\/s-mph":{"value":2.23694,"name":"meters per second to miles per hour"},"mph-m\/s":{"value":0.44704,"name":"miles per hour to meters per second"},"m\/s-km\/h":{"value":3.6,"name":"meters per second to kilometers per hour"},"km\/h-m\/s":{"value":0.277778,"name":"kilometers per hour to meters per second"},"m-yd":{"value":1.09361,"name":"meters to yards"},"yd-m":{"value":0.9144,"name":"yards to meters"},"m-mi":{"value":0.000621371,"name":"meters to miles"},"mi-m":{"value":1609.34,"name":"miles to meters"},"m-nmi":{"value":0.000539957,"name":"meters to nautical miles"},"nmi-m":{"value":1852,"name":"nautical miles to meters"},"m-ang":{"value":1.0e-10,"name":"meters to angustroms"},"ang-m":{"value":10000000000,"name":"angstroms to meters"},"m-ly":{"value":1.057e-16,"name":"meters to light years"},"ly-m":{"value":9461000000000000,"name":"light years to meters"},"m-pc":{"value":3.086e-16,"name":"meters to parsecs"},"pc-m":{"value":32620000000000000,"name":"parsecs to meters"},"m-au":{"value":6.685e-12,"name":"meters to astronomical units"},"au-m":{"value":149600000000,"name":"astronomical units to meters"},"kPa-bar":{"value":0.01,"name":"kilopascals to bar"},"bar-kPa":{"value":100,"name":"bar to kilopascals"},"MPa-bar":{"value":10,"name":"Mega pascals to bars"},"bar-MPa":{"value":0.1,"name":"bars to Mega pascals"},"MJ-J":{"value":1000000,"name":"Mega joules to joules"},"J-MJ":{"value":1.0e-6,"name":"joules to Mega joules"},"kJ-J":{"value":1000,"name":"kilojoules to joules"},"J-kJ":{"value":0.001,"name":"joules to kilojoules"},"eV-J":{"value":1.60218e-19,"name":"electronvolts to joules"},"J-eV":{"value":6.241509e+18,"name":"joules to electronvolts"},"s-min":{"value":0.0166667,"name":"seconds to minutes"},"min-s":{"value":60,"name":"minutes to seconds"},"s-h":{"value":0.000277778,"name":"seconds to hours"},"h-s":{"value":3600,"name":"hours to seconds"},"s-d":{"value":1.15741e-5,"name":"seconds to days"},"d-s":{"value":86400,"name":"days to seconds"},"s-week":{"value":1.65344e-6,"name":"seconds to weeks"},"week-s":{"value":604800,"name":"weeks to seconds"},"year-d":{"value":365,"name":"years to days"},"d-year":{"value":0.00273973,"name":"days to years"},"year-s":{"value":31557600,"name":"years to seconds"},"l-oz":{"value":33.814,"name":"liters to ounces"},"oz-l":{"value":0.029574,"name":"ounces to liters"},"lb-oz":{"value":16,"name":"pounds to ounces"},"oz-lb":{"value":0.0625,"name":"ounces to pounds"},"ft-in":{"value":12,"name":"feet to inches"},"in-ft":{"value":0.083333,"name":"inches to feet"},"tsp-ml":{"value":4.92892,"name":"teaspoons to milliliters"},"ml-tsp":{"value":0.202884,"name":"milliliters to teaspoons"},"tbsp-ml":{"value":14.7868,"name":"tablespoons to milliliters"},"ml-tbsp":{"value":0.067628,"name":"milliliters to tablespoons"},"cup-ml":{"value":236.588,"name":"cups to milliliters"},"ml-cup":{"value":0.00422675,"name":"milliliters to cups"},"floz-ml":{"value":29.5735,"name":"fluid ounces to milliliters"},"ml-floz":{"value":0.033814,"name":"milliliters to fluid ounces"},"pint-ml":{"value":473.176,"name":"pints to milliliters"},"ml-pint":{"value":0.00211338,"name":"milliliters to pints"},"quart-ml":{"value":946.353,"name":"quarts to milliliters"},"ml-quart":{"value":0.00105701,"name":"milliliters to quarts"},"gal-ml":{"value":3785.41,"name":"gallons to milliliters"},"ml-gal":{"value":0.000264172,"name":"milliliters to gallons"}}
                                                                                                                                                                                                                    
                                                                                                    

Measurements - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/4754/unit+switch+api/5883/measurements' --header 'Authorization: Bearer YOUR_API_KEY' 


    

To use this endpoint you must indicate a value and 2 units of measurement in the parameters.



                                                                            
GET https://zylalabs.com/api/4754/unit+switch+api/5884/conversion+units
                                                                            
                                                                        

Conversion units - Endpoint Features

Object Description
value [Required]
input_unit [Required]
output_unit [Required]
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"input":{"value":"2000","unit":"g"},"output":{"value":2,"unit":"kg"}}
                                                                                                                                                                                                                    
                                                                                                    

Conversion units - CODE SNIPPETS


curl --location --request GET 'https://zylalabs.com/api/4754/unit+switch+api/5884/conversion+units?value=2000&input_unit=g&output_unit=kg' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Unit Switch API REST API, simply include your bearer token in the Authorization header.
Headers
Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

Simple Transparent Pricing

No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.

πŸš€ Enterprise

Starts at
$ 10,000/Year


  • Custom Volume
  • Specialized Customer Support
  • Real-Time API Monitoring

Customer favorite features

  • βœ”οΈŽ Only Pay for Successful Requests
  • βœ”οΈŽ Free 7-Day Trial
  • βœ”οΈŽ Multi-Language Support
  • βœ”οΈŽ One API Key, All APIs.
  • βœ”οΈŽ Intuitive Dashboard
  • βœ”οΈŽ Comprehensive Error Handling
  • βœ”οΈŽ Developer-Friendly Docs
  • βœ”οΈŽ Postman Integration
  • βœ”οΈŽ Secure HTTPS Connections
  • βœ”οΈŽ Reliable Uptime

Unit Switch API FAQs

To use this API users must indicate 2 units along with a value to receive a conviction.

The Unit Switch API is a tool designed to allow you to seamlessly convert measurements between different units, offering versatility in several categories.

Zyla provides a wide range of integration methods for almost all programming languages. You can use these codes to integrate with your project as you need.

There are different plans suits everyone including a free trial for small amount of requests, but it’s rate is limit to prevent abuse of the service.

You may need this API if your application requires precise and smooth conversions between different units of measurement, facilitating complex tasks with efficiency and accuracy.

The "GET Measurements" endpoint returns a comprehensive list of unit conversions across various measurement categories, while the "GET Conversion units" endpoint provides specific conversion results based on user-defined input values and units.

Key fields include "value" (the conversion factor or result), "name" (description of the conversion), and "input/output" (details of the original and converted units) in the respective responses.

The response data is structured in JSON format, with each conversion represented as key-value pairs. For example, in the "GET Measurements" response, each unit conversion is listed with its corresponding value and name.

The "GET Conversion units" endpoint requires parameters for "value" (the quantity to convert) and two "units" (the original and target units). Users can customize their requests by specifying different measurement types.

The "GET Measurements" endpoint provides a complete list of available unit conversions, while the "GET Conversion units" endpoint delivers specific conversion results based on user input, covering various measurement categories like length, weight, and volume.

Users can utilize the returned data by extracting the "output" field to obtain the converted value and unit, allowing for seamless integration into applications that require real-time unit conversions.

Typical use cases include e-commerce platforms needing accurate product dimensions, travel apps converting distances for international users, and health apps tracking user metrics in preferred units.

Data accuracy is maintained through rigorous validation processes and consistent updates to ensure that conversion factors reflect current standards across various measurement systems.

General FAQs

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world’s most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.

The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.

Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]

Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.

API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.

Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.

To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.

To check how many API calls you have left for the current month, refer to the β€˜X-Zyla-API-Calls-Monthly-Remaining’ field in the response header. For example, if your plan allows 1,000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.

To see the maximum number of API requests your plan allows, check the β€˜X-Zyla-RateLimit-Limit’ response header. For instance, if your plan includes 1,000 requests per month, this header will display 1,000.

The β€˜X-Zyla-RateLimit-Reset’ header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3,600, it means 3,600 seconds are left until the limit resets.

Yes, you can cancel your plan anytime by going to your account and selecting the cancellation option on the Billing page. Please note that upgrades, downgrades, and cancellations take effect immediately. Additionally, upon cancellation, you will no longer have access to the service, even if you have remaining calls left in your quota.

You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

To give you the opportunity to experience our APIs without any commitment, we offer a 7-day free trial that allows you to make up to 50 API calls at no cost. This trial can be used only once, so we recommend applying it to the API that interests you the most. While most of our APIs offer a free trial, some may not. The trial concludes after 7 days or once you've made 50 requests, whichever occurs first. If you reach the 50 request limit during the trial, you will need to "Start Your Paid Plan" to continue making requests. You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab. Alternatively, if you don't cancel your subscription before the 7th day, your free trial will end, and your plan will automatically be billed, granting you access to all the API calls specified in your plan. Please keep this in mind to avoid unwanted charges.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it’s important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.

When you subscribe to an API free trial, you can make up to 50 API calls. If you wish to make additional API calls beyond this limit, the API will prompt you to perform an "Start Your Paid Plan." You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab.

Payout Orders are processed between the 20th and the 30th of each month. If you submit your request before the 20th, your payment will be processed within this timeframe.


Related APIs


You might also like