[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-\u002Fblog\u002Flegal-land-description-autocomplete-api-web-app":3},{"id":4,"title":5,"author":6,"body":7,"category":1284,"cover":1285,"date":1286,"description":1287,"extension":1288,"meta":1289,"navigation":747,"path":1290,"seo":1291,"stem":1292,"tags":1293,"__hash__":1298},"blog\u002Fblog\u002Flegal-land-description-autocomplete-api-web-app.md","Adding Legal Land Description Autocomplete to a Web App","Township Canada",{"type":8,"value":9,"toc":1276},"minimark",[10,23,32,37,40,43,47,57,125,128,387,408,412,415,714,1125,1134,1138,1159,1175,1179,1190,1194,1197,1259,1265,1272],[11,12,13,14,18,19,22],"p",{},"A field tool, a farmland evaluation app, or an internal GIS portal eventually needs a box where people type a legal land description. Without help, the user types the whole string, ",[15,16,17],"code",{},"NW-25-24-1-W5",", submits it, and finds out afterwards that the range was wrong or the meridian was missing. A type-ahead field fixes that at the point of entry: the user types ",[15,20,21],{},"NW-25-24",", sees real descriptions that exist on the survey grid, and picks one.",[11,24,25,26,31],{},"The Township Canada Autocomplete API is built for that field. This post covers when to use it, what the endpoint takes and returns, how to filter and hand results to a map, and how to size a plan for it. The ",[27,28,30],"a",{"href":29},"\u002Fguides\u002Fautocomplete-api-guide","autocomplete guide"," has the complete vanilla JS and React components; here the focus is on the design decisions around them.",[33,34,36],"h2",{"id":35},"autocomplete-or-a-direct-lookup","Autocomplete or a direct lookup",[11,38,39],{},"The two endpoints answer different questions. The Search API takes a complete description and returns its boundary and centre point. The Autocomplete API takes a partial description and returns up to ten real descriptions that match it, each with a centre point.",[11,41,42],{},"If your users paste descriptions from documents, a single search call on submit is enough. If they type descriptions by hand, especially on a phone in the field, autocomplete catches mistakes before they become a wrong location. Many apps use both: autocomplete while typing, then a search call for the description the user picks.",[33,44,46],{"id":45},"the-endpoint","The endpoint",[48,49,54],"pre",{"className":50,"code":52,"language":53},[51],"language-text","GET https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fautocomplete\u002Flegal-location\nX-API-Key: YOUR_API_KEY\n","text",[15,55,52],{"__ignoreMap":56},"",[58,59,60,76],"table",{},[61,62,63],"thead",{},[64,65,66,70,73],"tr",{},[67,68,69],"th",{},"Parameter",[67,71,72],{},"Required",[67,74,75],{},"Description",[77,78,79,96,109],"tbody",{},[64,80,81,87,90],{},[82,83,84],"td",{},[15,85,86],{},"location",[82,88,89],{},"Yes",[82,91,92,93],{},"The partial description typed so far, e.g. ",[15,94,95],{},"NW-2",[64,97,98,103,106],{},[82,99,100],{},[15,101,102],{},"limit",[82,104,105],{},"No",[82,107,108],{},"Number of suggestions, 1 to 10 (default 3)",[64,110,111,116,118],{},[82,112,113],{},[15,114,115],{},"proximity",[82,117,105],{},[82,119,120,121,124],{},"A point as ",[15,122,123],{},"lng,lat","; nearer suggestions rank first",[11,126,127],{},"The response is a GeoJSON FeatureCollection. Each feature is a centre point, and its properties carry what you need to render a suggestion:",[48,129,133],{"className":130,"code":131,"language":132,"meta":56,"style":56},"language-json shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","{\n  \"type\": \"Feature\",\n  \"geometry\": { \"type\": \"Point\", \"coordinates\": [-114.01924, 51.077932] },\n  \"properties\": {\n    \"shape\": \"centroid\",\n    \"search_term\": \"NW-25-24-1\",\n    \"legal_location\": \"NW-25-24-1-W5\",\n    \"unit\": \"Quarter Section\",\n    \"survey_system\": \"DLS\",\n    \"province\": \"Alberta\"\n  }\n}\n","json",[15,134,135,144,174,235,250,272,293,313,334,355,375,381],{"__ignoreMap":56},[136,137,140],"span",{"class":138,"line":139},"line",1,[136,141,143],{"class":142},"soVBu","{\n",[136,145,147,151,155,158,161,165,169,171],{"class":138,"line":146},2,[136,148,150],{"class":149},"s4Jsk","  \"",[136,152,154],{"class":153},"sLorS","type",[136,156,157],{"class":149},"\"",[136,159,160],{"class":142},":",[136,162,164],{"class":163},"sbYkP"," \"",[136,166,168],{"class":167},"sTbE_","Feature",[136,170,157],{"class":163},[136,172,173],{"class":142},",\n",[136,175,177,179,182,184,186,189,191,194,196,198,200,203,205,208,210,213,215,217,220,224,226,229,232],{"class":138,"line":176},3,[136,178,150],{"class":149},[136,180,181],{"class":153},"geometry",[136,183,157],{"class":149},[136,185,160],{"class":142},[136,187,188],{"class":142}," {",[136,190,164],{"class":149},[136,192,154],{"class":193},"sa2tF",[136,195,157],{"class":149},[136,197,160],{"class":142},[136,199,164],{"class":163},[136,201,202],{"class":167},"Point",[136,204,157],{"class":163},[136,206,207],{"class":142},",",[136,209,164],{"class":149},[136,211,212],{"class":193},"coordinates",[136,214,157],{"class":149},[136,216,160],{"class":142},[136,218,219],{"class":142}," [",[136,221,223],{"class":222},"s7CZa","-114.01924",[136,225,207],{"class":142},[136,227,228],{"class":222}," 51.077932",[136,230,231],{"class":142},"]",[136,233,234],{"class":142}," },\n",[136,236,238,240,243,245,247],{"class":138,"line":237},4,[136,239,150],{"class":149},[136,241,242],{"class":153},"properties",[136,244,157],{"class":149},[136,246,160],{"class":142},[136,248,249],{"class":142}," {\n",[136,251,253,256,259,261,263,265,268,270],{"class":138,"line":252},5,[136,254,255],{"class":149},"    \"",[136,257,258],{"class":193},"shape",[136,260,157],{"class":149},[136,262,160],{"class":142},[136,264,164],{"class":163},[136,266,267],{"class":167},"centroid",[136,269,157],{"class":163},[136,271,173],{"class":142},[136,273,275,277,280,282,284,286,289,291],{"class":138,"line":274},6,[136,276,255],{"class":149},[136,278,279],{"class":193},"search_term",[136,281,157],{"class":149},[136,283,160],{"class":142},[136,285,164],{"class":163},[136,287,288],{"class":167},"NW-25-24-1",[136,290,157],{"class":163},[136,292,173],{"class":142},[136,294,296,298,301,303,305,307,309,311],{"class":138,"line":295},7,[136,297,255],{"class":149},[136,299,300],{"class":193},"legal_location",[136,302,157],{"class":149},[136,304,160],{"class":142},[136,306,164],{"class":163},[136,308,17],{"class":167},[136,310,157],{"class":163},[136,312,173],{"class":142},[136,314,316,318,321,323,325,327,330,332],{"class":138,"line":315},8,[136,317,255],{"class":149},[136,319,320],{"class":193},"unit",[136,322,157],{"class":149},[136,324,160],{"class":142},[136,326,164],{"class":163},[136,328,329],{"class":167},"Quarter Section",[136,331,157],{"class":163},[136,333,173],{"class":142},[136,335,337,339,342,344,346,348,351,353],{"class":138,"line":336},9,[136,338,255],{"class":149},[136,340,341],{"class":193},"survey_system",[136,343,157],{"class":149},[136,345,160],{"class":142},[136,347,164],{"class":163},[136,349,350],{"class":167},"DLS",[136,352,157],{"class":163},[136,354,173],{"class":142},[136,356,358,360,363,365,367,369,372],{"class":138,"line":357},10,[136,359,255],{"class":149},[136,361,362],{"class":193},"province",[136,364,157],{"class":149},[136,366,160],{"class":142},[136,368,164],{"class":163},[136,370,371],{"class":167},"Alberta",[136,373,374],{"class":163},"\"\n",[136,376,378],{"class":138,"line":377},11,[136,379,380],{"class":142},"  }\n",[136,382,384],{"class":138,"line":383},12,[136,385,386],{"class":142},"}\n",[11,388,389,390,393,394,397,398,400,401,403,404,407],{},"An empty ",[15,391,392],{},"features"," array is a normal answer: nothing matches yet. A ",[15,395,396],{},"400"," means a bad ",[15,399,102],{}," or ",[15,402,115],{}," value, and a ",[15,405,406],{},"429"," means the key hit its rate limit or monthly quota.",[33,409,411],{"id":410},"a-minimal-integration","A minimal integration",[11,413,414],{},"Two habits keep the field fast and the request count sensible. Wait for a short pause in typing before calling the API, and cancel any request that a newer keystroke has made stale. Keep the key on your server, too: a key in browser code can be copied by anyone who opens the developer tools. A small route on your backend that forwards the query is enough.",[48,416,420],{"className":417,"code":418,"language":419,"meta":56,"style":56},"language-js shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","\u002F\u002F Server: forward the query and keep the key out of the browser\nexport async function suggest(location, proximity) {\n  const params = new URLSearchParams({ location, limit: \"5\" });\n  if (proximity) params.set(\"proximity\", proximity);\n  const res = await fetch(\n    `https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fautocomplete\u002Flegal-location?${params}`,\n    {\n      headers: { \"X-API-Key\": process.env.TOWNSHIP_CANADA_API_KEY }\n    }\n  );\n  if (!res.ok) throw new Error(`Autocomplete failed: ${res.status}`);\n  return res.json();\n}\n","js",[15,421,422,428,461,512,548,566,590,595,630,635,642,693,709],{"__ignoreMap":56},[136,423,424],{"class":138,"line":139},[136,425,427],{"class":426},"s9Tkl","\u002F\u002F Server: forward the query and keep the key out of the browser\n",[136,429,430,434,438,441,445,448,451,453,456,459],{"class":138,"line":146},[136,431,433],{"class":432},"siDh9","export",[136,435,437],{"class":436},"s5Kfy"," async",[136,439,440],{"class":436}," function",[136,442,444],{"class":443},"sljsM"," suggest",[136,446,447],{"class":142},"(",[136,449,86],{"class":450},"sqOPj",[136,452,207],{"class":142},[136,454,455],{"class":450}," proximity",[136,457,458],{"class":142},")",[136,460,249],{"class":142},[136,462,463,466,470,473,477,480,483,486,489,491,495,497,499,502,504,507,509],{"class":138,"line":176},[136,464,465],{"class":436},"  const",[136,467,469],{"class":468},"sSC40"," params",[136,471,472],{"class":142}," =",[136,474,476],{"class":475},"sVsLi"," new",[136,478,479],{"class":443}," URLSearchParams",[136,481,447],{"class":482},"sLdnO",[136,484,485],{"class":142},"{",[136,487,488],{"class":468}," location",[136,490,207],{"class":142},[136,492,494],{"class":493},"suXOh"," limit",[136,496,160],{"class":142},[136,498,164],{"class":163},[136,500,501],{"class":167},"5",[136,503,157],{"class":163},[136,505,506],{"class":142}," }",[136,508,458],{"class":482},[136,510,511],{"class":142},";\n",[136,513,514,517,520,522,524,526,529,532,534,536,538,540,542,544,546],{"class":138,"line":237},[136,515,516],{"class":432},"  if",[136,518,519],{"class":482}," (",[136,521,115],{"class":468},[136,523,458],{"class":482},[136,525,469],{"class":468},[136,527,528],{"class":142},".",[136,530,531],{"class":443},"set",[136,533,447],{"class":482},[136,535,157],{"class":163},[136,537,115],{"class":167},[136,539,157],{"class":163},[136,541,207],{"class":142},[136,543,455],{"class":468},[136,545,458],{"class":482},[136,547,511],{"class":142},[136,549,550,552,555,557,560,563],{"class":138,"line":252},[136,551,465],{"class":436},[136,553,554],{"class":468}," res",[136,556,472],{"class":142},[136,558,559],{"class":432}," await",[136,561,562],{"class":443}," fetch",[136,564,565],{"class":482},"(\n",[136,567,568,571,574,578,582,585,588],{"class":138,"line":274},[136,569,570],{"class":163},"    `",[136,572,573],{"class":167},"https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fautocomplete\u002Flegal-location?",[136,575,577],{"class":576},"s8XtY","${",[136,579,581],{"class":580},"su_V2","params",[136,583,584],{"class":576},"}",[136,586,587],{"class":163},"`",[136,589,173],{"class":142},[136,591,592],{"class":138,"line":295},[136,593,594],{"class":142},"    {\n",[136,596,597,600,602,604,606,610,612,614,617,619,622,624,627],{"class":138,"line":315},[136,598,599],{"class":493},"      headers",[136,601,160],{"class":142},[136,603,188],{"class":142},[136,605,164],{"class":163},[136,607,609],{"class":608},"sQtxO","X-API-Key",[136,611,157],{"class":163},[136,613,160],{"class":142},[136,615,616],{"class":468}," process",[136,618,528],{"class":142},[136,620,621],{"class":468},"env",[136,623,528],{"class":142},[136,625,626],{"class":468},"TOWNSHIP_CANADA_API_KEY",[136,628,629],{"class":142}," }\n",[136,631,632],{"class":138,"line":336},[136,633,634],{"class":142},"    }\n",[136,636,637,640],{"class":138,"line":357},[136,638,639],{"class":482},"  )",[136,641,511],{"class":142},[136,643,644,646,648,651,654,656,659,661,664,666,669,671,673,676,678,680,682,685,687,689,691],{"class":138,"line":377},[136,645,516],{"class":432},[136,647,519],{"class":482},[136,649,650],{"class":475},"!",[136,652,653],{"class":468},"res",[136,655,528],{"class":142},[136,657,658],{"class":468},"ok",[136,660,458],{"class":482},[136,662,663],{"class":432}," throw",[136,665,476],{"class":475},[136,667,668],{"class":443}," Error",[136,670,447],{"class":482},[136,672,587],{"class":163},[136,674,675],{"class":167},"Autocomplete failed: ",[136,677,577],{"class":576},[136,679,653],{"class":580},[136,681,528],{"class":142},[136,683,684],{"class":580},"status",[136,686,584],{"class":576},[136,688,587],{"class":163},[136,690,458],{"class":482},[136,692,511],{"class":142},[136,694,695,698,700,702,704,707],{"class":138,"line":383},[136,696,697],{"class":432},"  return",[136,699,554],{"class":468},[136,701,528],{"class":142},[136,703,132],{"class":443},[136,705,706],{"class":482},"()",[136,708,511],{"class":142},[136,710,712],{"class":138,"line":711},13,[136,713,386],{"class":142},[48,715,717],{"className":417,"code":716,"language":419,"meta":56,"style":56},"\u002F\u002F Browser: debounce, cancel stale requests, render labels\nlet timer;\nlet controller;\n\ninput.addEventListener(\"input\", () => {\n  clearTimeout(timer);\n  const query = input.value.trim();\n  if (query.length \u003C 2) return;\n  timer = setTimeout(async () => {\n    controller?.abort();\n    controller = new AbortController();\n    try {\n      const res = await fetch(`\u002Fapi\u002Flld-suggest?location=${encodeURIComponent(query)}`, {\n        signal: controller.signal\n      });\n      const { features } = await res.json();\n      render(features.map((f) => f.properties.legal_location));\n    } catch (err) {\n      if (err.name !== \"AbortError\") console.error(err);\n    }\n  }, 300);\n});\n",[15,718,719,724,734,743,749,779,793,819,847,868,883,898,905,944,959,969,995,1037,1055,1098,1103,1116],{"__ignoreMap":56},[136,720,721],{"class":138,"line":139},[136,722,723],{"class":426},"\u002F\u002F Browser: debounce, cancel stale requests, render labels\n",[136,725,726,729,732],{"class":138,"line":146},[136,727,728],{"class":436},"let",[136,730,731],{"class":468}," timer",[136,733,511],{"class":142},[136,735,736,738,741],{"class":138,"line":176},[136,737,728],{"class":436},[136,739,740],{"class":468}," controller",[136,742,511],{"class":142},[136,744,745],{"class":138,"line":237},[136,746,748],{"emptyLinePlaceholder":747},true,"\n",[136,750,751,754,756,759,762,764,766,768,770,773,777],{"class":138,"line":252},[136,752,753],{"class":468},"input",[136,755,528],{"class":142},[136,757,758],{"class":443},"addEventListener",[136,760,447],{"class":761},"snCua",[136,763,157],{"class":163},[136,765,753],{"class":167},[136,767,157],{"class":163},[136,769,207],{"class":142},[136,771,772],{"class":142}," ()",[136,774,776],{"class":775},"sIOqK"," =>",[136,778,249],{"class":142},[136,780,781,784,786,789,791],{"class":138,"line":274},[136,782,783],{"class":443},"  clearTimeout",[136,785,447],{"class":482},[136,787,788],{"class":468},"timer",[136,790,458],{"class":482},[136,792,511],{"class":142},[136,794,795,797,800,802,805,807,810,812,815,817],{"class":138,"line":295},[136,796,465],{"class":436},[136,798,799],{"class":468}," query",[136,801,472],{"class":142},[136,803,804],{"class":468}," input",[136,806,528],{"class":142},[136,808,809],{"class":468},"value",[136,811,528],{"class":142},[136,813,814],{"class":443},"trim",[136,816,706],{"class":482},[136,818,511],{"class":142},[136,820,821,823,825,828,830,834,837,840,842,845],{"class":138,"line":315},[136,822,516],{"class":432},[136,824,519],{"class":482},[136,826,827],{"class":468},"query",[136,829,528],{"class":142},[136,831,833],{"class":832},"s131V","length",[136,835,836],{"class":142}," \u003C",[136,838,839],{"class":222}," 2",[136,841,458],{"class":482},[136,843,844],{"class":432}," return",[136,846,511],{"class":142},[136,848,849,852,854,857,859,862,864,866],{"class":138,"line":336},[136,850,851],{"class":468},"  timer",[136,853,472],{"class":142},[136,855,856],{"class":443}," setTimeout",[136,858,447],{"class":482},[136,860,861],{"class":436},"async",[136,863,772],{"class":142},[136,865,776],{"class":775},[136,867,249],{"class":142},[136,869,870,873,876,879,881],{"class":138,"line":357},[136,871,872],{"class":468},"    controller",[136,874,875],{"class":142},"?.",[136,877,878],{"class":443},"abort",[136,880,706],{"class":482},[136,882,511],{"class":142},[136,884,885,887,889,891,894,896],{"class":138,"line":377},[136,886,872],{"class":468},[136,888,472],{"class":142},[136,890,476],{"class":475},[136,892,893],{"class":443}," AbortController",[136,895,706],{"class":482},[136,897,511],{"class":142},[136,899,900,903],{"class":138,"line":383},[136,901,902],{"class":432},"    try",[136,904,249],{"class":142},[136,906,907,910,912,914,916,918,920,922,925,927,930,932,934,936,938,940,942],{"class":138,"line":711},[136,908,909],{"class":436},"      const",[136,911,554],{"class":468},[136,913,472],{"class":142},[136,915,559],{"class":432},[136,917,562],{"class":443},[136,919,447],{"class":482},[136,921,587],{"class":163},[136,923,924],{"class":167},"\u002Fapi\u002Flld-suggest?location=",[136,926,577],{"class":576},[136,928,929],{"class":443},"encodeURIComponent",[136,931,447],{"class":761},[136,933,827],{"class":580},[136,935,458],{"class":761},[136,937,584],{"class":576},[136,939,587],{"class":163},[136,941,207],{"class":142},[136,943,249],{"class":142},[136,945,947,950,952,954,956],{"class":138,"line":946},14,[136,948,949],{"class":493},"        signal",[136,951,160],{"class":142},[136,953,740],{"class":468},[136,955,528],{"class":142},[136,957,958],{"class":468},"signal\n",[136,960,962,965,967],{"class":138,"line":961},15,[136,963,964],{"class":142},"      }",[136,966,458],{"class":482},[136,968,511],{"class":142},[136,970,972,974,976,979,981,983,985,987,989,991,993],{"class":138,"line":971},16,[136,973,909],{"class":436},[136,975,188],{"class":142},[136,977,978],{"class":468}," features",[136,980,506],{"class":142},[136,982,472],{"class":142},[136,984,559],{"class":432},[136,986,554],{"class":468},[136,988,528],{"class":142},[136,990,132],{"class":443},[136,992,706],{"class":482},[136,994,511],{"class":142},[136,996,998,1001,1003,1005,1007,1010,1012,1014,1017,1019,1021,1024,1026,1028,1030,1032,1035],{"class":138,"line":997},17,[136,999,1000],{"class":443},"      render",[136,1002,447],{"class":482},[136,1004,392],{"class":468},[136,1006,528],{"class":142},[136,1008,1009],{"class":443},"map",[136,1011,447],{"class":482},[136,1013,447],{"class":142},[136,1015,1016],{"class":450},"f",[136,1018,458],{"class":142},[136,1020,776],{"class":775},[136,1022,1023],{"class":468}," f",[136,1025,528],{"class":142},[136,1027,242],{"class":468},[136,1029,528],{"class":142},[136,1031,300],{"class":468},[136,1033,1034],{"class":482},"))",[136,1036,511],{"class":142},[136,1038,1040,1043,1046,1048,1051,1053],{"class":138,"line":1039},18,[136,1041,1042],{"class":142},"    }",[136,1044,1045],{"class":432}," catch",[136,1047,519],{"class":482},[136,1049,1050],{"class":468},"err",[136,1052,458],{"class":482},[136,1054,249],{"class":142},[136,1056,1058,1061,1063,1065,1067,1070,1073,1075,1078,1080,1082,1085,1087,1090,1092,1094,1096],{"class":138,"line":1057},19,[136,1059,1060],{"class":432},"      if",[136,1062,519],{"class":482},[136,1064,1050],{"class":468},[136,1066,528],{"class":142},[136,1068,1069],{"class":468},"name",[136,1071,1072],{"class":475}," !==",[136,1074,164],{"class":163},[136,1076,1077],{"class":167},"AbortError",[136,1079,157],{"class":163},[136,1081,458],{"class":482},[136,1083,1084],{"class":468}," console",[136,1086,528],{"class":142},[136,1088,1089],{"class":443},"error",[136,1091,447],{"class":482},[136,1093,1050],{"class":468},[136,1095,458],{"class":482},[136,1097,511],{"class":142},[136,1099,1101],{"class":138,"line":1100},20,[136,1102,634],{"class":142},[136,1104,1106,1109,1112,1114],{"class":138,"line":1105},21,[136,1107,1108],{"class":142},"  },",[136,1110,1111],{"class":222}," 300",[136,1113,458],{"class":482},[136,1115,511],{"class":142},[136,1117,1119,1121,1123],{"class":138,"line":1118},22,[136,1120,584],{"class":142},[136,1122,458],{"class":761},[136,1124,511],{"class":142},[11,1126,1127,1128,1130,1131,1133],{},"If your app shows a map, pass its centre as ",[15,1129,115],{},". A short query like ",[15,1132,95],{}," matches descriptions all over the prairies, and proximity puts the ones near the user's view first.",[33,1135,1137],{"id":1136},"filtering-by-survey-system","Filtering by survey system",[11,1139,1140,1141,1144,1145,1147,1148,1147,1151,1154,1155,1158],{},"The endpoint searches every system it knows at once: DLS (including LSDs), BC's NTS grid, Manitoba river lots, and Ontario geographic townships. There is no parameter to restrict it. Instead, every suggestion is tagged in ",[15,1142,1143],{},"properties.survey_system"," with one of ",[15,1146,350],{},", ",[15,1149,1150],{},"NTS",[15,1152,1153],{},"River Lot",", or ",[15,1156,1157],{},"Geographic Township",", so you can filter in your own code.",[11,1160,1161,1162,1164,1165,1168,1169,1171,1172,1174],{},"Because ",[15,1163,102],{}," applies before your filter, ask for more than you plan to show. An Alberta-only well tool might request ",[15,1166,1167],{},"limit=10",", keep the ",[15,1170,350],{}," suggestions, and display the first five. The ",[15,1173,362],{}," property allows the same trick when your app covers one province.",[33,1176,1178],{"id":1177},"handing-a-suggestion-to-the-map","Handing a suggestion to the map",[11,1180,1181,1182,1184,1185,1189],{},"Each suggestion already has a centre point, which is enough to fly the map to it. When you also want the outline, call the Search API with the chosen ",[15,1183,300],{},". It returns the boundary polygon and the centre point together, so you can draw the quarter section or LSD and fit the map to it. The ",[27,1186,1188],{"href":1187},"\u002Fapi\u002Fdocs\u002Fsearch","API documentation"," lists both endpoints side by side.",[33,1191,1193],{"id":1192},"rate-limits-and-plan-fit","Rate limits and plan fit",[11,1195,1196],{},"Autocomplete and Search are separate API products, each with its own subscription on the same three tiers:",[58,1198,1199,1215],{},[61,1200,1201],{},[64,1202,1203,1206,1209,1212],{},[67,1204,1205],{},"Tier",[67,1207,1208],{},"Price",[67,1210,1211],{},"Requests per month",[67,1213,1214],{},"Rate limit",[77,1216,1217,1231,1245],{},[64,1218,1219,1222,1225,1228],{},[82,1220,1221],{},"Build",[82,1223,1224],{},"$20\u002Fmonth",[82,1226,1227],{},"1,000",[82,1229,1230],{},"1\u002Fsec",[64,1232,1233,1236,1239,1242],{},[82,1234,1235],{},"Scale",[82,1237,1238],{},"$100\u002Fmonth",[82,1240,1241],{},"10,000",[82,1243,1244],{},"5\u002Fsec",[64,1246,1247,1250,1253,1256],{},[82,1248,1249],{},"Enterprise",[82,1251,1252],{},"$500\u002Fmonth",[82,1254,1255],{},"100,000",[82,1257,1258],{},"25\u002Fsec",[11,1260,1261,1262,1264],{},"Annual billing is ten times the monthly price. Every debounced call counts as one request, so the number to estimate is pauses per lookup, not lookups. A user who pauses three times while typing a description spends three autocomplete requests and then one search request. Measure that ratio on your own users before picking a tier. When a key reaches its monthly quota, requests return ",[15,1263,406],{}," until the next month or a tier change.",[11,1266,1267,1268,528],{},"Autocomplete fits interactive traffic: one person, one field, a few requests per lookup. When the input is a list, such as a spreadsheet of wells or a lease schedule, use the batch endpoint instead, which converts up to 100 descriptions per request. Prices for all three products are on the ",[27,1269,1271],{"href":1270},"\u002Fapi","API page",[1273,1274,1275],"style",{},"html pre.shiki code .soVBu, html code.shiki .soVBu{--shiki-light:#39ADB5;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .s4Jsk, html code.shiki .s4Jsk{--shiki-light:#39ADB5;--shiki-default:#99841877;--shiki-dark:#B8A96577}html pre.shiki code .sLorS, html code.shiki .sLorS{--shiki-light:#9C3EDA;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sbYkP, html code.shiki .sbYkP{--shiki-light:#39ADB5;--shiki-default:#B5695977;--shiki-dark:#C98A7D77}html pre.shiki code .sTbE_, html code.shiki .sTbE_{--shiki-light:#91B859;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .sa2tF, html code.shiki .sa2tF{--shiki-light:#E2931D;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .s7CZa, html code.shiki .s7CZa{--shiki-light:#F76D47;--shiki-default:#2F798A;--shiki-dark:#4C9A91}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9Tkl, html code.shiki .s9Tkl{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#A0ADA0;--shiki-default-font-style:inherit;--shiki-dark:#758575DD;--shiki-dark-font-style:inherit}html pre.shiki code .siDh9, html code.shiki .siDh9{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#1E754F;--shiki-default-font-style:inherit;--shiki-dark:#4D9375;--shiki-dark-font-style:inherit}html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .sqOPj, html code.shiki .sqOPj{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#B07D48;--shiki-default-font-style:inherit;--shiki-dark:#BD976A;--shiki-dark-font-style:inherit}html pre.shiki code .sSC40, html code.shiki .sSC40{--shiki-light:#90A4AE;--shiki-default:#B07D48;--shiki-dark:#BD976A}html pre.shiki code .sVsLi, html code.shiki .sVsLi{--shiki-light:#39ADB5;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sLdnO, html code.shiki .sLdnO{--shiki-light:#E53935;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .suXOh, html code.shiki .suXOh{--shiki-light:#E53935;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .s8XtY, html code.shiki .s8XtY{--shiki-light:#39ADB5;--shiki-default:#1E754F;--shiki-dark:#4D9375}html pre.shiki code .su_V2, html code.shiki .su_V2{--shiki-light:#90A4AE;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .sQtxO, html code.shiki .sQtxO{--shiki-light:#E53935;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .snCua, html code.shiki .snCua{--shiki-light:#90A4AE;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sIOqK, html code.shiki .sIOqK{--shiki-light:#9C3EDA;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .s131V, html code.shiki .s131V{--shiki-light:#90A4AE;--shiki-default:#998418;--shiki-dark:#B8A965}",{"title":56,"searchDepth":146,"depth":146,"links":1277},[1278,1279,1280,1281,1282,1283],{"id":35,"depth":146,"text":36},{"id":45,"depth":146,"text":46},{"id":410,"depth":146,"text":411},{"id":1136,"depth":146,"text":1137},{"id":1177,"depth":146,"text":1178},{"id":1192,"depth":146,"text":1193},"guides",null,"2026-11-16","How the Township Canada Autocomplete API works in a type-ahead field: request, response, survey system filtering, map hand-off, and plan fit.","md",{},"\u002Fblog\u002Flegal-land-description-autocomplete-api-web-app",{"title":5,"description":1287},"blog\u002Flegal-land-description-autocomplete-api-web-app",[1294,1295,1296,1297],"Developer","Autocomplete API","Search API","API","UtPSofHgOuEvmFlIysg9iEePf7Zc03kbrtGum1hFCbA"]