[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"guide-batch-api-guide":3,"related-batch-api-guide":3344},{"id":4,"title":5,"body":6,"category":3334,"description":3335,"draft":3336,"extension":3337,"icon":3338,"meta":3339,"navigation":103,"order":163,"path":3340,"seo":3341,"stem":3342,"__hash__":3343},"guides\u002Fguides\u002Fbatch-api-guide.md","Processing Large Datasets with the Batch API",{"type":7,"value":8,"toc":3321},"minimark",[9,14,18,21,25,43,51,55,63,69,111,116,167,174,179,198,706,709,743,747,750,753,757,763,767,777,2110,2113,2137,2143,2188,2192,2199,3172,3175,3204,3208,3211,3267,3270,3273,3277,3310,3317],[10,11,13],"h2",{"id":12},"what-youll-build","What You'll Build",[15,16,17],"p",{},"By the end of this guide, you'll have a working script that reads a list of legal land descriptions-potentially thousands of them-and converts each one to GPS coordinates using the Township Canada Batch API. You'll handle the 100-record-per-request limit by chunking your data, aggregate the responses into a single output file, and add the rate limit handling needed for production use.",[15,19,20],{},"The same pattern applies in reverse: if you're starting from coordinates and need legal land descriptions, the reverse batch endpoint follows an identical workflow.",[10,22,24],{"id":23},"prerequisites","Prerequisites",[26,27,28,37,40],"ul",{},[29,30,31,32],"li",{},"A Township Canada Batch API key - subscribe on the ",[33,34,36],"a",{"href":35},"\u002Fapp\u002Fapi","API page",[29,38,39],{},"Node.js 18+ or Python 3.8+",[29,41,42],{},"Basic familiarity with REST APIs and JSON",[15,44,45,46,50],{},"The Batch API is available on its own subscription ($40\u002Fmonth) and is separate from the Search and Autocomplete APIs. See the ",[33,47,49],{"href":48},"\u002Fguides\u002Fapi-integration","API Integration Guide"," for a full overview of available endpoints and pricing tiers.",[10,52,54],{"id":53},"the-batch-endpoint","The Batch Endpoint",[15,56,57,58,62],{},"The Batch API exposes two endpoints under ",[59,60,61],"code",{},"https:\u002F\u002Fdeveloper.townshipcanada.com",":",[15,64,65],{},[66,67,68],"strong",{},"Forward (LLD → coordinates)",[70,71,76],"pre",{"className":72,"code":73,"language":74,"meta":75,"style":75},"language-http shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","POST \u002Fbatch\u002Flegal-location\nX-API-Key: YOUR_API_KEY\nContent-Type: application\u002Fjson\n\n[\"NE-7-102-19-W4\", \"1-24-60-1-W5\", \"7-66-4-W6\"]\n","http","",[59,77,78,86,92,98,105],{"__ignoreMap":75},[79,80,83],"span",{"class":81,"line":82},"line",1,[79,84,85],{},"POST \u002Fbatch\u002Flegal-location\n",[79,87,89],{"class":81,"line":88},2,[79,90,91],{},"X-API-Key: YOUR_API_KEY\n",[79,93,95],{"class":81,"line":94},3,[79,96,97],{},"Content-Type: application\u002Fjson\n",[79,99,101],{"class":81,"line":100},4,[79,102,104],{"emptyLinePlaceholder":103},true,"\n",[79,106,108],{"class":81,"line":107},5,[79,109,110],{},"[\"NE-7-102-19-W4\", \"1-24-60-1-W5\", \"7-66-4-W6\"]\n",[15,112,113],{},[66,114,115],{},"Reverse (coordinates → LLD)",[70,117,119],{"className":72,"code":118,"language":74,"meta":75,"style":75},"POST \u002Fbatch\u002Fcoordinates\nX-API-Key: YOUR_API_KEY\nContent-Type: application\u002Fjson\n\n{\n  \"coordinates\": [[-110.086743843, 54.28602155], [-110.011880321, 54.336941143]],\n  \"survey_system\": \"DLS\",\n  \"unit\": \"Quarter Section\"\n}\n",[59,120,121,126,130,134,138,143,149,155,161],{"__ignoreMap":75},[79,122,123],{"class":81,"line":82},[79,124,125],{},"POST \u002Fbatch\u002Fcoordinates\n",[79,127,128],{"class":81,"line":88},[79,129,91],{},[79,131,132],{"class":81,"line":94},[79,133,97],{},[79,135,136],{"class":81,"line":100},[79,137,104],{"emptyLinePlaceholder":103},[79,139,140],{"class":81,"line":107},[79,141,142],{},"{\n",[79,144,146],{"class":81,"line":145},6,[79,147,148],{},"  \"coordinates\": [[-110.086743843, 54.28602155], [-110.011880321, 54.336941143]],\n",[79,150,152],{"class":81,"line":151},7,[79,153,154],{},"  \"survey_system\": \"DLS\",\n",[79,156,158],{"class":81,"line":157},8,[79,159,160],{},"  \"unit\": \"Quarter Section\"\n",[79,162,164],{"class":81,"line":163},9,[79,165,166],{},"}\n",[15,168,169,170,173],{},"Both endpoints accept a maximum of ",[66,171,172],{},"100 records per request",". Sending more than 100 records in a single request will result in an error.",[175,176,178],"h3",{"id":177},"response-format","Response format",[15,180,181,182,185,186,189,190,193,194,197],{},"Each successful request returns a GeoJSON ",[59,183,184],{},"FeatureCollection",". Every input record produces ",[66,187,188],{},"two features"," in the response: a ",[59,191,192],{},"MultiPolygon"," representing the grid boundary, and a ",[59,195,196],{},"Point"," representing the centroid.",[70,199,203],{"className":200,"code":201,"language":202,"meta":75,"style":75},"language-json shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"geometry\": { \"type\": \"MultiPolygon\", \"coordinates\": [[...]] },\n      \"properties\": {\n        \"unit\": \"Quarter Section\",\n        \"shape\": \"grid\",\n        \"province\": \"Alberta\",\n        \"search_term\": \"NE-7-102-19-W4\",\n        \"legal_location\": \"NE-7-102-19-W4\",\n        \"survey_system\": \"DLS\"\n      }\n    },\n    {\n      \"type\": \"Feature\",\n      \"geometry\": { \"type\": \"Point\", \"coordinates\": [-111.644676, 56.535938] },\n      \"properties\": {\n        \"unit\": \"Quarter Section\",\n        \"shape\": \"centroid\",\n        \"search_term\": \"NE-7-102-19-W4\",\n        \"legal_location\": \"NE-7-102-19-W4\",\n        \"survey_system\": \"DLS\",\n        \"province\": \"Alberta\"\n      }\n    }\n  ]\n}\n","json",[59,204,205,210,237,251,256,277,331,345,366,386,407,428,448,468,474,480,485,504,558,571,590,610,629,648,667,684,689,695,701],{"__ignoreMap":75},[79,206,207],{"class":81,"line":82},[79,208,142],{"class":209},"soVBu",[79,211,212,216,220,223,225,229,232,234],{"class":81,"line":88},[79,213,215],{"class":214},"s4Jsk","  \"",[79,217,219],{"class":218},"sLorS","type",[79,221,222],{"class":214},"\"",[79,224,62],{"class":209},[79,226,228],{"class":227},"sbYkP"," \"",[79,230,184],{"class":231},"sTbE_",[79,233,222],{"class":227},[79,235,236],{"class":209},",\n",[79,238,239,241,244,246,248],{"class":81,"line":94},[79,240,215],{"class":214},[79,242,243],{"class":218},"features",[79,245,222],{"class":214},[79,247,62],{"class":209},[79,249,250],{"class":209}," [\n",[79,252,253],{"class":81,"line":100},[79,254,255],{"class":209},"    {\n",[79,257,258,261,264,266,268,270,273,275],{"class":81,"line":107},[79,259,260],{"class":214},"      \"",[79,262,219],{"class":263},"sa2tF",[79,265,222],{"class":214},[79,267,62],{"class":209},[79,269,228],{"class":227},[79,271,272],{"class":231},"Feature",[79,274,222],{"class":227},[79,276,236],{"class":209},[79,278,279,281,284,286,288,291,293,296,298,300,302,304,306,309,311,314,316,318,321,325,328],{"class":81,"line":145},[79,280,260],{"class":214},[79,282,283],{"class":263},"geometry",[79,285,222],{"class":214},[79,287,62],{"class":209},[79,289,290],{"class":209}," {",[79,292,228],{"class":214},[79,294,219],{"class":295},"skNjk",[79,297,222],{"class":214},[79,299,62],{"class":209},[79,301,228],{"class":227},[79,303,192],{"class":231},[79,305,222],{"class":227},[79,307,308],{"class":209},",",[79,310,228],{"class":214},[79,312,313],{"class":295},"coordinates",[79,315,222],{"class":214},[79,317,62],{"class":209},[79,319,320],{"class":209}," [[",[79,322,324],{"class":323},"srjyR","...",[79,326,327],{"class":209},"]]",[79,329,330],{"class":209}," },\n",[79,332,333,335,338,340,342],{"class":81,"line":151},[79,334,260],{"class":214},[79,336,337],{"class":263},"properties",[79,339,222],{"class":214},[79,341,62],{"class":209},[79,343,344],{"class":209}," {\n",[79,346,347,350,353,355,357,359,362,364],{"class":81,"line":157},[79,348,349],{"class":214},"        \"",[79,351,352],{"class":295},"unit",[79,354,222],{"class":214},[79,356,62],{"class":209},[79,358,228],{"class":227},[79,360,361],{"class":231},"Quarter Section",[79,363,222],{"class":227},[79,365,236],{"class":209},[79,367,368,370,373,375,377,379,382,384],{"class":81,"line":163},[79,369,349],{"class":214},[79,371,372],{"class":295},"shape",[79,374,222],{"class":214},[79,376,62],{"class":209},[79,378,228],{"class":227},[79,380,381],{"class":231},"grid",[79,383,222],{"class":227},[79,385,236],{"class":209},[79,387,389,391,394,396,398,400,403,405],{"class":81,"line":388},10,[79,390,349],{"class":214},[79,392,393],{"class":295},"province",[79,395,222],{"class":214},[79,397,62],{"class":209},[79,399,228],{"class":227},[79,401,402],{"class":231},"Alberta",[79,404,222],{"class":227},[79,406,236],{"class":209},[79,408,410,412,415,417,419,421,424,426],{"class":81,"line":409},11,[79,411,349],{"class":214},[79,413,414],{"class":295},"search_term",[79,416,222],{"class":214},[79,418,62],{"class":209},[79,420,228],{"class":227},[79,422,423],{"class":231},"NE-7-102-19-W4",[79,425,222],{"class":227},[79,427,236],{"class":209},[79,429,431,433,436,438,440,442,444,446],{"class":81,"line":430},12,[79,432,349],{"class":214},[79,434,435],{"class":295},"legal_location",[79,437,222],{"class":214},[79,439,62],{"class":209},[79,441,228],{"class":227},[79,443,423],{"class":231},[79,445,222],{"class":227},[79,447,236],{"class":209},[79,449,451,453,456,458,460,462,465],{"class":81,"line":450},13,[79,452,349],{"class":214},[79,454,455],{"class":295},"survey_system",[79,457,222],{"class":214},[79,459,62],{"class":209},[79,461,228],{"class":227},[79,463,464],{"class":231},"DLS",[79,466,467],{"class":227},"\"\n",[79,469,471],{"class":81,"line":470},14,[79,472,473],{"class":209},"      }\n",[79,475,477],{"class":81,"line":476},15,[79,478,479],{"class":209},"    },\n",[79,481,483],{"class":81,"line":482},16,[79,484,255],{"class":209},[79,486,488,490,492,494,496,498,500,502],{"class":81,"line":487},17,[79,489,260],{"class":214},[79,491,219],{"class":263},[79,493,222],{"class":214},[79,495,62],{"class":209},[79,497,228],{"class":227},[79,499,272],{"class":231},[79,501,222],{"class":227},[79,503,236],{"class":209},[79,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,539,541,544,548,550,553,556],{"class":81,"line":506},18,[79,508,260],{"class":214},[79,510,283],{"class":263},[79,512,222],{"class":214},[79,514,62],{"class":209},[79,516,290],{"class":209},[79,518,228],{"class":214},[79,520,219],{"class":295},[79,522,222],{"class":214},[79,524,62],{"class":209},[79,526,228],{"class":227},[79,528,196],{"class":231},[79,530,222],{"class":227},[79,532,308],{"class":209},[79,534,228],{"class":214},[79,536,313],{"class":295},[79,538,222],{"class":214},[79,540,62],{"class":209},[79,542,543],{"class":209}," [",[79,545,547],{"class":546},"s7CZa","-111.644676",[79,549,308],{"class":209},[79,551,552],{"class":546}," 56.535938",[79,554,555],{"class":209},"]",[79,557,330],{"class":209},[79,559,561,563,565,567,569],{"class":81,"line":560},19,[79,562,260],{"class":214},[79,564,337],{"class":263},[79,566,222],{"class":214},[79,568,62],{"class":209},[79,570,344],{"class":209},[79,572,574,576,578,580,582,584,586,588],{"class":81,"line":573},20,[79,575,349],{"class":214},[79,577,352],{"class":295},[79,579,222],{"class":214},[79,581,62],{"class":209},[79,583,228],{"class":227},[79,585,361],{"class":231},[79,587,222],{"class":227},[79,589,236],{"class":209},[79,591,593,595,597,599,601,603,606,608],{"class":81,"line":592},21,[79,594,349],{"class":214},[79,596,372],{"class":295},[79,598,222],{"class":214},[79,600,62],{"class":209},[79,602,228],{"class":227},[79,604,605],{"class":231},"centroid",[79,607,222],{"class":227},[79,609,236],{"class":209},[79,611,613,615,617,619,621,623,625,627],{"class":81,"line":612},22,[79,614,349],{"class":214},[79,616,414],{"class":295},[79,618,222],{"class":214},[79,620,62],{"class":209},[79,622,228],{"class":227},[79,624,423],{"class":231},[79,626,222],{"class":227},[79,628,236],{"class":209},[79,630,632,634,636,638,640,642,644,646],{"class":81,"line":631},23,[79,633,349],{"class":214},[79,635,435],{"class":295},[79,637,222],{"class":214},[79,639,62],{"class":209},[79,641,228],{"class":227},[79,643,423],{"class":231},[79,645,222],{"class":227},[79,647,236],{"class":209},[79,649,651,653,655,657,659,661,663,665],{"class":81,"line":650},24,[79,652,349],{"class":214},[79,654,455],{"class":295},[79,656,222],{"class":214},[79,658,62],{"class":209},[79,660,228],{"class":227},[79,662,464],{"class":231},[79,664,222],{"class":227},[79,666,236],{"class":209},[79,668,670,672,674,676,678,680,682],{"class":81,"line":669},25,[79,671,349],{"class":214},[79,673,393],{"class":295},[79,675,222],{"class":214},[79,677,62],{"class":209},[79,679,228],{"class":227},[79,681,402],{"class":231},[79,683,467],{"class":227},[79,685,687],{"class":81,"line":686},26,[79,688,473],{"class":209},[79,690,692],{"class":81,"line":691},27,[79,693,694],{"class":209},"    }\n",[79,696,698],{"class":81,"line":697},28,[79,699,700],{"class":209},"  ]\n",[79,702,704],{"class":81,"line":703},29,[79,705,166],{"class":209},[15,707,708],{},"Key details to note:",[26,710,711,717,730,740],{},[29,712,713,714,716],{},"The ",[59,715,435],{}," property identifies which input record produced the feature.",[29,718,713,719,721,722,725,726,729],{},[59,720,372],{}," property distinguishes ",[59,723,724],{},"\"grid\""," (boundary polygon) from ",[59,727,728],{},"\"centroid\""," (point).",[29,731,732,733,735,736,739],{},"Geometry type is ",[59,734,192],{}," for boundaries, not ",[59,737,738],{},"Polygon",".",[29,741,742],{},"A dataset of 500 LLDs will produce a response with 1,000 features across all chunks.",[10,744,746],{"id":745},"chunking-large-datasets","Chunking Large Datasets",[15,748,749],{},"Since each request is limited to 100 records, any dataset larger than 100 LLDs needs to be split into chunks before sending. For a list of 750 legal land descriptions, that's 8 requests (7 of 100 records, 1 of 50).",[15,751,752],{},"The simplest approach is a sequential loop: send chunk 1, wait for the response, send chunk 2, and so on. This avoids rate limit issues and keeps memory usage low. For time-sensitive workflows, you can run a small number of chunks concurrently - but stay within your subscription's rate limit (1 req\u002Fsec on Build tier, 5 req\u002Fsec on Scale, 25 req\u002Fsec on Enterprise).",[10,754,756],{"id":755},"error-handling","Error Handling",[15,758,759,760,762],{},"The API returns HTTP errors for request-level problems (invalid JSON, missing auth header, oversized payload). Within a valid response, individual records that could not be resolved will simply be absent from the features array - there is no per-record error object. After processing, compare the number of unique ",[59,761,435],{}," values in your output against your input count to identify records that returned no results.",[10,764,766],{"id":765},"nodejs-example","Node.js Example",[15,768,769,770,773,774,739],{},"This script reads a JSON array of legal land descriptions from ",[59,771,772],{},"input.json",", processes them in batches of 100, and writes the aggregated GeoJSON to ",[59,775,776],{},"output.json",[70,778,782],{"className":779,"code":780,"language":781,"meta":75,"style":75},"language-javascript shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","const fs = require(\"fs\");\n\nconst API_KEY = process.env.TOWNSHIP_CANADA_API_KEY;\nconst BASE_URL = \"https:\u002F\u002Fdeveloper.townshipcanada.com\";\nconst CHUNK_SIZE = 100;\nconst DELAY_MS = 1100; \u002F\u002F slightly over 1 second to stay under 1 req\u002Fsec on Build tier\n\nfunction chunk(array, size) {\n  const chunks = [];\n  for (let i = 0; i \u003C array.length; i += size) {\n    chunks.push(array.slice(i, i + size));\n  }\n  return chunks;\n}\n\nfunction sleep(ms) {\n  return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nasync function batchConvert(llds) {\n  const response = await fetch(`${BASE_URL}\u002Fbatch\u002Flegal-location`, {\n    method: \"POST\",\n    headers: {\n      \"X-API-Key\": API_KEY,\n      \"Content-Type\": \"application\u002Fjson\"\n    },\n    body: JSON.stringify(llds)\n  });\n\n  if (!response.ok) {\n    throw new Error(`HTTP ${response.status}: ${await response.text()}`);\n  }\n\n  return response.json();\n}\n\nasync function main() {\n  const input = JSON.parse(fs.readFileSync(\"input.json\", \"utf8\"));\n  console.log(`Processing ${input.length} records...`);\n\n  const chunks = chunk(input, CHUNK_SIZE);\n  const allFeatures = [];\n\n  for (let i = 0; i \u003C chunks.length; i++) {\n    console.log(`Chunk ${i + 1}\u002F${chunks.length} (${chunks[i].length} records)`);\n\n    const result = await batchConvert(chunks[i]);\n    allFeatures.push(...result.features);\n\n    \u002F\u002F Avoid hitting rate limits between chunks (skip delay after last chunk)\n    if (i \u003C chunks.length - 1) {\n      await sleep(DELAY_MS);\n    }\n  }\n\n  const output = {\n    type: \"FeatureCollection\",\n    features: allFeatures\n  };\n\n  fs.writeFileSync(\"output.json\", JSON.stringify(output, null, 2));\n  console.log(`Done. ${allFeatures.length} features written to output.json`);\n\n  \u002F\u002F Report any input records with no matching output\n  const resolved = new Set(allFeatures.map((f) => f.properties.legal_location));\n  const missing = input.filter((lld) => !resolved.has(lld));\n  if (missing.length > 0) {\n    console.warn(`${missing.length} records returned no results:`, missing);\n  }\n}\n\nmain().catch(console.error);\n","javascript",[59,783,784,818,822,846,863,877,896,900,923,939,989,1027,1032,1041,1045,1049,1065,1104,1108,1112,1132,1172,1189,1198,1214,1232,1236,1258,1267,1271,1294,1349,1354,1359,1374,1379,1384,1398,1445,1483,1488,1511,1525,1530,1568,1640,1645,1673,1698,1703,1709,1736,1753,1758,1763,1768,1780,1796,1807,1813,1818,1864,1900,1905,1911,1961,2008,2031,2068,2073,2078,2083],{"__ignoreMap":75},[79,785,786,790,794,797,801,805,807,810,812,815],{"class":81,"line":82},[79,787,789],{"class":788},"s5Kfy","const",[79,791,793],{"class":792},"sSC40"," fs",[79,795,796],{"class":209}," =",[79,798,800],{"class":799},"sljsM"," require",[79,802,804],{"class":803},"snCua","(",[79,806,222],{"class":227},[79,808,809],{"class":231},"fs",[79,811,222],{"class":227},[79,813,814],{"class":803},")",[79,816,817],{"class":209},";\n",[79,819,820],{"class":81,"line":88},[79,821,104],{"emptyLinePlaceholder":103},[79,823,824,826,829,831,834,836,839,841,844],{"class":81,"line":94},[79,825,789],{"class":788},[79,827,828],{"class":792}," API_KEY",[79,830,796],{"class":209},[79,832,833],{"class":792}," process",[79,835,739],{"class":209},[79,837,838],{"class":792},"env",[79,840,739],{"class":209},[79,842,843],{"class":792},"TOWNSHIP_CANADA_API_KEY",[79,845,817],{"class":209},[79,847,848,850,853,855,857,859,861],{"class":81,"line":100},[79,849,789],{"class":788},[79,851,852],{"class":792}," BASE_URL",[79,854,796],{"class":209},[79,856,228],{"class":227},[79,858,61],{"class":231},[79,860,222],{"class":227},[79,862,817],{"class":209},[79,864,865,867,870,872,875],{"class":81,"line":107},[79,866,789],{"class":788},[79,868,869],{"class":792}," CHUNK_SIZE",[79,871,796],{"class":209},[79,873,874],{"class":546}," 100",[79,876,817],{"class":209},[79,878,879,881,884,886,889,892],{"class":81,"line":145},[79,880,789],{"class":788},[79,882,883],{"class":792}," DELAY_MS",[79,885,796],{"class":209},[79,887,888],{"class":546}," 1100",[79,890,891],{"class":209},";",[79,893,895],{"class":894},"s9Tkl"," \u002F\u002F slightly over 1 second to stay under 1 req\u002Fsec on Build tier\n",[79,897,898],{"class":81,"line":151},[79,899,104],{"emptyLinePlaceholder":103},[79,901,902,905,908,910,914,916,919,921],{"class":81,"line":157},[79,903,904],{"class":788},"function",[79,906,907],{"class":799}," chunk",[79,909,804],{"class":209},[79,911,913],{"class":912},"sqOPj","array",[79,915,308],{"class":209},[79,917,918],{"class":912}," size",[79,920,814],{"class":209},[79,922,344],{"class":209},[79,924,925,928,931,933,937],{"class":81,"line":163},[79,926,927],{"class":788},"  const",[79,929,930],{"class":792}," chunks",[79,932,796],{"class":209},[79,934,936],{"class":935},"sLdnO"," []",[79,938,817],{"class":209},[79,940,941,945,948,951,954,956,959,961,963,966,969,971,975,977,979,983,985,987],{"class":81,"line":388},[79,942,944],{"class":943},"siDh9","  for",[79,946,947],{"class":935}," (",[79,949,950],{"class":788},"let",[79,952,953],{"class":792}," i",[79,955,796],{"class":209},[79,957,958],{"class":546}," 0",[79,960,891],{"class":209},[79,962,953],{"class":792},[79,964,965],{"class":209}," \u003C",[79,967,968],{"class":792}," array",[79,970,739],{"class":209},[79,972,974],{"class":973},"s131V","length",[79,976,891],{"class":209},[79,978,953],{"class":792},[79,980,982],{"class":981},"sVsLi"," +=",[79,984,918],{"class":792},[79,986,814],{"class":935},[79,988,344],{"class":209},[79,990,991,994,996,999,1001,1003,1005,1008,1010,1013,1015,1017,1020,1022,1025],{"class":81,"line":409},[79,992,993],{"class":792},"    chunks",[79,995,739],{"class":209},[79,997,998],{"class":799},"push",[79,1000,804],{"class":935},[79,1002,913],{"class":792},[79,1004,739],{"class":209},[79,1006,1007],{"class":799},"slice",[79,1009,804],{"class":935},[79,1011,1012],{"class":792},"i",[79,1014,308],{"class":209},[79,1016,953],{"class":792},[79,1018,1019],{"class":981}," +",[79,1021,918],{"class":792},[79,1023,1024],{"class":935},"))",[79,1026,817],{"class":209},[79,1028,1029],{"class":81,"line":430},[79,1030,1031],{"class":209},"  }\n",[79,1033,1034,1037,1039],{"class":81,"line":450},[79,1035,1036],{"class":943},"  return",[79,1038,930],{"class":792},[79,1040,817],{"class":209},[79,1042,1043],{"class":81,"line":470},[79,1044,166],{"class":209},[79,1046,1047],{"class":81,"line":476},[79,1048,104],{"emptyLinePlaceholder":103},[79,1050,1051,1053,1056,1058,1061,1063],{"class":81,"line":482},[79,1052,904],{"class":788},[79,1054,1055],{"class":799}," sleep",[79,1057,804],{"class":209},[79,1059,1060],{"class":912},"ms",[79,1062,814],{"class":209},[79,1064,344],{"class":209},[79,1066,1067,1069,1072,1075,1077,1079,1082,1084,1088,1091,1093,1095,1097,1100,1102],{"class":81,"line":487},[79,1068,1036],{"class":943},[79,1070,1071],{"class":981}," new",[79,1073,1074],{"class":263}," Promise",[79,1076,804],{"class":935},[79,1078,804],{"class":209},[79,1080,1081],{"class":912},"resolve",[79,1083,814],{"class":209},[79,1085,1087],{"class":1086},"sIOqK"," =>",[79,1089,1090],{"class":799}," setTimeout",[79,1092,804],{"class":935},[79,1094,1081],{"class":792},[79,1096,308],{"class":209},[79,1098,1099],{"class":792}," ms",[79,1101,1024],{"class":935},[79,1103,817],{"class":209},[79,1105,1106],{"class":81,"line":506},[79,1107,166],{"class":209},[79,1109,1110],{"class":81,"line":560},[79,1111,104],{"emptyLinePlaceholder":103},[79,1113,1114,1117,1120,1123,1125,1128,1130],{"class":81,"line":573},[79,1115,1116],{"class":788},"async",[79,1118,1119],{"class":788}," function",[79,1121,1122],{"class":799}," batchConvert",[79,1124,804],{"class":209},[79,1126,1127],{"class":912},"llds",[79,1129,814],{"class":209},[79,1131,344],{"class":209},[79,1133,1134,1136,1139,1141,1144,1147,1149,1152,1156,1160,1163,1166,1168,1170],{"class":81,"line":592},[79,1135,927],{"class":788},[79,1137,1138],{"class":792}," response",[79,1140,796],{"class":209},[79,1142,1143],{"class":943}," await",[79,1145,1146],{"class":799}," fetch",[79,1148,804],{"class":935},[79,1150,1151],{"class":227},"`",[79,1153,1155],{"class":1154},"s8XtY","${",[79,1157,1159],{"class":1158},"su_V2","BASE_URL",[79,1161,1162],{"class":1154},"}",[79,1164,1165],{"class":231},"\u002Fbatch\u002Flegal-location",[79,1167,1151],{"class":227},[79,1169,308],{"class":209},[79,1171,344],{"class":209},[79,1173,1174,1178,1180,1182,1185,1187],{"class":81,"line":612},[79,1175,1177],{"class":1176},"suXOh","    method",[79,1179,62],{"class":209},[79,1181,228],{"class":227},[79,1183,1184],{"class":231},"POST",[79,1186,222],{"class":227},[79,1188,236],{"class":209},[79,1190,1191,1194,1196],{"class":81,"line":631},[79,1192,1193],{"class":1176},"    headers",[79,1195,62],{"class":209},[79,1197,344],{"class":209},[79,1199,1200,1202,1206,1208,1210,1212],{"class":81,"line":650},[79,1201,260],{"class":227},[79,1203,1205],{"class":1204},"sQtxO","X-API-Key",[79,1207,222],{"class":227},[79,1209,62],{"class":209},[79,1211,828],{"class":792},[79,1213,236],{"class":209},[79,1215,1216,1218,1221,1223,1225,1227,1230],{"class":81,"line":669},[79,1217,260],{"class":227},[79,1219,1220],{"class":1204},"Content-Type",[79,1222,222],{"class":227},[79,1224,62],{"class":209},[79,1226,228],{"class":227},[79,1228,1229],{"class":231},"application\u002Fjson",[79,1231,467],{"class":227},[79,1233,1234],{"class":81,"line":686},[79,1235,479],{"class":209},[79,1237,1238,1241,1243,1246,1248,1251,1253,1255],{"class":81,"line":691},[79,1239,1240],{"class":1176},"    body",[79,1242,62],{"class":209},[79,1244,1245],{"class":792}," JSON",[79,1247,739],{"class":209},[79,1249,1250],{"class":799},"stringify",[79,1252,804],{"class":935},[79,1254,1127],{"class":792},[79,1256,1257],{"class":935},")\n",[79,1259,1260,1263,1265],{"class":81,"line":697},[79,1261,1262],{"class":209},"  }",[79,1264,814],{"class":935},[79,1266,817],{"class":209},[79,1268,1269],{"class":81,"line":703},[79,1270,104],{"emptyLinePlaceholder":103},[79,1272,1274,1277,1279,1282,1285,1287,1290,1292],{"class":81,"line":1273},30,[79,1275,1276],{"class":943},"  if",[79,1278,947],{"class":935},[79,1280,1281],{"class":981},"!",[79,1283,1284],{"class":792},"response",[79,1286,739],{"class":209},[79,1288,1289],{"class":792},"ok",[79,1291,814],{"class":935},[79,1293,344],{"class":209},[79,1295,1297,1300,1302,1305,1307,1309,1312,1314,1316,1318,1321,1323,1326,1328,1331,1333,1335,1338,1341,1343,1345,1347],{"class":81,"line":1296},31,[79,1298,1299],{"class":943},"    throw",[79,1301,1071],{"class":981},[79,1303,1304],{"class":799}," Error",[79,1306,804],{"class":935},[79,1308,1151],{"class":227},[79,1310,1311],{"class":231},"HTTP ",[79,1313,1155],{"class":1154},[79,1315,1284],{"class":1158},[79,1317,739],{"class":209},[79,1319,1320],{"class":1158},"status",[79,1322,1162],{"class":1154},[79,1324,1325],{"class":231},": ",[79,1327,1155],{"class":1154},[79,1329,1330],{"class":943},"await",[79,1332,1138],{"class":1158},[79,1334,739],{"class":209},[79,1336,1337],{"class":799},"text",[79,1339,1340],{"class":803},"()",[79,1342,1162],{"class":1154},[79,1344,1151],{"class":227},[79,1346,814],{"class":935},[79,1348,817],{"class":209},[79,1350,1352],{"class":81,"line":1351},32,[79,1353,1031],{"class":209},[79,1355,1357],{"class":81,"line":1356},33,[79,1358,104],{"emptyLinePlaceholder":103},[79,1360,1362,1364,1366,1368,1370,1372],{"class":81,"line":1361},34,[79,1363,1036],{"class":943},[79,1365,1138],{"class":792},[79,1367,739],{"class":209},[79,1369,202],{"class":799},[79,1371,1340],{"class":935},[79,1373,817],{"class":209},[79,1375,1377],{"class":81,"line":1376},35,[79,1378,166],{"class":209},[79,1380,1382],{"class":81,"line":1381},36,[79,1383,104],{"emptyLinePlaceholder":103},[79,1385,1387,1389,1391,1394,1396],{"class":81,"line":1386},37,[79,1388,1116],{"class":788},[79,1390,1119],{"class":788},[79,1392,1393],{"class":799}," main",[79,1395,1340],{"class":209},[79,1397,344],{"class":209},[79,1399,1401,1403,1406,1408,1410,1412,1415,1417,1419,1421,1424,1426,1428,1430,1432,1434,1436,1439,1441,1443],{"class":81,"line":1400},38,[79,1402,927],{"class":788},[79,1404,1405],{"class":792}," input",[79,1407,796],{"class":209},[79,1409,1245],{"class":792},[79,1411,739],{"class":209},[79,1413,1414],{"class":799},"parse",[79,1416,804],{"class":935},[79,1418,809],{"class":792},[79,1420,739],{"class":209},[79,1422,1423],{"class":799},"readFileSync",[79,1425,804],{"class":935},[79,1427,222],{"class":227},[79,1429,772],{"class":231},[79,1431,222],{"class":227},[79,1433,308],{"class":209},[79,1435,228],{"class":227},[79,1437,1438],{"class":231},"utf8",[79,1440,222],{"class":227},[79,1442,1024],{"class":935},[79,1444,817],{"class":209},[79,1446,1448,1451,1453,1456,1458,1460,1463,1465,1468,1470,1472,1474,1477,1479,1481],{"class":81,"line":1447},39,[79,1449,1450],{"class":792},"  console",[79,1452,739],{"class":209},[79,1454,1455],{"class":799},"log",[79,1457,804],{"class":935},[79,1459,1151],{"class":227},[79,1461,1462],{"class":231},"Processing ",[79,1464,1155],{"class":1154},[79,1466,1467],{"class":1158},"input",[79,1469,739],{"class":209},[79,1471,974],{"class":973},[79,1473,1162],{"class":1154},[79,1475,1476],{"class":231}," records...",[79,1478,1151],{"class":227},[79,1480,814],{"class":935},[79,1482,817],{"class":209},[79,1484,1486],{"class":81,"line":1485},40,[79,1487,104],{"emptyLinePlaceholder":103},[79,1489,1491,1493,1495,1497,1499,1501,1503,1505,1507,1509],{"class":81,"line":1490},41,[79,1492,927],{"class":788},[79,1494,930],{"class":792},[79,1496,796],{"class":209},[79,1498,907],{"class":799},[79,1500,804],{"class":935},[79,1502,1467],{"class":792},[79,1504,308],{"class":209},[79,1506,869],{"class":792},[79,1508,814],{"class":935},[79,1510,817],{"class":209},[79,1512,1514,1516,1519,1521,1523],{"class":81,"line":1513},42,[79,1515,927],{"class":788},[79,1517,1518],{"class":792}," allFeatures",[79,1520,796],{"class":209},[79,1522,936],{"class":935},[79,1524,817],{"class":209},[79,1526,1528],{"class":81,"line":1527},43,[79,1529,104],{"emptyLinePlaceholder":103},[79,1531,1533,1535,1537,1539,1541,1543,1545,1547,1549,1551,1553,1555,1557,1559,1561,1564,1566],{"class":81,"line":1532},44,[79,1534,944],{"class":943},[79,1536,947],{"class":935},[79,1538,950],{"class":788},[79,1540,953],{"class":792},[79,1542,796],{"class":209},[79,1544,958],{"class":546},[79,1546,891],{"class":209},[79,1548,953],{"class":792},[79,1550,965],{"class":209},[79,1552,930],{"class":792},[79,1554,739],{"class":209},[79,1556,974],{"class":973},[79,1558,891],{"class":209},[79,1560,953],{"class":792},[79,1562,1563],{"class":981},"++",[79,1565,814],{"class":935},[79,1567,344],{"class":209},[79,1569,1571,1574,1576,1578,1580,1582,1585,1587,1590,1593,1596,1598,1601,1603,1606,1608,1610,1612,1614,1616,1618,1621,1623,1625,1627,1629,1631,1634,1636,1638],{"class":81,"line":1570},45,[79,1572,1573],{"class":792},"    console",[79,1575,739],{"class":209},[79,1577,1455],{"class":799},[79,1579,804],{"class":935},[79,1581,1151],{"class":227},[79,1583,1584],{"class":231},"Chunk ",[79,1586,1155],{"class":1154},[79,1588,1589],{"class":1158},"i ",[79,1591,1592],{"class":981},"+",[79,1594,1595],{"class":546}," 1",[79,1597,1162],{"class":1154},[79,1599,1600],{"class":231},"\u002F",[79,1602,1155],{"class":1154},[79,1604,1605],{"class":1158},"chunks",[79,1607,739],{"class":209},[79,1609,974],{"class":973},[79,1611,1162],{"class":1154},[79,1613,947],{"class":231},[79,1615,1155],{"class":1154},[79,1617,1605],{"class":1158},[79,1619,1620],{"class":803},"[",[79,1622,1012],{"class":1158},[79,1624,555],{"class":803},[79,1626,739],{"class":209},[79,1628,974],{"class":973},[79,1630,1162],{"class":1154},[79,1632,1633],{"class":231}," records)",[79,1635,1151],{"class":227},[79,1637,814],{"class":935},[79,1639,817],{"class":209},[79,1641,1643],{"class":81,"line":1642},46,[79,1644,104],{"emptyLinePlaceholder":103},[79,1646,1648,1651,1654,1656,1658,1660,1662,1664,1666,1668,1671],{"class":81,"line":1647},47,[79,1649,1650],{"class":788},"    const",[79,1652,1653],{"class":792}," result",[79,1655,796],{"class":209},[79,1657,1143],{"class":943},[79,1659,1122],{"class":799},[79,1661,804],{"class":935},[79,1663,1605],{"class":792},[79,1665,1620],{"class":935},[79,1667,1012],{"class":792},[79,1669,1670],{"class":935},"])",[79,1672,817],{"class":209},[79,1674,1676,1679,1681,1683,1685,1687,1690,1692,1694,1696],{"class":81,"line":1675},48,[79,1677,1678],{"class":792},"    allFeatures",[79,1680,739],{"class":209},[79,1682,998],{"class":799},[79,1684,804],{"class":935},[79,1686,324],{"class":209},[79,1688,1689],{"class":792},"result",[79,1691,739],{"class":209},[79,1693,243],{"class":792},[79,1695,814],{"class":935},[79,1697,817],{"class":209},[79,1699,1701],{"class":81,"line":1700},49,[79,1702,104],{"emptyLinePlaceholder":103},[79,1704,1706],{"class":81,"line":1705},50,[79,1707,1708],{"class":894},"    \u002F\u002F Avoid hitting rate limits between chunks (skip delay after last chunk)\n",[79,1710,1712,1715,1717,1719,1721,1723,1725,1727,1730,1732,1734],{"class":81,"line":1711},51,[79,1713,1714],{"class":943},"    if",[79,1716,947],{"class":935},[79,1718,1012],{"class":792},[79,1720,965],{"class":209},[79,1722,930],{"class":792},[79,1724,739],{"class":209},[79,1726,974],{"class":973},[79,1728,1729],{"class":981}," -",[79,1731,1595],{"class":546},[79,1733,814],{"class":935},[79,1735,344],{"class":209},[79,1737,1739,1742,1744,1746,1749,1751],{"class":81,"line":1738},52,[79,1740,1741],{"class":943},"      await",[79,1743,1055],{"class":799},[79,1745,804],{"class":935},[79,1747,1748],{"class":792},"DELAY_MS",[79,1750,814],{"class":935},[79,1752,817],{"class":209},[79,1754,1756],{"class":81,"line":1755},53,[79,1757,694],{"class":209},[79,1759,1761],{"class":81,"line":1760},54,[79,1762,1031],{"class":209},[79,1764,1766],{"class":81,"line":1765},55,[79,1767,104],{"emptyLinePlaceholder":103},[79,1769,1771,1773,1776,1778],{"class":81,"line":1770},56,[79,1772,927],{"class":788},[79,1774,1775],{"class":792}," output",[79,1777,796],{"class":209},[79,1779,344],{"class":209},[79,1781,1783,1786,1788,1790,1792,1794],{"class":81,"line":1782},57,[79,1784,1785],{"class":1176},"    type",[79,1787,62],{"class":209},[79,1789,228],{"class":227},[79,1791,184],{"class":231},[79,1793,222],{"class":227},[79,1795,236],{"class":209},[79,1797,1799,1802,1804],{"class":81,"line":1798},58,[79,1800,1801],{"class":1176},"    features",[79,1803,62],{"class":209},[79,1805,1806],{"class":792}," allFeatures\n",[79,1808,1810],{"class":81,"line":1809},59,[79,1811,1812],{"class":209},"  };\n",[79,1814,1816],{"class":81,"line":1815},60,[79,1817,104],{"emptyLinePlaceholder":103},[79,1819,1821,1824,1826,1829,1831,1833,1835,1837,1839,1841,1843,1845,1847,1850,1852,1855,1857,1860,1862],{"class":81,"line":1820},61,[79,1822,1823],{"class":792},"  fs",[79,1825,739],{"class":209},[79,1827,1828],{"class":799},"writeFileSync",[79,1830,804],{"class":935},[79,1832,222],{"class":227},[79,1834,776],{"class":231},[79,1836,222],{"class":227},[79,1838,308],{"class":209},[79,1840,1245],{"class":792},[79,1842,739],{"class":209},[79,1844,1250],{"class":799},[79,1846,804],{"class":935},[79,1848,1849],{"class":792},"output",[79,1851,308],{"class":209},[79,1853,1854],{"class":981}," null",[79,1856,308],{"class":209},[79,1858,1859],{"class":546}," 2",[79,1861,1024],{"class":935},[79,1863,817],{"class":209},[79,1865,1867,1869,1871,1873,1875,1877,1880,1882,1885,1887,1889,1891,1894,1896,1898],{"class":81,"line":1866},62,[79,1868,1450],{"class":792},[79,1870,739],{"class":209},[79,1872,1455],{"class":799},[79,1874,804],{"class":935},[79,1876,1151],{"class":227},[79,1878,1879],{"class":231},"Done. ",[79,1881,1155],{"class":1154},[79,1883,1884],{"class":1158},"allFeatures",[79,1886,739],{"class":209},[79,1888,974],{"class":973},[79,1890,1162],{"class":1154},[79,1892,1893],{"class":231}," features written to output.json",[79,1895,1151],{"class":227},[79,1897,814],{"class":935},[79,1899,817],{"class":209},[79,1901,1903],{"class":81,"line":1902},63,[79,1904,104],{"emptyLinePlaceholder":103},[79,1906,1908],{"class":81,"line":1907},64,[79,1909,1910],{"class":894},"  \u002F\u002F Report any input records with no matching output\n",[79,1912,1914,1916,1919,1921,1923,1926,1928,1930,1932,1935,1937,1939,1942,1944,1946,1949,1951,1953,1955,1957,1959],{"class":81,"line":1913},65,[79,1915,927],{"class":788},[79,1917,1918],{"class":792}," resolved",[79,1920,796],{"class":209},[79,1922,1071],{"class":981},[79,1924,1925],{"class":799}," Set",[79,1927,804],{"class":935},[79,1929,1884],{"class":792},[79,1931,739],{"class":209},[79,1933,1934],{"class":799},"map",[79,1936,804],{"class":935},[79,1938,804],{"class":209},[79,1940,1941],{"class":912},"f",[79,1943,814],{"class":209},[79,1945,1087],{"class":1086},[79,1947,1948],{"class":792}," f",[79,1950,739],{"class":209},[79,1952,337],{"class":792},[79,1954,739],{"class":209},[79,1956,435],{"class":792},[79,1958,1024],{"class":935},[79,1960,817],{"class":209},[79,1962,1964,1966,1969,1971,1973,1975,1978,1980,1982,1985,1987,1989,1992,1995,1997,2000,2002,2004,2006],{"class":81,"line":1963},66,[79,1965,927],{"class":788},[79,1967,1968],{"class":792}," missing",[79,1970,796],{"class":209},[79,1972,1405],{"class":792},[79,1974,739],{"class":209},[79,1976,1977],{"class":799},"filter",[79,1979,804],{"class":935},[79,1981,804],{"class":209},[79,1983,1984],{"class":912},"lld",[79,1986,814],{"class":209},[79,1988,1087],{"class":1086},[79,1990,1991],{"class":981}," !",[79,1993,1994],{"class":792},"resolved",[79,1996,739],{"class":209},[79,1998,1999],{"class":799},"has",[79,2001,804],{"class":935},[79,2003,1984],{"class":792},[79,2005,1024],{"class":935},[79,2007,817],{"class":209},[79,2009,2011,2013,2015,2018,2020,2022,2025,2027,2029],{"class":81,"line":2010},67,[79,2012,1276],{"class":943},[79,2014,947],{"class":935},[79,2016,2017],{"class":792},"missing",[79,2019,739],{"class":209},[79,2021,974],{"class":973},[79,2023,2024],{"class":209}," >",[79,2026,958],{"class":546},[79,2028,814],{"class":935},[79,2030,344],{"class":209},[79,2032,2034,2036,2038,2041,2043,2045,2047,2049,2051,2053,2055,2058,2060,2062,2064,2066],{"class":81,"line":2033},68,[79,2035,1573],{"class":792},[79,2037,739],{"class":209},[79,2039,2040],{"class":799},"warn",[79,2042,804],{"class":935},[79,2044,1151],{"class":227},[79,2046,1155],{"class":1154},[79,2048,2017],{"class":1158},[79,2050,739],{"class":209},[79,2052,974],{"class":973},[79,2054,1162],{"class":1154},[79,2056,2057],{"class":231}," records returned no results:",[79,2059,1151],{"class":227},[79,2061,308],{"class":209},[79,2063,1968],{"class":792},[79,2065,814],{"class":935},[79,2067,817],{"class":209},[79,2069,2071],{"class":81,"line":2070},69,[79,2072,1031],{"class":209},[79,2074,2076],{"class":81,"line":2075},70,[79,2077,166],{"class":209},[79,2079,2081],{"class":81,"line":2080},71,[79,2082,104],{"emptyLinePlaceholder":103},[79,2084,2086,2089,2091,2093,2096,2098,2101,2103,2106,2108],{"class":81,"line":2085},72,[79,2087,2088],{"class":799},"main",[79,2090,1340],{"class":803},[79,2092,739],{"class":209},[79,2094,2095],{"class":799},"catch",[79,2097,804],{"class":803},[79,2099,2100],{"class":792},"console",[79,2102,739],{"class":209},[79,2104,2105],{"class":792},"error",[79,2107,814],{"class":803},[79,2109,817],{"class":209},[15,2111,2112],{},"Run it with:",[70,2114,2118],{"className":2115,"code":2116,"language":2117,"meta":75,"style":75},"language-bash shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","TOWNSHIP_CANADA_API_KEY=your_key_here node batch-convert.js\n","bash",[59,2119,2120],{"__ignoreMap":75},[79,2121,2122,2124,2127,2130,2134],{"class":81,"line":82},[79,2123,843],{"class":792},[79,2125,2126],{"class":209},"=",[79,2128,2129],{"class":231},"your_key_here",[79,2131,2133],{"class":2132},"sYn-s"," node",[79,2135,2136],{"class":231}," batch-convert.js\n",[15,2138,2139,2140,2142],{},"Your ",[59,2141,772],{}," should be a plain JSON array of LLD strings:",[70,2144,2146],{"className":200,"code":2145,"language":202,"meta":75,"style":75},"[\"NE-7-102-19-W4\", \"SW-12-45-22-W4\", \"1-24-60-1-W5\", \"7-66-4-W6\"]\n",[59,2147,2148],{"__ignoreMap":75},[79,2149,2150,2152,2154,2156,2158,2160,2162,2165,2167,2169,2171,2174,2176,2178,2180,2183,2185],{"class":81,"line":82},[79,2151,1620],{"class":209},[79,2153,222],{"class":227},[79,2155,423],{"class":231},[79,2157,222],{"class":227},[79,2159,308],{"class":209},[79,2161,228],{"class":227},[79,2163,2164],{"class":231},"SW-12-45-22-W4",[79,2166,222],{"class":227},[79,2168,308],{"class":209},[79,2170,228],{"class":227},[79,2172,2173],{"class":231},"1-24-60-1-W5",[79,2175,222],{"class":227},[79,2177,308],{"class":209},[79,2179,228],{"class":227},[79,2181,2182],{"class":231},"7-66-4-W6",[79,2184,222],{"class":227},[79,2186,2187],{"class":209},"]\n",[10,2189,2191],{"id":2190},"python-example","Python Example",[15,2193,2194,2195,2198],{},"The same workflow using the ",[59,2196,2197],{},"requests"," library:",[70,2200,2204],{"className":2201,"code":2202,"language":2203,"meta":75,"style":75},"language-python shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","import json\nimport os\nimport time\n\nimport requests\n\nAPI_KEY = os.environ[\"TOWNSHIP_CANADA_API_KEY\"]\nBASE_URL = \"https:\u002F\u002Fdeveloper.townshipcanada.com\"\nCHUNK_SIZE = 100\nDELAY_SECONDS = 1.1  # slightly over 1 second for Build tier rate limit\n\n\ndef chunk(lst, size):\n    for i in range(0, len(lst), size):\n        yield lst[i : i + size]\n\n\ndef batch_convert(llds):\n    response = requests.post(\n        f\"{BASE_URL}\u002Fbatch\u002Flegal-location\",\n        headers={\n            \"X-API-Key\": API_KEY,\n            \"Content-Type\": \"application\u002Fjson\",\n        },\n        json=llds,\n        timeout=30,\n    )\n    response.raise_for_status()\n    return response.json()\n\n\ndef main():\n    with open(\"input.json\") as f:\n        input_llds = json.load(f)\n\n    print(f\"Processing {len(input_llds)} records...\")\n\n    chunks = list(chunk(input_llds, CHUNK_SIZE))\n    all_features = []\n\n    for i, batch in enumerate(chunks):\n        print(f\"Chunk {i + 1}\u002F{len(chunks)} ({len(batch)} records)\")\n\n        result = batch_convert(batch)\n        all_features.extend(result[\"features\"])\n\n        # Pause between chunks to respect rate limits\n        if i \u003C len(chunks) - 1:\n            time.sleep(DELAY_SECONDS)\n\n    output = {\"type\": \"FeatureCollection\", \"features\": all_features}\n\n    with open(\"output.json\", \"w\") as f:\n        json.dump(output, f, indent=2)\n\n    print(f\"Done. {len(all_features)} features written to output.json\")\n\n    # Identify input records with no matching output\n    resolved = {f[\"properties\"][\"legal_location\"] for f in all_features}\n    missing = [lld for lld in input_llds if lld not in resolved]\n    if missing:\n        print(f\"{len(missing)} records returned no results: {missing}\")\n\n\nif __name__ == \"__main__\":\n    main()\n","python",[59,2205,2206,2215,2222,2229,2233,2240,2244,2271,2283,2293,2306,2310,2314,2334,2371,2393,2397,2401,2414,2432,2453,2461,2476,2494,2499,2510,2522,2527,2540,2553,2557,2561,2570,2596,2617,2621,2652,2656,2682,2692,2696,2718,2774,2778,2793,2818,2822,2827,2851,2867,2871,2909,2913,2944,2973,2977,3006,3010,3015,3057,3095,3103,3138,3142,3146,3165],{"__ignoreMap":75},[79,2207,2208,2211],{"class":81,"line":82},[79,2209,2210],{"class":943},"import",[79,2212,2214],{"class":2213},"sftqT"," json\n",[79,2216,2217,2219],{"class":81,"line":88},[79,2218,2210],{"class":943},[79,2220,2221],{"class":2213}," os\n",[79,2223,2224,2226],{"class":81,"line":94},[79,2225,2210],{"class":943},[79,2227,2228],{"class":2213}," time\n",[79,2230,2231],{"class":81,"line":100},[79,2232,104],{"emptyLinePlaceholder":103},[79,2234,2235,2237],{"class":81,"line":107},[79,2236,2210],{"class":943},[79,2238,2239],{"class":2213}," requests\n",[79,2241,2242],{"class":81,"line":145},[79,2243,104],{"emptyLinePlaceholder":103},[79,2245,2246,2250,2252,2255,2257,2261,2263,2265,2267,2269],{"class":81,"line":151},[79,2247,2249],{"class":2248},"se3Ec","API_KEY",[79,2251,796],{"class":209},[79,2253,2254],{"class":2213}," os",[79,2256,739],{"class":209},[79,2258,2260],{"class":2259},"sBPpx","environ",[79,2262,1620],{"class":209},[79,2264,222],{"class":227},[79,2266,843],{"class":231},[79,2268,222],{"class":227},[79,2270,2187],{"class":209},[79,2272,2273,2275,2277,2279,2281],{"class":81,"line":157},[79,2274,1159],{"class":2248},[79,2276,796],{"class":209},[79,2278,228],{"class":227},[79,2280,61],{"class":231},[79,2282,467],{"class":227},[79,2284,2285,2288,2290],{"class":81,"line":163},[79,2286,2287],{"class":2248},"CHUNK_SIZE",[79,2289,796],{"class":209},[79,2291,2292],{"class":546}," 100\n",[79,2294,2295,2298,2300,2303],{"class":81,"line":388},[79,2296,2297],{"class":2248},"DELAY_SECONDS",[79,2299,796],{"class":209},[79,2301,2302],{"class":546}," 1.1",[79,2304,2305],{"class":894},"  # slightly over 1 second for Build tier rate limit\n",[79,2307,2308],{"class":81,"line":409},[79,2309,104],{"emptyLinePlaceholder":103},[79,2311,2312],{"class":81,"line":430},[79,2313,104],{"emptyLinePlaceholder":103},[79,2315,2316,2319,2321,2323,2327,2329,2331],{"class":81,"line":450},[79,2317,2318],{"class":788},"def",[79,2320,907],{"class":799},[79,2322,804],{"class":209},[79,2324,2326],{"class":2325},"sCyAa","lst",[79,2328,308],{"class":209},[79,2330,918],{"class":2325},[79,2332,2333],{"class":209},"):\n",[79,2335,2336,2339,2342,2345,2349,2351,2354,2356,2359,2361,2364,2367,2369],{"class":81,"line":470},[79,2337,2338],{"class":943},"    for",[79,2340,2341],{"class":2213}," i ",[79,2343,2344],{"class":943},"in",[79,2346,2348],{"class":2347},"sJdAF"," range",[79,2350,804],{"class":209},[79,2352,2353],{"class":546},"0",[79,2355,308],{"class":209},[79,2357,2358],{"class":2347}," len",[79,2360,804],{"class":209},[79,2362,2326],{"class":2363},"siWMO",[79,2365,2366],{"class":209},"),",[79,2368,918],{"class":2363},[79,2370,2333],{"class":209},[79,2372,2373,2376,2379,2381,2383,2385,2387,2389,2391],{"class":81,"line":476},[79,2374,2375],{"class":943},"        yield",[79,2377,2378],{"class":2213}," lst",[79,2380,1620],{"class":209},[79,2382,1589],{"class":2213},[79,2384,62],{"class":209},[79,2386,2341],{"class":2213},[79,2388,1592],{"class":981},[79,2390,918],{"class":2213},[79,2392,2187],{"class":209},[79,2394,2395],{"class":81,"line":482},[79,2396,104],{"emptyLinePlaceholder":103},[79,2398,2399],{"class":81,"line":487},[79,2400,104],{"emptyLinePlaceholder":103},[79,2402,2403,2405,2408,2410,2412],{"class":81,"line":506},[79,2404,2318],{"class":788},[79,2406,2407],{"class":799}," batch_convert",[79,2409,804],{"class":209},[79,2411,1127],{"class":2325},[79,2413,2333],{"class":209},[79,2415,2416,2419,2421,2424,2426,2429],{"class":81,"line":560},[79,2417,2418],{"class":2213},"    response ",[79,2420,2126],{"class":209},[79,2422,2423],{"class":2213}," requests",[79,2425,739],{"class":209},[79,2427,2428],{"class":2363},"post",[79,2430,2431],{"class":209},"(\n",[79,2433,2434,2437,2439,2443,2446,2448,2451],{"class":81,"line":573},[79,2435,2436],{"class":788},"        f",[79,2438,222],{"class":231},[79,2440,2442],{"class":2441},"s3h35","{",[79,2444,1159],{"class":2445},"s6DHA",[79,2447,1162],{"class":2441},[79,2449,2450],{"class":231},"\u002Fbatch\u002Flegal-location\"",[79,2452,236],{"class":209},[79,2454,2455,2458],{"class":81,"line":592},[79,2456,2457],{"class":912},"        headers",[79,2459,2460],{"class":209},"={\n",[79,2462,2463,2466,2468,2470,2472,2474],{"class":81,"line":612},[79,2464,2465],{"class":227},"            \"",[79,2467,1205],{"class":231},[79,2469,222],{"class":227},[79,2471,62],{"class":209},[79,2473,828],{"class":2445},[79,2475,236],{"class":209},[79,2477,2478,2480,2482,2484,2486,2488,2490,2492],{"class":81,"line":631},[79,2479,2465],{"class":227},[79,2481,1220],{"class":231},[79,2483,222],{"class":227},[79,2485,62],{"class":209},[79,2487,228],{"class":227},[79,2489,1229],{"class":231},[79,2491,222],{"class":227},[79,2493,236],{"class":209},[79,2495,2496],{"class":81,"line":650},[79,2497,2498],{"class":209},"        },\n",[79,2500,2501,2504,2506,2508],{"class":81,"line":669},[79,2502,2503],{"class":912},"        json",[79,2505,2126],{"class":209},[79,2507,1127],{"class":2363},[79,2509,236],{"class":209},[79,2511,2512,2515,2517,2520],{"class":81,"line":686},[79,2513,2514],{"class":912},"        timeout",[79,2516,2126],{"class":209},[79,2518,2519],{"class":546},"30",[79,2521,236],{"class":209},[79,2523,2524],{"class":81,"line":691},[79,2525,2526],{"class":209},"    )\n",[79,2528,2529,2532,2534,2537],{"class":81,"line":697},[79,2530,2531],{"class":2213},"    response",[79,2533,739],{"class":209},[79,2535,2536],{"class":2363},"raise_for_status",[79,2538,2539],{"class":209},"()\n",[79,2541,2542,2545,2547,2549,2551],{"class":81,"line":703},[79,2543,2544],{"class":943},"    return",[79,2546,1138],{"class":2213},[79,2548,739],{"class":209},[79,2550,202],{"class":2363},[79,2552,2539],{"class":209},[79,2554,2555],{"class":81,"line":1273},[79,2556,104],{"emptyLinePlaceholder":103},[79,2558,2559],{"class":81,"line":1296},[79,2560,104],{"emptyLinePlaceholder":103},[79,2562,2563,2565,2567],{"class":81,"line":1351},[79,2564,2318],{"class":788},[79,2566,1393],{"class":799},[79,2568,2569],{"class":209},"():\n",[79,2571,2572,2575,2578,2580,2582,2584,2586,2588,2591,2593],{"class":81,"line":1356},[79,2573,2574],{"class":943},"    with",[79,2576,2577],{"class":2347}," open",[79,2579,804],{"class":209},[79,2581,222],{"class":227},[79,2583,772],{"class":231},[79,2585,222],{"class":227},[79,2587,814],{"class":209},[79,2589,2590],{"class":943}," as",[79,2592,1948],{"class":2213},[79,2594,2595],{"class":209},":\n",[79,2597,2598,2601,2603,2606,2608,2611,2613,2615],{"class":81,"line":1361},[79,2599,2600],{"class":2213},"        input_llds ",[79,2602,2126],{"class":209},[79,2604,2605],{"class":2213}," json",[79,2607,739],{"class":209},[79,2609,2610],{"class":2363},"load",[79,2612,804],{"class":209},[79,2614,1941],{"class":2363},[79,2616,1257],{"class":209},[79,2618,2619],{"class":81,"line":1376},[79,2620,104],{"emptyLinePlaceholder":103},[79,2622,2623,2626,2628,2630,2633,2635,2638,2640,2643,2645,2647,2650],{"class":81,"line":1381},[79,2624,2625],{"class":2347},"    print",[79,2627,804],{"class":209},[79,2629,1941],{"class":788},[79,2631,2632],{"class":231},"\"Processing ",[79,2634,2442],{"class":2441},[79,2636,2637],{"class":2347},"len",[79,2639,804],{"class":209},[79,2641,2642],{"class":2363},"input_llds",[79,2644,814],{"class":209},[79,2646,1162],{"class":2441},[79,2648,2649],{"class":231}," records...\"",[79,2651,1257],{"class":209},[79,2653,2654],{"class":81,"line":1386},[79,2655,104],{"emptyLinePlaceholder":103},[79,2657,2658,2661,2663,2666,2668,2671,2673,2675,2677,2679],{"class":81,"line":1400},[79,2659,2660],{"class":2213},"    chunks ",[79,2662,2126],{"class":209},[79,2664,2665],{"class":263}," list",[79,2667,804],{"class":209},[79,2669,2670],{"class":2363},"chunk",[79,2672,804],{"class":209},[79,2674,2642],{"class":2363},[79,2676,308],{"class":209},[79,2678,869],{"class":2445},[79,2680,2681],{"class":209},"))\n",[79,2683,2684,2687,2689],{"class":81,"line":1447},[79,2685,2686],{"class":2213},"    all_features ",[79,2688,2126],{"class":209},[79,2690,2691],{"class":209}," []\n",[79,2693,2694],{"class":81,"line":1485},[79,2695,104],{"emptyLinePlaceholder":103},[79,2697,2698,2700,2702,2704,2707,2709,2712,2714,2716],{"class":81,"line":1490},[79,2699,2338],{"class":943},[79,2701,953],{"class":2213},[79,2703,308],{"class":209},[79,2705,2706],{"class":2213}," batch ",[79,2708,2344],{"class":943},[79,2710,2711],{"class":2347}," enumerate",[79,2713,804],{"class":209},[79,2715,1605],{"class":2363},[79,2717,2333],{"class":209},[79,2719,2720,2723,2725,2727,2730,2732,2734,2736,2738,2740,2742,2744,2746,2748,2750,2752,2754,2756,2758,2760,2762,2765,2767,2769,2772],{"class":81,"line":1513},[79,2721,2722],{"class":2347},"        print",[79,2724,804],{"class":209},[79,2726,1941],{"class":788},[79,2728,2729],{"class":231},"\"Chunk ",[79,2731,2442],{"class":2441},[79,2733,1589],{"class":2363},[79,2735,1592],{"class":981},[79,2737,1595],{"class":546},[79,2739,1162],{"class":2441},[79,2741,1600],{"class":231},[79,2743,2442],{"class":2441},[79,2745,2637],{"class":2347},[79,2747,804],{"class":209},[79,2749,1605],{"class":2363},[79,2751,814],{"class":209},[79,2753,1162],{"class":2441},[79,2755,947],{"class":231},[79,2757,2442],{"class":2441},[79,2759,2637],{"class":2347},[79,2761,804],{"class":209},[79,2763,2764],{"class":2363},"batch",[79,2766,814],{"class":209},[79,2768,1162],{"class":2441},[79,2770,2771],{"class":231}," records)\"",[79,2773,1257],{"class":209},[79,2775,2776],{"class":81,"line":1527},[79,2777,104],{"emptyLinePlaceholder":103},[79,2779,2780,2783,2785,2787,2789,2791],{"class":81,"line":1532},[79,2781,2782],{"class":2213},"        result ",[79,2784,2126],{"class":209},[79,2786,2407],{"class":2363},[79,2788,804],{"class":209},[79,2790,2764],{"class":2363},[79,2792,1257],{"class":209},[79,2794,2795,2798,2800,2803,2805,2807,2809,2811,2813,2815],{"class":81,"line":1570},[79,2796,2797],{"class":2213},"        all_features",[79,2799,739],{"class":209},[79,2801,2802],{"class":2363},"extend",[79,2804,804],{"class":209},[79,2806,1689],{"class":2363},[79,2808,1620],{"class":209},[79,2810,222],{"class":227},[79,2812,243],{"class":231},[79,2814,222],{"class":227},[79,2816,2817],{"class":209},"])\n",[79,2819,2820],{"class":81,"line":1642},[79,2821,104],{"emptyLinePlaceholder":103},[79,2823,2824],{"class":81,"line":1647},[79,2825,2826],{"class":894},"        # Pause between chunks to respect rate limits\n",[79,2828,2829,2832,2834,2837,2839,2841,2843,2845,2847,2849],{"class":81,"line":1675},[79,2830,2831],{"class":943},"        if",[79,2833,2341],{"class":2213},[79,2835,2836],{"class":981},"\u003C",[79,2838,2358],{"class":2347},[79,2840,804],{"class":209},[79,2842,1605],{"class":2363},[79,2844,814],{"class":209},[79,2846,1729],{"class":981},[79,2848,1595],{"class":546},[79,2850,2595],{"class":209},[79,2852,2853,2856,2858,2861,2863,2865],{"class":81,"line":1700},[79,2854,2855],{"class":2213},"            time",[79,2857,739],{"class":209},[79,2859,2860],{"class":2363},"sleep",[79,2862,804],{"class":209},[79,2864,2297],{"class":2445},[79,2866,1257],{"class":209},[79,2868,2869],{"class":81,"line":1705},[79,2870,104],{"emptyLinePlaceholder":103},[79,2872,2873,2876,2878,2880,2882,2884,2886,2888,2890,2892,2894,2896,2898,2900,2902,2904,2907],{"class":81,"line":1711},[79,2874,2875],{"class":2213},"    output ",[79,2877,2126],{"class":209},[79,2879,290],{"class":209},[79,2881,222],{"class":227},[79,2883,219],{"class":231},[79,2885,222],{"class":227},[79,2887,62],{"class":209},[79,2889,228],{"class":227},[79,2891,184],{"class":231},[79,2893,222],{"class":227},[79,2895,308],{"class":209},[79,2897,228],{"class":227},[79,2899,243],{"class":231},[79,2901,222],{"class":227},[79,2903,62],{"class":209},[79,2905,2906],{"class":2213}," all_features",[79,2908,166],{"class":209},[79,2910,2911],{"class":81,"line":1738},[79,2912,104],{"emptyLinePlaceholder":103},[79,2914,2915,2917,2919,2921,2923,2925,2927,2929,2931,2934,2936,2938,2940,2942],{"class":81,"line":1755},[79,2916,2574],{"class":943},[79,2918,2577],{"class":2347},[79,2920,804],{"class":209},[79,2922,222],{"class":227},[79,2924,776],{"class":231},[79,2926,222],{"class":227},[79,2928,308],{"class":209},[79,2930,228],{"class":227},[79,2932,2933],{"class":231},"w",[79,2935,222],{"class":227},[79,2937,814],{"class":209},[79,2939,2590],{"class":943},[79,2941,1948],{"class":2213},[79,2943,2595],{"class":209},[79,2945,2946,2948,2950,2953,2955,2957,2959,2961,2963,2966,2968,2971],{"class":81,"line":1760},[79,2947,2503],{"class":2213},[79,2949,739],{"class":209},[79,2951,2952],{"class":2363},"dump",[79,2954,804],{"class":209},[79,2956,1849],{"class":2363},[79,2958,308],{"class":209},[79,2960,1948],{"class":2363},[79,2962,308],{"class":209},[79,2964,2965],{"class":912}," indent",[79,2967,2126],{"class":209},[79,2969,2970],{"class":546},"2",[79,2972,1257],{"class":209},[79,2974,2975],{"class":81,"line":1765},[79,2976,104],{"emptyLinePlaceholder":103},[79,2978,2979,2981,2983,2985,2988,2990,2992,2994,2997,2999,3001,3004],{"class":81,"line":1770},[79,2980,2625],{"class":2347},[79,2982,804],{"class":209},[79,2984,1941],{"class":788},[79,2986,2987],{"class":231},"\"Done. ",[79,2989,2442],{"class":2441},[79,2991,2637],{"class":2347},[79,2993,804],{"class":209},[79,2995,2996],{"class":2363},"all_features",[79,2998,814],{"class":209},[79,3000,1162],{"class":2441},[79,3002,3003],{"class":231}," features written to output.json\"",[79,3005,1257],{"class":209},[79,3007,3008],{"class":81,"line":1782},[79,3009,104],{"emptyLinePlaceholder":103},[79,3011,3012],{"class":81,"line":1798},[79,3013,3014],{"class":894},"    # Identify input records with no matching output\n",[79,3016,3017,3020,3022,3024,3026,3028,3030,3032,3034,3037,3039,3041,3043,3045,3048,3051,3053,3055],{"class":81,"line":1809},[79,3018,3019],{"class":2213},"    resolved ",[79,3021,2126],{"class":209},[79,3023,290],{"class":209},[79,3025,1941],{"class":2213},[79,3027,1620],{"class":209},[79,3029,222],{"class":227},[79,3031,337],{"class":231},[79,3033,222],{"class":227},[79,3035,3036],{"class":209},"][",[79,3038,222],{"class":227},[79,3040,435],{"class":231},[79,3042,222],{"class":227},[79,3044,555],{"class":209},[79,3046,3047],{"class":943}," for",[79,3049,3050],{"class":2213}," f ",[79,3052,2344],{"class":943},[79,3054,2906],{"class":2213},[79,3056,166],{"class":209},[79,3058,3059,3062,3064,3066,3069,3072,3075,3077,3080,3083,3085,3088,3091,3093],{"class":81,"line":1815},[79,3060,3061],{"class":2213},"    missing ",[79,3063,2126],{"class":209},[79,3065,543],{"class":209},[79,3067,3068],{"class":2213},"lld ",[79,3070,3071],{"class":943},"for",[79,3073,3074],{"class":2213}," lld ",[79,3076,2344],{"class":943},[79,3078,3079],{"class":2213}," input_llds ",[79,3081,3082],{"class":943},"if",[79,3084,3074],{"class":2213},[79,3086,3087],{"class":981},"not",[79,3089,3090],{"class":981}," in",[79,3092,1918],{"class":2213},[79,3094,2187],{"class":209},[79,3096,3097,3099,3101],{"class":81,"line":1820},[79,3098,1714],{"class":943},[79,3100,1968],{"class":2213},[79,3102,2595],{"class":209},[79,3104,3105,3107,3109,3111,3113,3115,3117,3119,3121,3123,3125,3128,3130,3132,3134,3136],{"class":81,"line":1866},[79,3106,2722],{"class":2347},[79,3108,804],{"class":209},[79,3110,1941],{"class":788},[79,3112,222],{"class":231},[79,3114,2442],{"class":2441},[79,3116,2637],{"class":2347},[79,3118,804],{"class":209},[79,3120,2017],{"class":2363},[79,3122,814],{"class":209},[79,3124,1162],{"class":2441},[79,3126,3127],{"class":231}," records returned no results: ",[79,3129,2442],{"class":2441},[79,3131,2017],{"class":2363},[79,3133,1162],{"class":2441},[79,3135,222],{"class":231},[79,3137,1257],{"class":209},[79,3139,3140],{"class":81,"line":1902},[79,3141,104],{"emptyLinePlaceholder":103},[79,3143,3144],{"class":81,"line":1907},[79,3145,104],{"emptyLinePlaceholder":103},[79,3147,3148,3150,3153,3156,3158,3161,3163],{"class":81,"line":1913},[79,3149,3082],{"class":943},[79,3151,3152],{"class":973}," __name__",[79,3154,3155],{"class":981}," ==",[79,3157,228],{"class":227},[79,3159,3160],{"class":231},"__main__",[79,3162,222],{"class":227},[79,3164,2595],{"class":209},[79,3166,3167,3170],{"class":81,"line":1963},[79,3168,3169],{"class":2363},"    main",[79,3171,2539],{"class":209},[15,3173,3174],{},"Install the dependency and run:",[70,3176,3178],{"className":2115,"code":3177,"language":2117,"meta":75,"style":75},"pip install requests\nTOWNSHIP_CANADA_API_KEY=your_key_here python batch_convert.py\n",[59,3179,3180,3190],{"__ignoreMap":75},[79,3181,3182,3185,3188],{"class":81,"line":82},[79,3183,3184],{"class":2132},"pip",[79,3186,3187],{"class":231}," install",[79,3189,2239],{"class":231},[79,3191,3192,3194,3196,3198,3201],{"class":81,"line":88},[79,3193,843],{"class":792},[79,3195,2126],{"class":209},[79,3197,2129],{"class":231},[79,3199,3200],{"class":2132}," python",[79,3202,3203],{"class":231}," batch_convert.py\n",[10,3205,3207],{"id":3206},"rate-limiting","Rate Limiting",[15,3209,3210],{},"Each API tier has a per-second rate limit:",[3212,3213,3214,3230],"table",{},[3215,3216,3217],"thead",{},[3218,3219,3220,3224,3227],"tr",{},[3221,3222,3223],"th",{},"Tier",[3221,3225,3226],{},"Rate Limit",[3221,3228,3229],{},"Monthly Requests",[3231,3232,3233,3245,3256],"tbody",{},[3218,3234,3235,3239,3242],{},[3236,3237,3238],"td",{},"Build",[3236,3240,3241],{},"1 req\u002Fsec",[3236,3243,3244],{},"1,000",[3218,3246,3247,3250,3253],{},[3236,3248,3249],{},"Scale",[3236,3251,3252],{},"5 req\u002Fsec",[3236,3254,3255],{},"10,000",[3218,3257,3258,3261,3264],{},[3236,3259,3260],{},"Enterprise",[3236,3262,3263],{},"25 req\u002Fsec",[3236,3265,3266],{},"100,000",[15,3268,3269],{},"The examples above use a 1.1-second delay between chunks, which works safely on the Build tier. On Scale or Enterprise, you can reduce or remove the delay, or process multiple chunks concurrently. If you receive an HTTP 429 response, back off and retry after a short wait.",[15,3271,3272],{},"For large one-off migrations, running overnight is often the simplest approach - no concurrency required, no risk of hitting limits.",[10,3274,3276],{"id":3275},"next-steps","Next Steps",[26,3278,3279,3284,3291,3298,3305],{},[29,3280,3281,3283],{},[33,3282,49],{"href":48}," - full overview of all endpoints, pricing, and key management",[29,3285,3286,3290],{},[33,3287,3289],{"href":3288},"\u002Fguides\u002Fbatch-conversion","Batch Conversion"," - web interface for batch processing without writing code",[29,3292,3293,3297],{},[33,3294,3296],{"href":3295},"\u002Fguides\u002Fautocomplete-api-guide","Autocomplete API Guide"," - add type-ahead LLD search to your UI",[29,3299,3300,3304],{},[33,3301,3303],{"href":3302},"\u002Fguides\u002Fmaps-api-vector-tiles","Maps API Vector Tiles"," - display DLS\u002FNTS grids in custom mapping applications",[29,3306,3307,3309],{},[33,3308,36],{"href":35}," - subscribe, manage keys, and view request logs",[15,3311,3312,3313,739],{},"For questions or support with your integration, ",[33,3314,3316],{"href":3315},"\u002Fabout","contact us",[3318,3319,3320],"style",{},"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 .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 .skNjk, html code.shiki .skNjk{--shiki-light:#F76D47;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .srjyR, html code.shiki .srjyR{--shiki-light:#90A4AE;--shiki-light-font-style:inherit;--shiki-default:#B31D28;--shiki-default-font-style:italic;--shiki-dark:#FDAEB7;--shiki-dark-font-style:italic}html pre.shiki code .s7CZa, html code.shiki .s7CZa{--shiki-light:#F76D47;--shiki-default:#2F798A;--shiki-dark:#4C9A91}html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sSC40, html code.shiki .sSC40{--shiki-light:#90A4AE;--shiki-default:#B07D48;--shiki-dark:#BD976A}html pre.shiki code .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .snCua, html code.shiki .snCua{--shiki-light:#90A4AE;--shiki-default:#999999;--shiki-dark:#666666}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 .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 .sLdnO, html code.shiki .sLdnO{--shiki-light:#E53935;--shiki-default:#999999;--shiki-dark:#666666}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 .s131V, html code.shiki .s131V{--shiki-light:#90A4AE;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sVsLi, html code.shiki .sVsLi{--shiki-light:#39ADB5;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sIOqK, html code.shiki .sIOqK{--shiki-light:#9C3EDA;--shiki-default:#999999;--shiki-dark:#666666}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 .suXOh, html code.shiki .suXOh{--shiki-light:#E53935;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sQtxO, html code.shiki .sQtxO{--shiki-light:#E53935;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .sYn-s, html code.shiki .sYn-s{--shiki-light:#E2931D;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .sftqT, html code.shiki .sftqT{--shiki-light:#90A4AE;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .se3Ec, html code.shiki .se3Ec{--shiki-light:#90A4AE;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .sBPpx, html code.shiki .sBPpx{--shiki-light:#E53935;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sCyAa, html code.shiki .sCyAa{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#393A34;--shiki-default-font-style:inherit;--shiki-dark:#DBD7CAEE;--shiki-dark-font-style:inherit}html pre.shiki code .sJdAF, html code.shiki .sJdAF{--shiki-light:#6182B8;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .siWMO, html code.shiki .siWMO{--shiki-light:#6182B8;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .s3h35, html code.shiki .s3h35{--shiki-light:#F76D47;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .s6DHA, html code.shiki .s6DHA{--shiki-light:#6182B8;--shiki-default:#A65E2B;--shiki-dark:#C99076}",{"title":75,"searchDepth":88,"depth":88,"links":3322},[3323,3324,3325,3328,3329,3330,3331,3332,3333],{"id":12,"depth":88,"text":13},{"id":23,"depth":88,"text":24},{"id":53,"depth":88,"text":54,"children":3326},[3327],{"id":177,"depth":94,"text":178},{"id":745,"depth":88,"text":746},{"id":755,"depth":88,"text":756},{"id":765,"depth":88,"text":766},{"id":2190,"depth":88,"text":2191},{"id":3206,"depth":88,"text":3207},{"id":3275,"depth":88,"text":3276},"api","Convert hundreds or thousands of legal land descriptions to GPS coordinates using the Township Canada Batch API. Includes chunking, error handling, and examples in Node.js and Python.",false,"md","i-lucide-database",{},"\u002Fguides\u002Fbatch-api-guide",{"title":5,"description":3335},"guides\u002Fbatch-api-guide","FRYYAzxUQUAjQx9n0ZNgsXbReG0TSjKNenMZuO_AkfA",[3345,3817,4682],{"id":3346,"title":3347,"body":3348,"category":3334,"description":3811,"draft":3336,"extension":3337,"icon":3812,"meta":3813,"navigation":103,"order":82,"path":48,"seo":3814,"stem":3815,"__hash__":3816},"guides\u002Fguides\u002Fapi-integration.md","Legal Land Description API Integration Guide",{"type":7,"value":3349,"toc":3776},[3350,3353,3360,3364,3392,3399,3403,3406,3410,3413,3419,3423,3426,3431,3435,3438,3443,3447,3450,3455,3459,3462,3467,3520,3526,3576,3579,3583,3587,3590,3594,3597,3601,3604,3608,3611,3615,3618,3622,3663,3667,3673,3693,3697,3700,3703,3706,3710,3713,3717,3720,3724,3734,3738,3768],[15,3351,3352],{},"Integrate Township Canada's legal land description services directly into your applications and workflows. Our REST APIs enable LLD-to-coordinate conversion, autocomplete search, batch processing, and interactive grid maps-all with simple JSON responses.",[15,3354,3355],{},[3356,3357],"img",{"alt":3358,"src":3359},"Developer Portal","\u002Fimages\u002Fguides\u002Fapi-portal.webp",[10,3361,3363],{"id":3362},"quick-start","Quick start",[3365,3366,3367,3371,3378,3382,3385,3389],"steps",{},[175,3368,3370],{"id":3369},"get-an-api-key","Get an API key",[15,3372,3373,3374,3377],{},"Log into your Township Canada account and go to ",[66,3375,3376],{},"API"," in the main navigation. Subscribe to an API endpoint and create your first API key.",[175,3379,3381],{"id":3380},"make-your-first-request","Make your first request",[15,3383,3384],{},"Add your API key to the request header and make a test request.",[175,3386,3388],{"id":3387},"parse-the-response","Parse the response",[15,3390,3391],{},"All APIs return JSON with coordinates, legal descriptions, and metadata.",[15,3393,3394,3395,739],{},"For full documentation and code examples, visit the ",[33,3396,3398],{"href":3397},"\u002Fapi","API documentation",[10,3400,3402],{"id":3401},"api-endpoints","API endpoints",[15,3404,3405],{},"Township Canada offers four distinct API endpoints:",[175,3407,3409],{"id":3408},"search-api-20month","Search API ($20\u002Fmonth)",[15,3411,3412],{},"Convert legal land descriptions to geographic coordinates and vice versa. Supports DLS, NTS, Geographic Townships, and FPS formats.",[15,3414,3415,3418],{},[66,3416,3417],{},"Use cases",": Property lookup, coordinate conversion, reverse geocoding",[175,3420,3422],{"id":3421},"autocomplete-api-20month","Autocomplete API ($20\u002Fmonth)",[15,3424,3425],{},"Search legal land descriptions with partial text. Returns up to 10 matching results with coordinates-ideal for search boxes and type-ahead interfaces.",[15,3427,3428,3430],{},[66,3429,3417],{},": Search boxes, type-ahead, field validation",[175,3432,3434],{"id":3433},"batch-api-40month","Batch API ($40\u002Fmonth)",[15,3436,3437],{},"Process up to 100 records per request. Convert lists of legal land descriptions to coordinates or coordinates to legal land descriptions.",[15,3439,3440,3442],{},[66,3441,3417],{},": Bulk data processing, migration, spatial analysis",[175,3444,3446],{"id":3445},"maps-api-20month","Maps API ($20\u002Fmonth)",[15,3448,3449],{},"Display legal survey grids on maps in your web or mobile applications. Vector tiles format compatible with Mapbox GL, Leaflet, and other mapping libraries.",[15,3451,3452,3454],{},[66,3453,3417],{},": Custom mapping applications, data visualization",[10,3456,3458],{"id":3457},"api-pricing-tiers","API pricing tiers",[15,3460,3461],{},"Each API offers three pricing tiers:",[15,3463,3464],{},[66,3465,3466],{},"Search, Autocomplete & Batch APIs",[3212,3468,3469,3482],{},[3215,3470,3471],{},[3218,3472,3473,3475,3477,3479],{},[3221,3474,3223],{},[3221,3476,3229],{},[3221,3478,3226],{},[3221,3480,3481],{},"Price",[3231,3483,3484,3496,3508],{},[3218,3485,3486,3488,3490,3493],{},[3236,3487,3238],{},[3236,3489,3244],{},[3236,3491,3492],{},"1\u002Fsec",[3236,3494,3495],{},"$20-40\u002Fmo",[3218,3497,3498,3500,3502,3505],{},[3236,3499,3249],{},[3236,3501,3255],{},[3236,3503,3504],{},"5\u002Fsec",[3236,3506,3507],{},"$100-200\u002Fmo",[3218,3509,3510,3512,3514,3517],{},[3236,3511,3260],{},[3236,3513,3266],{},[3236,3515,3516],{},"25\u002Fsec",[3236,3518,3519],{},"$500-1,000\u002Fmo",[15,3521,3522,3525],{},[66,3523,3524],{},"Maps API"," (higher request quotas for tile rendering)",[3212,3527,3528,3540],{},[3215,3529,3530],{},[3218,3531,3532,3534,3536,3538],{},[3221,3533,3223],{},[3221,3535,3229],{},[3221,3537,3226],{},[3221,3539,3481],{},[3231,3541,3542,3553,3564],{},[3218,3543,3544,3546,3548,3550],{},[3236,3545,3238],{},[3236,3547,3255],{},[3236,3549,3492],{},[3236,3551,3552],{},"$20\u002Fmo",[3218,3554,3555,3557,3559,3561],{},[3236,3556,3249],{},[3236,3558,3266],{},[3236,3560,3504],{},[3236,3562,3563],{},"$100\u002Fmo",[3218,3565,3566,3568,3571,3573],{},[3236,3567,3260],{},[3236,3569,3570],{},"1,000,000",[3236,3572,3516],{},[3236,3574,3575],{},"$500\u002Fmo",[15,3577,3578],{},"Annual billing saves two months compared to monthly billing.",[10,3580,3582],{"id":3581},"common-integration-patterns","Common integration patterns",[175,3584,3586],{"id":3585},"real-estate-applications","Real Estate Applications",[15,3588,3589],{},"Add legal land description lookup to property search interfaces. Use the Autocomplete API for type-ahead search and the Search API for coordinate conversion.",[175,3591,3593],{"id":3592},"oil-gas-software","Oil & Gas Software",[15,3595,3596],{},"Integrate batch conversion for well location management. Use the Maps API to display DLS\u002FNTS grids in custom mapping applications.",[175,3598,3600],{"id":3599},"mobile-field-apps","Mobile Field Apps",[15,3602,3603],{},"Add LLD search and coordinate conversion for field workers. The APIs work with any mobile development framework (React Native, Flutter, native iOS\u002FAndroid).",[175,3605,3607],{"id":3606},"gis-platforms","GIS Platforms",[15,3609,3610],{},"Enhance ArcGIS, QGIS, or custom GIS tools with legal land description support. Batch API enables bulk coordinate conversion for spatial analysis.",[175,3612,3614],{"id":3613},"agriculture-technology","Agriculture Technology",[15,3616,3617],{},"Add quarter section and LSD lookup to farm management software. Combine with soil and boundary data for precision agriculture applications.",[10,3619,3621],{"id":3620},"getting-an-api-key","Getting an API key",[3365,3623,3624,3628,3634,3638,3641,3645,3652,3656],{},[175,3625,3627],{"id":3626},"open-the-developer-portal","Open the Developer Portal",[15,3629,3630,3631,3633],{},"Go to ",[66,3632,3376],{}," in the main navigation to access the Developer Portal.",[175,3635,3637],{"id":3636},"subscribe-to-an-api","Subscribe to an API",[15,3639,3640],{},"Click on the API you want to use (Search, Autocomplete, Batch, or Maps). Select a tier and complete payment.",[175,3642,3644],{"id":3643},"create-an-api-key","Create an API key",[15,3646,3647,3648,3651],{},"Click ",[66,3649,3650],{},"+ Add Key"," and give your key a descriptive name. Copy the key immediately-it won't be shown again.",[175,3653,3655],{"id":3654},"use-your-key","Use your key",[15,3657,3658,3659,3662],{},"Include the API key in the ",[59,3660,3661],{},"x-api-key"," header for all requests.",[10,3664,3666],{"id":3665},"managing-api-subscriptions","Managing API subscriptions",[15,3668,3669,3670,3672],{},"Manage your API subscriptions from the ",[66,3671,3376],{}," page in the main navigation. The Developer Portal provides:",[26,3674,3675,3681,3687],{},[29,3676,3677,3680],{},[66,3678,3679],{},"Overview",": View all your API keys and subscriptions",[29,3682,3683,3686],{},[66,3684,3685],{},"Logs",": Monitor API requests with timestamps and response codes",[29,3688,3689,3692],{},[66,3690,3691],{},"Alerts",": Configure usage threshold notifications",[175,3694,3696],{"id":3695},"usage-monitoring","Usage monitoring",[15,3698,3699],{},"Track your API usage in real-time from the Overview tab. Usage resets at the start of each billing period.",[175,3701,3702],{"id":3206},"Rate limiting",[15,3704,3705],{},"Exceeding your rate limit results in HTTP 429 Too Many Requests responses. Implement exponential backoff in your integration to handle rate limits gracefully.",[175,3707,3709],{"id":3708},"quota-management","Quota management",[15,3711,3712],{},"When you reach your monthly quota, requests return HTTP 429 until the next billing cycle. Upgrade your tier for higher quotas or implement caching to reduce request volume.",[10,3714,3716],{"id":3715},"code-examples","Code examples",[15,3718,3719],{},"Access code examples in JavaScript, Python, and cURL from the Developer Portal. Each API endpoint includes ready-to-use code snippets you can copy and customize.",[10,3721,3723],{"id":3722},"checking-system-health","Checking system health",[15,3725,3726,3727,3733],{},"For the current status of Township Canada's APIs, including uptime, response time, and incident history, visit ",[33,3728,3732],{"href":3729,"rel":3730},"https:\u002F\u002Fstatus.townshipcanada.com",[3731],"nofollow","status.townshipcanada.com",". This site provides real-time updates on API system health.",[10,3735,3737],{"id":3736},"related-guides","Related guides",[26,3739,3740,3747,3752,3759],{},[29,3741,3742,3746],{},[33,3743,3745],{"href":3744},"\u002Fguides\u002Faccount-management","Account Management"," - Manage billing for API subscriptions",[29,3748,3749,3751],{},[33,3750,3289],{"href":3288}," - Web interface for batch processing",[29,3753,3754,3758],{},[33,3755,3757],{"href":3756},"\u002Fguides\u002Fmap","Interactive Maps"," - Map features available through the Maps API",[29,3760,3761,3767],{},[33,3762,3764],{"href":3763},"\u002Fblog\u002Ftownshipcanada-sdk-typescript-npm-package",[59,3765,3766],{},"townshipcanada"," - Official TypeScript SDK for Node.js developers",[15,3769,3770,3771,3775],{},"Need help with your integration? ",[33,3772,3774],{"href":3773},"\u002Fcontact-us","Contact us"," for technical support and custom API solutions.",{"title":75,"searchDepth":88,"depth":88,"links":3777},[3778,3783,3789,3790,3797,3803,3808,3809,3810],{"id":3362,"depth":88,"text":3363,"children":3779},[3780,3781,3782],{"id":3369,"depth":94,"text":3370},{"id":3380,"depth":94,"text":3381},{"id":3387,"depth":94,"text":3388},{"id":3401,"depth":88,"text":3402,"children":3784},[3785,3786,3787,3788],{"id":3408,"depth":94,"text":3409},{"id":3421,"depth":94,"text":3422},{"id":3433,"depth":94,"text":3434},{"id":3445,"depth":94,"text":3446},{"id":3457,"depth":88,"text":3458},{"id":3581,"depth":88,"text":3582,"children":3791},[3792,3793,3794,3795,3796],{"id":3585,"depth":94,"text":3586},{"id":3592,"depth":94,"text":3593},{"id":3599,"depth":94,"text":3600},{"id":3606,"depth":94,"text":3607},{"id":3613,"depth":94,"text":3614},{"id":3620,"depth":88,"text":3621,"children":3798},[3799,3800,3801,3802],{"id":3626,"depth":94,"text":3627},{"id":3636,"depth":94,"text":3637},{"id":3643,"depth":94,"text":3644},{"id":3654,"depth":94,"text":3655},{"id":3665,"depth":88,"text":3666,"children":3804},[3805,3806,3807],{"id":3695,"depth":94,"text":3696},{"id":3206,"depth":94,"text":3702},{"id":3708,"depth":94,"text":3709},{"id":3715,"depth":88,"text":3716},{"id":3722,"depth":88,"text":3723},{"id":3736,"depth":88,"text":3737},"Integrate legal land description APIs into your applications. Convert LLDs to coordinates, add autocomplete search, process batch records, and display DLS\u002FNTS grid maps. REST API with JSON responses.","i-lucide-code",{},{"title":3347,"description":3811},"guides\u002Fapi-integration","0skTidP_JHbRyEgb2lLso64Jt5ActydUoBJbxBER46M",{"id":3818,"title":3819,"body":3820,"category":3334,"description":4675,"draft":3336,"extension":3337,"icon":4676,"meta":4677,"navigation":103,"order":409,"path":4678,"seo":4679,"stem":4680,"__hash__":4681},"guides\u002Fguides\u002Fapi-key-management.md","Managing API Keys for Development, Staging, and Production",{"type":7,"value":3821,"toc":4659},[3822,3825,3828,3832,3838,3861,3864,3870,3874,3877,3884,3887,3951,3954,3958,3961,3965,3972,3986,3989,4101,4104,4143,4146,4151,4163,4169,4325,4329,4338,4363,4370,4389,4393,4396,4422,4425,4429,4432,4436,4439,4463,4466,4561,4564,4568,4571,4574,4577,4581,4584,4599,4605,4611,4617,4623,4625,4656],[15,3823,3824],{},"Most API integrations span multiple environments-local development, a staging server, and production. Using a single API key across all three creates problems: one accidental revocation takes everything down, you can't track which environment is generating traffic, and debugging becomes harder when all requests look identical in the logs.",[15,3826,3827],{},"Township Canada lets you create unlimited API keys on paid plans. The recommended approach is one key per environment, per project.",[10,3829,3831],{"id":3830},"creating-api-keys","Creating API keys",[15,3833,3834,3835,3837],{},"API keys are managed from the ",[33,3836,3358],{"href":35},". To create a new key:",[3839,3840,3841,3846,3850,3853,3858],"ol",{},[29,3842,3630,3843,3845],{},[66,3844,3376],{}," in the main navigation",[29,3847,3647,3848],{},[66,3849,3650],{},[29,3851,3852],{},"Enter a descriptive name (see naming conventions below)",[29,3854,3647,3855],{},[66,3856,3857],{},"Create",[29,3859,3860],{},"Copy the key immediately - it will not be shown again",[15,3862,3863],{},"Each key displays its name, creation date, and last-used timestamp. Keys can be revoked individually without affecting any other key on your account.",[3865,3866,3867],"warning",{},[15,3868,3869],{},"Copy your key before closing the dialog. Township Canada does not store the full key value after creation. If you lose it, revoke the key and create a new one.",[10,3871,3873],{"id":3872},"naming-conventions","Naming conventions",[15,3875,3876],{},"A consistent naming pattern makes it easy to identify keys at a glance, especially once you have several. Use the format:",[70,3878,3882],{"className":3879,"code":3881,"language":1337},[3880],"language-text","{Environment} - {Project} {Version}\n",[59,3883,3881],{"__ignoreMap":75},[15,3885,3886],{},"Examples:",[3212,3888,3889,3899],{},[3215,3890,3891],{},[3218,3892,3893,3896],{},[3221,3894,3895],{},"Key name",[3221,3897,3898],{},"What it's for",[3231,3900,3901,3911,3921,3931,3941],{},[3218,3902,3903,3908],{},[3236,3904,3905],{},[59,3906,3907],{},"Production - Well Mapper v2",[3236,3909,3910],{},"Live production traffic for version 2 of your app",[3218,3912,3913,3918],{},[3236,3914,3915],{},[59,3916,3917],{},"Staging - Well Mapper v2",[3236,3919,3920],{},"Pre-release testing against real data",[3218,3922,3923,3928],{},[3236,3924,3925],{},[59,3926,3927],{},"Dev - Local Testing",[3236,3929,3930],{},"Your local development environment",[3218,3932,3933,3938],{},[3236,3934,3935],{},[59,3936,3937],{},"CI - Well Mapper",[3236,3939,3940],{},"Automated tests in your CI pipeline",[3218,3942,3943,3948],{},[3236,3944,3945],{},[59,3946,3947],{},"Dev - Jane Smith",[3236,3949,3950],{},"A team member's personal development key",[15,3952,3953],{},"Avoid generic names like \"API Key 1\" or \"Test Key\". When you're reviewing keys six months from now, a descriptive name tells you exactly what to keep and what to revoke.",[10,3955,3957],{"id":3956},"environment-variable-setup","Environment variable setup",[15,3959,3960],{},"Never hardcode an API key in your source code. Use environment variables so keys stay out of version control.",[175,3962,3964],{"id":3963},"nodejs","Node.js",[15,3966,3967,3968,3971],{},"Create a ",[59,3969,3970],{},".env"," file in your project root:",[70,3973,3975],{"className":2115,"code":3974,"language":2117,"meta":75,"style":75},"TOWNSHIP_CANADA_API_KEY=tc_live_your_key_here\n",[59,3976,3977],{"__ignoreMap":75},[79,3978,3979,3981,3983],{"class":81,"line":82},[79,3980,843],{"class":792},[79,3982,2126],{"class":209},[79,3984,3985],{"class":231},"tc_live_your_key_here\n",[15,3987,3988],{},"Load and use it in your application:",[70,3990,3992],{"className":779,"code":3991,"language":781,"meta":75,"style":75},"\u002F\u002F Make sure dotenv is loaded early (e.g., in your entry file)\nrequire(\"dotenv\").config();\n\nconst response = await fetch(\n  \"https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location?location=NW-36-42-3-W5\",\n  {\n    headers: {\n      \"X-API-Key\": process.env.TOWNSHIP_CANADA_API_KEY\n    }\n  }\n);\n",[59,3993,3994,3999,4024,4028,4042,4053,4058,4066,4087,4091,4095],{"__ignoreMap":75},[79,3995,3996],{"class":81,"line":82},[79,3997,3998],{"class":894},"\u002F\u002F Make sure dotenv is loaded early (e.g., in your entry file)\n",[79,4000,4001,4004,4006,4008,4011,4013,4015,4017,4020,4022],{"class":81,"line":88},[79,4002,4003],{"class":799},"require",[79,4005,804],{"class":803},[79,4007,222],{"class":227},[79,4009,4010],{"class":231},"dotenv",[79,4012,222],{"class":227},[79,4014,814],{"class":803},[79,4016,739],{"class":209},[79,4018,4019],{"class":799},"config",[79,4021,1340],{"class":803},[79,4023,817],{"class":209},[79,4025,4026],{"class":81,"line":94},[79,4027,104],{"emptyLinePlaceholder":103},[79,4029,4030,4032,4034,4036,4038,4040],{"class":81,"line":100},[79,4031,789],{"class":788},[79,4033,1138],{"class":792},[79,4035,796],{"class":209},[79,4037,1143],{"class":943},[79,4039,1146],{"class":799},[79,4041,2431],{"class":803},[79,4043,4044,4046,4049,4051],{"class":81,"line":107},[79,4045,215],{"class":227},[79,4047,4048],{"class":231},"https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location?location=NW-36-42-3-W5",[79,4050,222],{"class":227},[79,4052,236],{"class":209},[79,4054,4055],{"class":81,"line":145},[79,4056,4057],{"class":209},"  {\n",[79,4059,4060,4062,4064],{"class":81,"line":151},[79,4061,1193],{"class":1176},[79,4063,62],{"class":209},[79,4065,344],{"class":209},[79,4067,4068,4070,4072,4074,4076,4078,4080,4082,4084],{"class":81,"line":157},[79,4069,260],{"class":227},[79,4071,1205],{"class":1204},[79,4073,222],{"class":227},[79,4075,62],{"class":209},[79,4077,833],{"class":792},[79,4079,739],{"class":209},[79,4081,838],{"class":792},[79,4083,739],{"class":209},[79,4085,4086],{"class":792},"TOWNSHIP_CANADA_API_KEY\n",[79,4088,4089],{"class":81,"line":163},[79,4090,694],{"class":209},[79,4092,4093],{"class":81,"line":388},[79,4094,1031],{"class":209},[79,4096,4097,4099],{"class":81,"line":409},[79,4098,814],{"class":803},[79,4100,817],{"class":209},[15,4102,4103],{},"For the Maps API tiles, pass the key as a query parameter instead:",[70,4105,4107],{"className":779,"code":4106,"language":781,"meta":75,"style":75},"const tileUrl = `https:\u002F\u002Fmaps.townshipcanada.com\u002Fgrid\u002Fdls\u002Ftwp\u002F{z}\u002F{x}\u002F{y}.mvt?api_key=${process.env.TOWNSHIP_CANADA_API_KEY}`;\n",[59,4108,4109],{"__ignoreMap":75},[79,4110,4111,4113,4116,4118,4121,4124,4126,4129,4131,4133,4135,4137,4139,4141],{"class":81,"line":82},[79,4112,789],{"class":788},[79,4114,4115],{"class":792}," tileUrl",[79,4117,796],{"class":209},[79,4119,4120],{"class":227}," `",[79,4122,4123],{"class":231},"https:\u002F\u002Fmaps.townshipcanada.com\u002Fgrid\u002Fdls\u002Ftwp\u002F{z}\u002F{x}\u002F{y}.mvt?api_key=",[79,4125,1155],{"class":1154},[79,4127,4128],{"class":1158},"process",[79,4130,739],{"class":209},[79,4132,838],{"class":1158},[79,4134,739],{"class":209},[79,4136,843],{"class":1158},[79,4138,1162],{"class":1154},[79,4140,1151],{"class":227},[79,4142,817],{"class":209},[175,4144,4145],{"id":2203},"Python",[15,4147,3967,4148,4150],{},[59,4149,3970],{}," file:",[70,4152,4153],{"className":2115,"code":3974,"language":2117,"meta":75,"style":75},[59,4154,4155],{"__ignoreMap":75},[79,4156,4157,4159,4161],{"class":81,"line":82},[79,4158,843],{"class":792},[79,4160,2126],{"class":209},[79,4162,3985],{"class":231},[15,4164,4165,4166,62],{},"Load it using ",[59,4167,4168],{},"python-dotenv",[70,4170,4172],{"className":2201,"code":4171,"language":2203,"meta":75,"style":75},"import os\nfrom dotenv import load_dotenv\nimport requests\n\nload_dotenv()\n\napi_key = os.environ.get('TOWNSHIP_CANADA_API_KEY')\n\nresponse = requests.get(\n    'https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location',\n    headers={'X-API-Key': api_key},\n    params={'location': '10-15-23-4-W4'}\n)\n",[59,4173,4174,4180,4193,4199,4203,4210,4214,4243,4247,4262,4274,4295,4321],{"__ignoreMap":75},[79,4175,4176,4178],{"class":81,"line":82},[79,4177,2210],{"class":943},[79,4179,2221],{"class":2213},[79,4181,4182,4185,4188,4190],{"class":81,"line":88},[79,4183,4184],{"class":943},"from",[79,4186,4187],{"class":2213}," dotenv ",[79,4189,2210],{"class":943},[79,4191,4192],{"class":2213}," load_dotenv\n",[79,4194,4195,4197],{"class":81,"line":94},[79,4196,2210],{"class":943},[79,4198,2239],{"class":2213},[79,4200,4201],{"class":81,"line":100},[79,4202,104],{"emptyLinePlaceholder":103},[79,4204,4205,4208],{"class":81,"line":107},[79,4206,4207],{"class":2363},"load_dotenv",[79,4209,2539],{"class":209},[79,4211,4212],{"class":81,"line":145},[79,4213,104],{"emptyLinePlaceholder":103},[79,4215,4216,4219,4221,4223,4225,4227,4229,4232,4234,4237,4239,4241],{"class":81,"line":151},[79,4217,4218],{"class":2213},"api_key ",[79,4220,2126],{"class":209},[79,4222,2254],{"class":2213},[79,4224,739],{"class":209},[79,4226,2260],{"class":2259},[79,4228,739],{"class":209},[79,4230,4231],{"class":2363},"get",[79,4233,804],{"class":209},[79,4235,4236],{"class":227},"'",[79,4238,843],{"class":231},[79,4240,4236],{"class":227},[79,4242,1257],{"class":209},[79,4244,4245],{"class":81,"line":157},[79,4246,104],{"emptyLinePlaceholder":103},[79,4248,4249,4252,4254,4256,4258,4260],{"class":81,"line":163},[79,4250,4251],{"class":2213},"response ",[79,4253,2126],{"class":209},[79,4255,2423],{"class":2213},[79,4257,739],{"class":209},[79,4259,4231],{"class":2363},[79,4261,2431],{"class":209},[79,4263,4264,4267,4270,4272],{"class":81,"line":388},[79,4265,4266],{"class":227},"    '",[79,4268,4269],{"class":231},"https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location",[79,4271,4236],{"class":227},[79,4273,236],{"class":209},[79,4275,4276,4278,4281,4283,4285,4287,4289,4292],{"class":81,"line":409},[79,4277,1193],{"class":912},[79,4279,4280],{"class":209},"={",[79,4282,4236],{"class":227},[79,4284,1205],{"class":231},[79,4286,4236],{"class":227},[79,4288,62],{"class":209},[79,4290,4291],{"class":2363}," api_key",[79,4293,4294],{"class":209},"},\n",[79,4296,4297,4300,4302,4304,4307,4309,4311,4314,4317,4319],{"class":81,"line":430},[79,4298,4299],{"class":912},"    params",[79,4301,4280],{"class":209},[79,4303,4236],{"class":227},[79,4305,4306],{"class":231},"location",[79,4308,4236],{"class":227},[79,4310,62],{"class":209},[79,4312,4313],{"class":227}," '",[79,4315,4316],{"class":231},"10-15-23-4-W4",[79,4318,4236],{"class":227},[79,4320,166],{"class":209},[79,4322,4323],{"class":81,"line":450},[79,4324,1257],{"class":209},[175,4326,4328],{"id":4327},"keeping-keys-out-of-git","Keeping keys out of git",[15,4330,4331,4332,4334,4335,4150],{},"Add ",[59,4333,3970],{}," to your ",[59,4336,4337],{},".gitignore",[70,4339,4341],{"className":2115,"code":4340,"language":2117,"meta":75,"style":75},"# .gitignore\n.env\n.env.local\n.env.*.local\n",[59,4342,4343,4348,4353,4358],{"__ignoreMap":75},[79,4344,4345],{"class":81,"line":82},[79,4346,4347],{"class":894},"# .gitignore\n",[79,4349,4350],{"class":81,"line":88},[79,4351,4352],{"class":2132},".env\n",[79,4354,4355],{"class":81,"line":94},[79,4356,4357],{"class":2132},".env.local\n",[79,4359,4360],{"class":81,"line":100},[79,4361,4362],{"class":2132},".env.*.local\n",[15,4364,4365,4366,4369],{},"Commit a ",[59,4367,4368],{},".env.example"," file with placeholder values instead. Other developers on your team know what variables to set without seeing real credentials:",[70,4371,4373],{"className":2115,"code":4372,"language":2117,"meta":75,"style":75},"# .env.example\nTOWNSHIP_CANADA_API_KEY=your_api_key_here\n",[59,4374,4375,4380],{"__ignoreMap":75},[79,4376,4377],{"class":81,"line":82},[79,4378,4379],{"class":894},"# .env.example\n",[79,4381,4382,4384,4386],{"class":81,"line":88},[79,4383,843],{"class":792},[79,4385,2126],{"class":209},[79,4387,4388],{"class":231},"your_api_key_here\n",[10,4390,4392],{"id":4391},"key-rotation-without-downtime","Key rotation without downtime",[15,4394,4395],{},"Rotating a production key requires a brief overlap period where both the old and new key are valid. Follow this sequence:",[3839,4397,4398,4404,4410,4416],{},[29,4399,4400,4403],{},[66,4401,4402],{},"Create the new key"," in the Developer Portal with the same name (add \"v2\" or today's date to distinguish it)",[29,4405,4406,4409],{},[66,4407,4408],{},"Update your deployment"," - set the new key value in your environment variables or secrets manager",[29,4411,4412,4415],{},[66,4413,4414],{},"Deploy and verify"," - confirm requests are succeeding with the new key in your application logs",[29,4417,4418,4421],{},[66,4419,4420],{},"Revoke the old key"," - only after confirming the new key is working",[15,4423,4424],{},"Never revoke the old key before confirming the new one works. A failed deploy with no fallback means downtime.",[10,4426,4428],{"id":4427},"cicd-secrets","CI\u002FCD secrets",[15,4430,4431],{},"Automated pipelines need API keys without human involvement. Store keys in your CI provider's secrets store, not in configuration files.",[175,4433,4435],{"id":4434},"github-actions","GitHub Actions",[15,4437,4438],{},"Add your API key as a repository secret:",[3839,4440,4441,4447,4452,4458],{},[29,4442,3630,4443,4446],{},[66,4444,4445],{},"Settings → Secrets and variables → Actions"," in your GitHub repository",[29,4448,3647,4449],{},[66,4450,4451],{},"New repository secret",[29,4453,4454,4455,4457],{},"Name it ",[59,4456,843],{}," and paste your CI key value",[29,4459,3647,4460],{},[66,4461,4462],{},"Add secret",[15,4464,4465],{},"Reference it in your workflow file:",[70,4467,4471],{"className":4468,"code":4469,"language":4470,"meta":75,"style":75},"language-yaml shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","# .github\u002Fworkflows\u002Ftest.yml\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - name: Run integration tests\n        env:\n          TOWNSHIP_CANADA_API_KEY: ${{ secrets.TOWNSHIP_CANADA_API_KEY }}\n        run: npm test\n","yaml",[59,4472,4473,4478,4485,4492,4502,4509,4522,4534,4541,4551],{"__ignoreMap":75},[79,4474,4475],{"class":81,"line":82},[79,4476,4477],{"class":894},"# .github\u002Fworkflows\u002Ftest.yml\n",[79,4479,4480,4483],{"class":81,"line":88},[79,4481,4482],{"class":1176},"jobs",[79,4484,2595],{"class":209},[79,4486,4487,4490],{"class":81,"line":94},[79,4488,4489],{"class":1176},"  test",[79,4491,2595],{"class":209},[79,4493,4494,4497,4499],{"class":81,"line":100},[79,4495,4496],{"class":1176},"    runs-on",[79,4498,62],{"class":209},[79,4500,4501],{"class":231}," ubuntu-latest\n",[79,4503,4504,4507],{"class":81,"line":107},[79,4505,4506],{"class":1176},"    steps",[79,4508,2595],{"class":209},[79,4510,4511,4514,4517,4519],{"class":81,"line":145},[79,4512,4513],{"class":209},"      -",[79,4515,4516],{"class":1176}," uses",[79,4518,62],{"class":209},[79,4520,4521],{"class":231}," actions\u002Fcheckout@v4\n",[79,4523,4524,4526,4529,4531],{"class":81,"line":151},[79,4525,4513],{"class":209},[79,4527,4528],{"class":1176}," name",[79,4530,62],{"class":209},[79,4532,4533],{"class":231}," Run integration tests\n",[79,4535,4536,4539],{"class":81,"line":157},[79,4537,4538],{"class":1176},"        env",[79,4540,2595],{"class":209},[79,4542,4543,4546,4548],{"class":81,"line":163},[79,4544,4545],{"class":1176},"          TOWNSHIP_CANADA_API_KEY",[79,4547,62],{"class":209},[79,4549,4550],{"class":231}," ${{ secrets.TOWNSHIP_CANADA_API_KEY }}\n",[79,4552,4553,4556,4558],{"class":81,"line":388},[79,4554,4555],{"class":1176},"        run",[79,4557,62],{"class":209},[79,4559,4560],{"class":231}," npm test\n",[15,4562,4563],{},"The same pattern applies to other CI platforms - GitLab CI uses project variables, Bitbucket Pipelines uses repository variables, and CircleCI uses environment variables in project settings. The key principle is the same: the secret is stored in the platform, referenced by name in the config file, and never written to disk or logs.",[10,4565,4567],{"id":4566},"team-key-management","Team key management",[15,4569,4570],{},"On the Business plan, account admins can view all API keys created by team members - including the key name, creator, creation date, and last-used timestamp. This makes it possible to audit which keys are active, identify keys that haven't been used recently, and revoke credentials when a team member leaves.",[15,4572,4573],{},"Individual developers see only their own keys. Admins see keys across the entire team.",[15,4575,4576],{},"If your team uses a shared integration (for example, a company-wide internal tool), create that key under an admin account rather than a personal one. That way the key doesn't become inaccessible if the original creator's account is deactivated.",[10,4578,4580],{"id":4579},"security-practices","Security practices",[15,4582,4583],{},"A few habits that prevent the most common problems:",[15,4585,4586,4589,4590,4592,4593,4598],{},[66,4587,4588],{},"Don't commit keys."," The ",[59,4591,4337],{}," pattern above covers most cases. For extra protection, consider a tool like ",[33,4594,4597],{"href":4595,"rel":4596},"https:\u002F\u002Fgithub.com\u002Fawslabs\u002Fgit-secrets",[3731],"git-secrets"," that scans commits for credential patterns before they're pushed.",[15,4600,4601,4604],{},[66,4602,4603],{},"Use separate keys for separate projects."," If Project A's key is ever compromised, you revoke that key without touching Project B. It also makes usage monitoring cleaner - each key's activity in the logs maps to exactly one project.",[15,4606,4607,4610],{},[66,4608,4609],{},"Rotate keys periodically."," There's no hard rule on frequency, but a yearly rotation for production keys is a reasonable baseline. After a team member departure, rotate any keys they had access to.",[15,4612,4613,4616],{},[66,4614,4615],{},"Delete unused keys."," Old keys from completed projects or former team members are attack surface with no benefit. If a key hasn't been used in 90 days and you don't recognize its purpose, revoke it.",[15,4618,4619,4622],{},[66,4620,4621],{},"Treat keys like passwords."," Don't paste them into chat messages, emails, or support tickets. If you need to share a key temporarily, do it through a password manager or secrets vault.",[10,4624,3737],{"id":3736},[26,4626,4627,4633,4639,4644,4649],{},[29,4628,4629,4632],{},[33,4630,4631],{"href":48},"API Integration"," - Get started with the Township Canada API",[29,4634,4635,4638],{},[33,4636,4637],{"href":3340},"Batch API Guide"," - Process multiple records in a single request",[29,4640,4641,4643],{},[33,4642,3296],{"href":3295}," - Add LLD search suggestions to your app",[29,4645,4646,4648],{},[33,4647,3745],{"href":3744}," - Manage subscriptions and billing",[29,4650,4651,4655],{},[33,4652,4654],{"href":4653},"\u002Fpricing","Pricing"," - API plan tiers and request quotas",[3318,4657,4658],{},"html pre.shiki code .sSC40, html code.shiki .sSC40{--shiki-light:#90A4AE;--shiki-default:#B07D48;--shiki-dark:#BD976A}html pre.shiki code .soVBu, html code.shiki .soVBu{--shiki-light:#39ADB5;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sTbE_, html code.shiki .sTbE_{--shiki-light:#91B859;--shiki-default:#B56959;--shiki-dark:#C98A7D}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 .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .snCua, html code.shiki .snCua{--shiki-light:#90A4AE;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sbYkP, html code.shiki .sbYkP{--shiki-light:#39ADB5;--shiki-default:#B5695977;--shiki-dark:#C98A7D77}html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}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 .suXOh, html code.shiki .suXOh{--shiki-light:#E53935;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sQtxO, html code.shiki .sQtxO{--shiki-light:#E53935;--shiki-default:#B56959;--shiki-dark:#C98A7D}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 .sftqT, html code.shiki .sftqT{--shiki-light:#90A4AE;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .siWMO, html code.shiki .siWMO{--shiki-light:#6182B8;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .sBPpx, html code.shiki .sBPpx{--shiki-light:#E53935;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}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 .sYn-s, html code.shiki .sYn-s{--shiki-light:#E2931D;--shiki-default:#59873A;--shiki-dark:#80A665}",{"title":75,"searchDepth":88,"depth":88,"links":4660},[4661,4662,4663,4668,4669,4672,4673,4674],{"id":3830,"depth":88,"text":3831},{"id":3872,"depth":88,"text":3873},{"id":3956,"depth":88,"text":3957,"children":4664},[4665,4666,4667],{"id":3963,"depth":94,"text":3964},{"id":2203,"depth":94,"text":4145},{"id":4327,"depth":94,"text":4328},{"id":4391,"depth":88,"text":4392},{"id":4427,"depth":88,"text":4428,"children":4670},[4671],{"id":4434,"depth":94,"text":4435},{"id":4566,"depth":88,"text":4567},{"id":4579,"depth":88,"text":4580},{"id":3736,"depth":88,"text":3737},"Create and manage multiple Township Canada API keys for different environments. Naming conventions, key rotation, environment variables, and CI\u002FCD setup.","i-lucide-key-round",{},"\u002Fguides\u002Fapi-key-management",{"title":3819,"description":4675},"guides\u002Fapi-key-management","y5S7M5b-MjrYZXjYnpDKKgJzo3-V9wx-qk4t04QBnso",{"id":4683,"title":4684,"body":4685,"category":3334,"description":5660,"draft":3336,"extension":3337,"icon":5661,"meta":5662,"navigation":103,"order":157,"path":5663,"seo":5664,"stem":5665,"__hash__":5666},"guides\u002Fguides\u002Fapi-troubleshooting.md","API Troubleshooting & Best Practices",{"type":7,"value":4686,"toc":5638},[4687,4693,4697,4701,4729,4735,4740,4757,4790,4793,4797,4802,4835,4839,4865,4869,4875,4880,4885,4898,4902,4905,4910,4921,4926,4957,4961,4972,4977,4995,4999,5006,5041,5045,5049,5154,5232,5236,5444,5448,5451,5457,5461,5464,5521,5524,5538,5542,5546,5553,5556,5559,5591,5595,5602,5604,5635],[15,4688,4689,4692],{},[66,4690,4691],{},"Getting errors from the Township Canada API?"," This guide covers the most common issues developers run into - authentication failures, CORS blocks, rate limits, and unexpected empty responses - with clear fixes for each one.",[10,4694,4696],{"id":4695},"common-errors-and-what-they-mean","Common errors and what they mean",[175,4698,4700],{"id":4699},"forbidden-http-403","Forbidden (HTTP 403)",[70,4702,4704],{"className":200,"code":4703,"language":202,"meta":75,"style":75},"{ \"message\": \"Forbidden\" }\n",[59,4705,4706],{"__ignoreMap":75},[79,4707,4708,4710,4712,4715,4717,4719,4721,4724,4726],{"class":81,"line":82},[79,4709,2442],{"class":209},[79,4711,228],{"class":214},[79,4713,4714],{"class":218},"message",[79,4716,222],{"class":214},[79,4718,62],{"class":209},[79,4720,228],{"class":227},[79,4722,4723],{"class":231},"Forbidden",[79,4725,222],{"class":227},[79,4727,4728],{"class":209}," }\n",[15,4730,4731,4734],{},[66,4732,4733],{},"Cause:"," Your API key is missing, invalid, or not included correctly.",[15,4736,4737],{},[66,4738,4739],{},"Fix:",[3839,4741,4742,4748,4754],{},[29,4743,4744,4745],{},"Confirm your API key exists: go to ",[66,4746,4747],{},"My Account → API Access",[29,4749,4750,4751,4753],{},"Include it in the ",[59,4752,1205],{}," header (not as a URL parameter)",[29,4755,4756],{},"Test with curl:",[70,4758,4760],{"className":2115,"code":4759,"language":2117,"meta":75,"style":75},"curl -H \"X-API-Key: YOUR_KEY\" \\\n  \"https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location?q=SW-25-24-1-W5\"\n",[59,4761,4762,4781],{"__ignoreMap":75},[79,4763,4764,4767,4771,4773,4776,4778],{"class":81,"line":82},[79,4765,4766],{"class":2132},"curl",[79,4768,4770],{"class":4769},"sz9Cv"," -H",[79,4772,228],{"class":227},[79,4774,4775],{"class":231},"X-API-Key: YOUR_KEY",[79,4777,222],{"class":227},[79,4779,4780],{"class":2248}," \\\n",[79,4782,4783,4785,4788],{"class":81,"line":88},[79,4784,215],{"class":227},[79,4786,4787],{"class":231},"https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location?q=SW-25-24-1-W5",[79,4789,467],{"class":227},[15,4791,4792],{},"If you get a valid JSON response, your key works. If you still get Forbidden, the key may have been rotated - generate a new one from your account page.",[175,4794,4796],{"id":4795},"too-many-requests-http-429","Too Many Requests (HTTP 429)",[15,4798,4799,4801],{},[66,4800,4733],{}," You exceeded the rate limit for your API tier.",[3212,4803,4804,4812],{},[3215,4805,4806],{},[3218,4807,4808,4810],{},[3221,4809,3223],{},[3221,4811,3226],{},[3231,4813,4814,4821,4828],{},[3218,4815,4816,4818],{},[3236,4817,3238],{},[3236,4819,4820],{},"1 request\u002Fsecond",[3218,4822,4823,4825],{},[3236,4824,3249],{},[3236,4826,4827],{},"5 requests\u002Fsecond",[3218,4829,4830,4832],{},[3236,4831,3260],{},[3236,4833,4834],{},"25 requests\u002Fsecond",[15,4836,4837],{},[66,4838,4739],{},[26,4840,4841,4852,4859],{},[29,4842,4843,4844,4847,4848,4851],{},"Add a delay between requests: ",[59,4845,4846],{},"await new Promise(r => setTimeout(r, 1000))"," in JavaScript, or ",[59,4849,4850],{},"time.sleep(1)"," in Python",[29,4853,4854,4855,4858],{},"Use the ",[33,4856,4857],{"href":3340},"Batch API"," instead of looping single calls - it processes up to 100 records per request",[29,4860,4861,4862,4864],{},"If you consistently need higher throughput, ",[33,4863,3316],{"href":3773}," about upgrading your tier",[175,4866,4868],{"id":4867},"cors-policy-error","CORS Policy Error",[70,4870,4873],{"className":4871,"code":4872,"language":1337},[3880],"Access to fetch at 'https:\u002F\u002Fdeveloper.townshipcanada.com\u002F...' has been blocked by CORS policy\n",[59,4874,4872],{"__ignoreMap":75},[15,4876,4877,4879],{},[66,4878,4733],{}," You are calling the API directly from a browser (client-side JavaScript). The API is designed for server-to-server calls and does not include CORS headers by default.",[15,4881,4882],{},[66,4883,4884],{},"Fix options:",[3839,4886,4887,4893],{},[29,4888,4889,4892],{},[66,4890,4891],{},"Proxy through your backend"," - Make the API call from your server (Node.js, Python, etc.) and return the result to your frontend",[29,4894,4895,4897],{},[66,4896,3774],{}," - If you need direct browser access, we can add your domain to the CORS allowlist",[175,4899,4901],{"id":4900},"empty-response-no-features","Empty Response (no features)",[15,4903,4904],{},"The API returns a valid HTTP 200 response, but the result contains no features or coordinates.",[15,4906,4907],{},[66,4908,4909],{},"Possible causes:",[26,4911,4912,4915,4918],{},[29,4913,4914],{},"The legal description does not exist (e.g., a township\u002Frange combination that was never surveyed)",[29,4916,4917],{},"The description is at a resolution not supported for that region",[29,4919,4920],{},"Format is slightly wrong - the API is stricter than the web app",[15,4922,4923],{},[66,4924,4925],{},"Debugging steps:",[3839,4927,4928,4936,4946,4949],{},[29,4929,4930,4931,4935],{},"Try the same description in the ",[33,4932,4934],{"href":4933},"\u002Fapp","web app search box"," - does it work there?",[29,4937,4938,4939,4942,4943,814],{},"Check that you included the full meridian (e.g., ",[59,4940,4941],{},"W5"," not just ",[59,4944,4945],{},"5",[29,4947,4948],{},"Verify component ranges: LSD 1–16, Section 1–36, Township 1–126, Range 1–34",[29,4950,4951,4952,4956],{},"Check the ",[33,4953,4955],{"href":4954},"\u002Fguides\u002Fcoverage","Coverage Guide"," for resolution limits by region",[175,4958,4960],{"id":4959},"database-errors-28000-08006","Database Errors (28000, 08006)",[15,4962,4963,4964,4967,4968,4971],{},"Errors with codes like ",[59,4965,4966],{},"28000"," or ",[59,4969,4970],{},"08006"," indicate a service disruption, not an issue with your code.",[15,4973,4974],{},[66,4975,4976],{},"What to do:",[26,4978,4979,4987,4990],{},[29,4980,4951,4981,4986],{},[33,4982,4985],{"href":4983,"rel":4984},"https:\u002F\u002Fstatus.townshipcanada.com\u002F",[3731],"status page"," for incident reports",[29,4988,4989],{},"Wait a few minutes and retry",[29,4991,4992,4993],{},"If the issue persists beyond 15 minutes, ",[33,4994,3316],{"href":3773},[10,4996,4998],{"id":4997},"api-key-setup","API key setup",[15,5000,5001,5002,5005],{},"Quick recap of key setup (see the ",[33,5003,5004],{"href":4678},"full API key management guide"," for details):",[3839,5007,5008,5014,5023,5029,5035],{},[29,5009,5010,5013],{},[66,5011,5012],{},"Find your key:"," My Account → API Access",[29,5015,5016,5019,5020,5022],{},[66,5017,5018],{},"Include in requests:"," Add the ",[59,5021,1205],{}," header to every request",[29,5024,5025,5028],{},[66,5026,5027],{},"Test before coding:"," Use curl or Postman to confirm the key works",[29,5030,5031,5034],{},[66,5032,5033],{},"Name your keys:"," Use descriptive names like \"production-backend\" or \"staging-test\" to keep track of which key is used where",[29,5036,5037,5040],{},[66,5038,5039],{},"Rotate regularly:"," Generate new keys periodically and phase out old ones",[10,5042,5044],{"id":5043},"rate-limiting-best-practices","Rate limiting best practices",[175,5046,5048],{"id":5047},"add-delay-between-requests","Add delay between requests",[70,5050,5052],{"className":779,"code":5051,"language":781,"meta":75,"style":75},"\u002F\u002F JavaScript - simple delay\nfor (const query of queries) {\n  const result = await fetch(url + query, { headers });\n  await new Promise((r) => setTimeout(r, 1000));\n}\n",[59,5053,5054,5059,5080,5115,5150],{"__ignoreMap":75},[79,5055,5056],{"class":81,"line":82},[79,5057,5058],{"class":894},"\u002F\u002F JavaScript - simple delay\n",[79,5060,5061,5063,5065,5067,5070,5073,5076,5078],{"class":81,"line":88},[79,5062,3071],{"class":943},[79,5064,947],{"class":803},[79,5066,789],{"class":788},[79,5068,5069],{"class":792}," query",[79,5071,5072],{"class":981}," of",[79,5074,5075],{"class":792}," queries",[79,5077,814],{"class":803},[79,5079,344],{"class":209},[79,5081,5082,5084,5086,5088,5090,5092,5094,5097,5099,5101,5103,5105,5108,5111,5113],{"class":81,"line":94},[79,5083,927],{"class":788},[79,5085,1653],{"class":792},[79,5087,796],{"class":209},[79,5089,1143],{"class":943},[79,5091,1146],{"class":799},[79,5093,804],{"class":935},[79,5095,5096],{"class":792},"url",[79,5098,1019],{"class":981},[79,5100,5069],{"class":792},[79,5102,308],{"class":209},[79,5104,290],{"class":209},[79,5106,5107],{"class":792}," headers",[79,5109,5110],{"class":209}," }",[79,5112,814],{"class":935},[79,5114,817],{"class":209},[79,5116,5117,5120,5122,5124,5126,5128,5131,5133,5135,5137,5139,5141,5143,5146,5148],{"class":81,"line":100},[79,5118,5119],{"class":943},"  await",[79,5121,1071],{"class":981},[79,5123,1074],{"class":263},[79,5125,804],{"class":935},[79,5127,804],{"class":209},[79,5129,5130],{"class":912},"r",[79,5132,814],{"class":209},[79,5134,1087],{"class":1086},[79,5136,1090],{"class":799},[79,5138,804],{"class":935},[79,5140,5130],{"class":792},[79,5142,308],{"class":209},[79,5144,5145],{"class":546}," 1000",[79,5147,1024],{"class":935},[79,5149,817],{"class":209},[79,5151,5152],{"class":81,"line":107},[79,5153,166],{"class":209},[70,5155,5157],{"className":2201,"code":5156,"language":2203,"meta":75,"style":75},"# Python - simple delay\nimport time\nfor query in queries:\n    result = requests.get(url + query, headers=headers)\n    time.sleep(1)\n",[59,5158,5159,5164,5170,5183,5216],{"__ignoreMap":75},[79,5160,5161],{"class":81,"line":82},[79,5162,5163],{"class":894},"# Python - simple delay\n",[79,5165,5166,5168],{"class":81,"line":88},[79,5167,2210],{"class":943},[79,5169,2228],{"class":2213},[79,5171,5172,5174,5177,5179,5181],{"class":81,"line":94},[79,5173,3071],{"class":943},[79,5175,5176],{"class":2213}," query ",[79,5178,2344],{"class":943},[79,5180,5075],{"class":2213},[79,5182,2595],{"class":209},[79,5184,5185,5188,5190,5192,5194,5196,5198,5201,5203,5205,5207,5209,5211,5214],{"class":81,"line":100},[79,5186,5187],{"class":2213},"    result ",[79,5189,2126],{"class":209},[79,5191,2423],{"class":2213},[79,5193,739],{"class":209},[79,5195,4231],{"class":2363},[79,5197,804],{"class":209},[79,5199,5200],{"class":2363},"url ",[79,5202,1592],{"class":981},[79,5204,5069],{"class":2363},[79,5206,308],{"class":209},[79,5208,5107],{"class":912},[79,5210,2126],{"class":209},[79,5212,5213],{"class":2363},"headers",[79,5215,1257],{"class":209},[79,5217,5218,5221,5223,5225,5227,5230],{"class":81,"line":107},[79,5219,5220],{"class":2213},"    time",[79,5222,739],{"class":209},[79,5224,2860],{"class":2363},[79,5226,804],{"class":209},[79,5228,5229],{"class":546},"1",[79,5231,1257],{"class":209},[175,5233,5235],{"id":5234},"use-exponential-backoff-on-429","Use exponential backoff on 429",[70,5237,5239],{"className":779,"code":5238,"language":781,"meta":75,"style":75},"async function fetchWithBackoff(url, headers, maxRetries = 3) {\n  for (let i = 0; i \u003C maxRetries; i++) {\n    const res = await fetch(url, { headers });\n    if (res.status !== 429) return res;\n    await new Promise((r) => setTimeout(r, 1000 * Math.pow(2, i)));\n  }\n  throw new Error(\"Rate limit exceeded after retries\");\n}\n",[59,5240,5241,5272,5304,5333,5361,5414,5418,5440],{"__ignoreMap":75},[79,5242,5243,5245,5247,5250,5252,5254,5256,5258,5260,5263,5265,5268,5270],{"class":81,"line":82},[79,5244,1116],{"class":788},[79,5246,1119],{"class":788},[79,5248,5249],{"class":799}," fetchWithBackoff",[79,5251,804],{"class":209},[79,5253,5096],{"class":912},[79,5255,308],{"class":209},[79,5257,5107],{"class":912},[79,5259,308],{"class":209},[79,5261,5262],{"class":912}," maxRetries",[79,5264,796],{"class":209},[79,5266,5267],{"class":546}," 3",[79,5269,814],{"class":209},[79,5271,344],{"class":209},[79,5273,5274,5276,5278,5280,5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302],{"class":81,"line":88},[79,5275,944],{"class":943},[79,5277,947],{"class":935},[79,5279,950],{"class":788},[79,5281,953],{"class":792},[79,5283,796],{"class":209},[79,5285,958],{"class":546},[79,5287,891],{"class":209},[79,5289,953],{"class":792},[79,5291,965],{"class":209},[79,5293,5262],{"class":792},[79,5295,891],{"class":209},[79,5297,953],{"class":792},[79,5299,1563],{"class":981},[79,5301,814],{"class":935},[79,5303,344],{"class":209},[79,5305,5306,5308,5311,5313,5315,5317,5319,5321,5323,5325,5327,5329,5331],{"class":81,"line":94},[79,5307,1650],{"class":788},[79,5309,5310],{"class":792}," res",[79,5312,796],{"class":209},[79,5314,1143],{"class":943},[79,5316,1146],{"class":799},[79,5318,804],{"class":935},[79,5320,5096],{"class":792},[79,5322,308],{"class":209},[79,5324,290],{"class":209},[79,5326,5107],{"class":792},[79,5328,5110],{"class":209},[79,5330,814],{"class":935},[79,5332,817],{"class":209},[79,5334,5335,5337,5339,5342,5344,5346,5349,5352,5354,5357,5359],{"class":81,"line":100},[79,5336,1714],{"class":943},[79,5338,947],{"class":935},[79,5340,5341],{"class":792},"res",[79,5343,739],{"class":209},[79,5345,1320],{"class":792},[79,5347,5348],{"class":981}," !==",[79,5350,5351],{"class":546}," 429",[79,5353,814],{"class":935},[79,5355,5356],{"class":943}," return",[79,5358,5310],{"class":792},[79,5360,817],{"class":209},[79,5362,5363,5366,5368,5370,5372,5374,5376,5378,5380,5382,5384,5386,5388,5390,5393,5396,5398,5401,5403,5405,5407,5409,5412],{"class":81,"line":107},[79,5364,5365],{"class":943},"    await",[79,5367,1071],{"class":981},[79,5369,1074],{"class":263},[79,5371,804],{"class":935},[79,5373,804],{"class":209},[79,5375,5130],{"class":912},[79,5377,814],{"class":209},[79,5379,1087],{"class":1086},[79,5381,1090],{"class":799},[79,5383,804],{"class":935},[79,5385,5130],{"class":792},[79,5387,308],{"class":209},[79,5389,5145],{"class":546},[79,5391,5392],{"class":981}," *",[79,5394,5395],{"class":792}," Math",[79,5397,739],{"class":209},[79,5399,5400],{"class":799},"pow",[79,5402,804],{"class":935},[79,5404,2970],{"class":546},[79,5406,308],{"class":209},[79,5408,953],{"class":792},[79,5410,5411],{"class":935},")))",[79,5413,817],{"class":209},[79,5415,5416],{"class":81,"line":145},[79,5417,1031],{"class":209},[79,5419,5420,5423,5425,5427,5429,5431,5434,5436,5438],{"class":81,"line":151},[79,5421,5422],{"class":943},"  throw",[79,5424,1071],{"class":981},[79,5426,1304],{"class":799},[79,5428,804],{"class":935},[79,5430,222],{"class":227},[79,5432,5433],{"class":231},"Rate limit exceeded after retries",[79,5435,222],{"class":227},[79,5437,814],{"class":935},[79,5439,817],{"class":209},[79,5441,5442],{"class":81,"line":157},[79,5443,166],{"class":209},[175,5445,5447],{"id":5446},"use-the-batch-api-for-bulk-work","Use the Batch API for bulk work",[15,5449,5450],{},"Instead of looping 1,000 single calls (which takes 17+ minutes at 1\u002Fsec), use the Batch API to process 100 records per call - the same 1,000 records take 10 calls.",[15,5452,5453,5454,5456],{},"See the ",[33,5455,4637],{"href":3340}," for chunking examples in Node.js and Python.",[10,5458,5460],{"id":5459},"format-differences-web-app-vs-api","Format differences: web app vs. API",[15,5462,5463],{},"The web app's search box is more forgiving than the API:",[3212,5465,5466,5478],{},[3215,5467,5468],{},[3218,5469,5470,5473,5476],{},[3221,5471,5472],{},"Issue",[3221,5474,5475],{},"Web App",[3221,5477,3376],{},[3231,5479,5480,5491,5502,5511],{},[3218,5481,5482,5485,5488],{},[3236,5483,5484],{},"Missing \"W\" on meridian",[3236,5486,5487],{},"May auto-correct",[3236,5489,5490],{},"Returns empty",[3218,5492,5493,5496,5499],{},[3236,5494,5495],{},"Extra spaces",[3236,5497,5498],{},"Handled",[3236,5500,5501],{},"May cause issues",[3218,5503,5504,5507,5509],{},[3236,5505,5506],{},"Mixed case",[3236,5508,5498],{},[3236,5510,5498],{},[3218,5512,5513,5516,5519],{},[3236,5514,5515],{},"Partial descriptions",[3236,5517,5518],{},"Shows suggestions",[3236,5520,5490],{},[15,5522,5523],{},"When building API integrations, always normalize your input first:",[26,5525,5526,5529,5532,5535],{},[29,5527,5528],{},"Include dashes between all components",[29,5530,5531],{},"Add the \"W\" prefix on meridians",[29,5533,5534],{},"Remove extra text, parentheses, and place names",[29,5536,5537],{},"Trim whitespace",[10,5539,5541],{"id":5540},"integration-patterns","Integration patterns",[175,5543,5545],{"id":5544},"caching","Caching",[15,5547,5548,5549,5552],{},"If your application looks up the same legal descriptions repeatedly, cache the results. Legal land descriptions map to fixed coordinates - the result for ",[59,5550,5551],{},"SW-25-24-1-W5"," will not change.",[175,5554,5555],{"id":755},"Error handling",[15,5557,5558],{},"Always handle these response codes:",[26,5560,5561,5567,5573,5579,5585],{},[29,5562,5563,5566],{},[66,5564,5565],{},"200"," - Success, parse the result",[29,5568,5569,5572],{},[66,5570,5571],{},"400"," - Bad request, check your input format",[29,5574,5575,5578],{},[66,5576,5577],{},"403"," - Authentication failed, check your API key",[29,5580,5581,5584],{},[66,5582,5583],{},"429"," - Rate limited, wait and retry",[29,5586,5587,5590],{},[66,5588,5589],{},"500\u002F502\u002F503"," - Server issue, retry after a short delay",[175,5592,5594],{"id":5593},"openapi-spec","OpenAPI spec",[15,5596,5597,5598,5601],{},"Download the OpenAPI specification at ",[33,5599,5600],{"href":5600},"\u002Fopenapi.yaml"," and import it into Postman, Swagger UI, or Insomnia for interactive testing and documentation.",[10,5603,3737],{"id":3736},[26,5605,5606,5611,5617,5624,5629],{},[29,5607,5608,5610],{},[33,5609,49],{"href":48}," - getting started with the API",[29,5612,5613,5616],{},[33,5614,5615],{"href":4678},"API Key Management"," - creating and managing API keys",[29,5618,5619,5623],{},[33,5620,5622],{"href":5621},"\u002Fguides\u002Fsearch-api-guide","Search API Guide"," - single-location lookups",[29,5625,5626,5628],{},[33,5627,4637],{"href":3340}," - bulk conversions",[29,5630,5631,5634],{},[33,5632,5633],{"href":4954},"Coverage & Limitations"," - what regions and resolutions are supported",[3318,5636,5637],{},"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 .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 .sYn-s, html code.shiki .sYn-s{--shiki-light:#E2931D;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .sz9Cv, html code.shiki .sz9Cv{--shiki-light:#91B859;--shiki-default:#A65E2B;--shiki-dark:#C99076}html pre.shiki code .se3Ec, html code.shiki .se3Ec{--shiki-light:#90A4AE;--shiki-default:#A65E2B;--shiki-dark:#C99076}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 .snCua, html code.shiki .snCua{--shiki-light:#90A4AE;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}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 .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .sLdnO, html code.shiki .sLdnO{--shiki-light:#E53935;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sa2tF, html code.shiki .sa2tF{--shiki-light:#E2931D;--shiki-default:#998418;--shiki-dark:#B8A965}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 .sIOqK, html code.shiki .sIOqK{--shiki-light:#9C3EDA;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .s7CZa, html code.shiki .s7CZa{--shiki-light:#F76D47;--shiki-default:#2F798A;--shiki-dark:#4C9A91}html pre.shiki code .sftqT, html code.shiki .sftqT{--shiki-light:#90A4AE;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}html pre.shiki code .siWMO, html code.shiki .siWMO{--shiki-light:#6182B8;--shiki-default:#393A34;--shiki-dark:#DBD7CAEE}",{"title":75,"searchDepth":88,"depth":88,"links":5639},[5640,5647,5648,5653,5654,5659],{"id":4695,"depth":88,"text":4696,"children":5641},[5642,5643,5644,5645,5646],{"id":4699,"depth":94,"text":4700},{"id":4795,"depth":94,"text":4796},{"id":4867,"depth":94,"text":4868},{"id":4900,"depth":94,"text":4901},{"id":4959,"depth":94,"text":4960},{"id":4997,"depth":88,"text":4998},{"id":5043,"depth":88,"text":5044,"children":5649},[5650,5651,5652],{"id":5047,"depth":94,"text":5048},{"id":5234,"depth":94,"text":5235},{"id":5446,"depth":94,"text":5447},{"id":5459,"depth":88,"text":5460},{"id":5540,"depth":88,"text":5541,"children":5655},[5656,5657,5658],{"id":5544,"depth":94,"text":5545},{"id":755,"depth":94,"text":5555},{"id":5593,"depth":94,"text":5594},{"id":3736,"depth":88,"text":3737},"Fix common Township Canada API errors including Forbidden responses, CORS issues, rate limiting, and empty results. Includes debugging tips and integration patterns.","i-lucide-bug",{},"\u002Fguides\u002Fapi-troubleshooting",{"title":4684,"description":5660},"guides\u002Fapi-troubleshooting","YhFOkUOkxRyXExvO-F29ZJyxlbLEw9dMy2FCmSMog7U"]