OS API Examples
Here you'll find examples of our APIs in use. You can copy and paste the code to start building your own innovative projects.
These examples are related to the Mapping and Data APIs available from our Data Hub.
Start coding!
Disclaimer
The information and code available on the OS Data Hub Examples and Tutorials webpages are provided on an 'as is' basis for general information purposes only. It is intended to show you illustrative examples of how OS APIs may be applied. It does not amount to any advice or instructions for your circumstances on which you should rely (and this also applies to anyone informed of such content). If you decide to act on any information or code available on the OS Data Hub Examples and Tutorials webpages you do so at your own risk.
The OS Data Hub Examples and Tutorials webpages may link, direct or aid your access to third party websites and content, including software code ('Third Party Content'). Whilst we endeavour to direct you to external resources we believe to be helpful, OS does not endorse or approve any software code, products or services provided by or available in the Third Party Content.
OS makes no representations, warranties or guarantees (express or implied) of any kind that the OS Data Hub Examples and Tutorials webpages, including Third Party Content will be accurate, error free, virus free, complete, up to date, meet your requirements, be fit for any particular purpose or that the results from its use will be effective. OS cannot guarantee the performance, availability or quality of any Third Party Content.
OS accepts no responsibility for the Third Party Content that it does not control, or for any liability, loss or damage that may arise as a consequence of any use of Third Party Content. OS may make changes to the links or code that directs to external websites at any time without notice, but makes no commitment to updating the links or code. Please note that if you use Third Party Content you will be subject to separate terms and licensing requirements that may apply regarding any use of that content.
OS excludes liability to the extent permitted by law including any implied terms for your use or any third party use of the OS Data Hub Examples and Tutorials webpages, including the Third Party Content. In no event will OS be liable to you or any third parties for any special, punitive, incidental indirect or consequential damages of any kind foreseeable or not, including without limitation loss of profits, reputation or goodwill, anticipated savings, business, or losses suffered by third parties, whether caused by tort (including negligence), breach of contract or otherwise concerning your use of the OS Data Hub Tutorials, Examples and/or any Third Party Content. OS may still be liable for death or personal injury arising from negligence, fraudulent misrepresentation or any other liability which cannot be excluded or limited under applicable law.