PageSourceSearch

https://postcodes.io/assets/js/d83d2af8.8bc786e6.js

js postcodes.io collected 2026-10-02 02:41:30 UTC 3,990 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkpostcodes_io=globalThis.webpackChunkpostcodes_io||[]).push([[7795],{76889(e,n,o){o.r(n),o.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>u,frontMatter:()=>r,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"outcode/lookup","title":"Lookup an Outward Code","description":"This endpoint allows you to retrieve detailed information about a UK outward code (the first half of a postcode).","source":"@site/docs/outcode/lookup.mdx","sourceDirName":"outcode","slug":"/outcode/lookup","permalink":"/docs/outcode/lookup","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"sidebar_label":"Lookup","title":"Lookup an Outward Code"},"sidebar":"docsSidebar","previous":{"title":"Outward Code Schema","permalink":"/docs/outcode/schema"},"next":{"title":"Reverse Geocode","permalink":"/docs/outcode/reverse-geocode"}}');var a=o(31325),s=o(31736);const r={sidebar_label:"Lookup",title:"Lookup an Outward Code"},d=void 0,i={},l=[{value:"Endpoint",id:"endpoint",level:2},{value:"Example Request",id:"example-request",level:2},{value:"Example Response",id:"example-response",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"This endpoint allows you to retrieve detailed information about a UK outward code (the first half of a postcode)."}),"\n",(0,a.jsx)(n.p,{children:"A successful request returns HTTP status code 200 and a JSON object containing comprehensive outward code data."}),"\n",(0,a.jsx)(n.p,{children:"If the outward code is not found, the API returns a 404 response."}),"\n",(0,a.jsxs)(n.p,{children:["For more details, see the ",(0,a.jsx)(n.a,{href:"/docs/api/find-outcode",children:"API Documentation"})]}),"\n",(0,a.jsx)(n.h2,{id:"endpoint",children:"Endpoint"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-http",children:"GET https://api.postcodes.io/outcodes/:outcode\n"})}),"\n",(0,a.jsx)(n.h2,{id:"example-request",children:"Example Request"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-http",children:"GET https://api.postcodes.io/outcodes/BR8\n"})}),"\n",(0,a.jsx)(n.p,{children:'The above would match any of these inputs: "BR8", "br8", "Br8", etc.'}),"\n",(0,a.jsx)(n.h2,{id:"example-response",children:"Example Response"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n  "status": 200,\n  "result": {\n    "outcode": "BR8",\n    "longitude": 0.17454313701431498,\n    "latitude": 51.398688284253566,\n    "northings": 168872,\n    "eastings": 551367,\n    "admin_district": [\n      "Bromley",\n      "Dartford",\n      "Sevenoaks"\n    ],\n    "parish": [\n      "Bromley, unparished area",\n      "Crockenhill",\n      "Farningham",\n      "Hextable",\n      "Sutton-at-Hone and Hawley",\n      "Swanley"\n    ],\n    "admin_county": [\n      "Kent",\n      "(pseudo) England (UA/MD/LB)"\n    ],\n    "admin_ward": [\n      "Crockenhill and Well Hill",\n      "Farningham, Horton Kirby and South Darenth",\n      "Hextable",\n      "St Mary Cray",\n      "St Paul\'s Cray",\n      "Swanley Christchurch and Swanley Village",\n      "Swanley St Mary\'s",\n      "Swanley White Oak",\n      "Wilmington, Sutton-at-Hone & Hawley"\n    ],\n    "country": [\n      "England"\n    ],\n    "parliamentary_constituency": [\n      "Orpington",\n      "Sevenoaks"\n    ]\n  }\n}\n'})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},31736(e,n,o){o.d(n,{R:()=>r,x:()=>d});var t=o(20489);const a={},s=t.createContext(a);function r(e){const n=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.