[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"guide-google-sheets-add-on":3,"related-google-sheets-add-on":473},{"id":4,"title":5,"body":6,"category":462,"description":463,"extension":464,"icon":465,"meta":466,"navigation":467,"order":468,"path":469,"seo":470,"stem":471,"__hash__":472},"guides\u002Fguides\u002Fgoogle-sheets-add-on.md","Google Sheets Add-on — PLSS to GPS Conversion in Spreadsheets",{"type":7,"value":8,"toc":435},"minimark",[9,13,21,26,77,81,84,204,208,215,219,222,232,235,241,244,248,255,258,282,285,289,292,353,356,360,364,367,371,378,382,388,392,395,399],[10,11,12],"p",{},"Convert PLSS legal land descriptions to GPS coordinates directly inside Google Sheets — no copy-pasting into a separate tool, no manual re-entry.",[10,14,15,16,20],{},"The ",[17,18,19],"strong",{},"Township America PLSS Converter"," add-on is available on the Google Workspace Marketplace. It supports batch column conversion, cell formulas, and a freemium model (10 free conversions\u002Fmonth, unlimited with a Township America API key).",[22,23,25],"h2",{"id":24},"install-the-add-on","Install the add-on",[27,28,29,34,37,41,48,52,62,66],"steps",{},[30,31,33],"h3",{"id":32},"open-google-sheets","Open Google Sheets",[10,35,36],{},"Open any Google Sheets spreadsheet.",[30,38,40],{"id":39},"open-the-add-ons-dialog","Open the Add-ons dialog",[10,42,43,44,47],{},"Go to ",[17,45,46],{},"Extensions → Add-ons → Get add-ons",".",[30,49,51],{"id":50},"search-and-install","Search and install",[10,53,54,55,57,58,61],{},"Search for ",[17,56,19],{},", click the listing, then click ",[17,59,60],{},"Install",". Grant the requested permissions (read\u002Fwrite the current spreadsheet; show sidebar dialogs).",[30,63,65],{"id":64},"open-the-converter","Open the converter",[10,67,68,69,72,73,76],{},"After installation, the ",[17,70,71],{},"Township America"," menu appears in the menu bar. Click ",[17,74,75],{},"Extensions → Township America → Open Converter"," to open the sidebar.",[22,78,80],{"id":79},"batch-column-conversion","Batch column conversion",[10,82,83],{},"The most common workflow: convert an entire column of PLSS descriptions to lat\u002Flng pairs.",[27,85,86,90,93,160,164,168,172,197,201],{},[30,87,89],{"id":88},"enter-descriptions-in-a-column","Enter descriptions in a column",[10,91,92],{},"Put your PLSS descriptions in a spreadsheet column — one per row. For example:",[94,95,96,112],"table",{},[97,98,99],"thead",{},[100,101,102,106,109],"tr",{},[103,104,105],"th",{},"A",[103,107,108],{},"B",[103,110,111],{},"C",[113,114,115,133,142,151],"tbody",{},[100,116,117,123,128],{},[118,119,120],"td",{},[17,121,122],{},"PLSS Description",[118,124,125],{},[17,126,127],{},"Latitude",[118,129,130],{},[17,131,132],{},"Longitude",[100,134,135,138,140],{},[118,136,137],{},"NE 14 5N 3W 6th Meridian",[118,139],{},[118,141],{},[100,143,144,147,149],{},[118,145,146],{},"NENE 12 4N 5E Indian Meridian",[118,148],{},[118,150],{},[100,152,153,156,158],{},[118,154,155],{},"SW 22 3S 68W 6th PM",[118,157],{},[118,159],{},[30,161,163],{"id":162},"open-the-converter-sidebar","Open the converter sidebar",[10,165,166],{},[17,167,75],{},[30,169,171],{"id":170},"set-the-input-and-output-ranges","Set the input and output ranges",[173,174,175,187],"ul",{},[176,177,178,181,182,186],"li",{},[17,179,180],{},"Input range",": the cell range containing your descriptions (e.g. ",[183,184,185],"code",{},"A2:A100",")",[176,188,189,192,193,196],{},[17,190,191],{},"Output cell",": the first cell for latitude output (e.g. ",[183,194,195],{},"B2","). Longitude is written to the next column automatically.",[30,198,200],{"id":199},"click-convert-column","Click Convert Column",[10,202,203],{},"Results appear in the output columns. Rows that could not be converted show an error message in the cell.",[30,205,207],{"id":206},"menu-shortcut","Menu shortcut",[10,209,210,211,214],{},"Select a column of PLSS descriptions, then choose ",[17,212,213],{},"Extensions → Township America → Convert Selected Column",". Latitude and longitude are written to the adjacent two columns without opening the sidebar.",[22,216,218],{"id":217},"cell-formulas","Cell formulas",[10,220,221],{},"For single conversions or building formulas that reference other cells, use the custom functions:",[223,224,229],"pre",{"className":225,"code":227,"language":228},[226],"language-text","=PLSS_TO_LAT(\"NE 14 5N 3W 6th Meridian\")\n=PLSS_TO_LNG(\"NE 14 5N 3W 6th Meridian\")\n","text",[183,230,227],{"__ignoreMap":231},"",[10,233,234],{},"You can also reference another cell:",[223,236,239],{"className":237,"code":238,"language":228},[226],"=PLSS_TO_LAT(A2)\n=PLSS_TO_LNG(A2)\n",[183,240,238],{"__ignoreMap":231},[10,242,243],{},"Cell formulas count against the same monthly free limit as batch conversions.",[22,245,247],{"id":246},"freemium-limits-and-api-keys","Freemium limits and API keys",[10,249,250,251,254],{},"The add-on includes ",[17,252,253],{},"10 free conversions per calendar month"," — no API key required. Free conversions reset on the 1st of each month.",[10,256,257],{},"For unlimited conversions, add a Township America API key:",[259,260,261,269,272],"ol",{},[176,262,43,263,268],{},[264,265,267],"a",{"href":266},"\u002Fapi","townshipamerica.com\u002Fapi"," and subscribe to the Search API (Build tier, $40\u002Fmo — includes 1,000 conversions\u002Fmonth).",[176,270,271],{},"Create an API key in the Developer Portal.",[176,273,274,275,278,279,47],{},"In Google Sheets, open ",[17,276,277],{},"Extensions → Township America → Settings",", paste your key, and click ",[17,280,281],{},"Save Key",[10,283,284],{},"Your API key is stored securely in your Google account's user properties and is only sent to the Township America API.",[22,286,288],{"id":287},"supported-plss-formats","Supported PLSS formats",[10,290,291],{},"The add-on accepts any description format understood by the Township America API:",[94,293,294,304],{},[97,295,296],{},[100,297,298,301],{},[103,299,300],{},"Format",[103,302,303],{},"Example",[113,305,306,315,324,334,344],{},[100,307,308,311],{},[118,309,310],{},"Quarter section",[118,312,313],{},[183,314,137],{},[100,316,317,320],{},[118,318,319],{},"Quarter-quarter section",[118,321,322],{},[183,323,146],{},[100,325,326,329],{},[118,327,328],{},"Section",[118,330,331],{},[183,332,333],{},"Sec 12 T4N R5E Indian Meridian",[100,335,336,339],{},[118,337,338],{},"Township",[118,340,341],{},[183,342,343],{},"T4N R5E 6th PM",[100,345,346,349],{},[118,347,348],{},"Abbreviated PM",[118,350,351],{},[183,352,155],{},[10,354,355],{},"Coverage includes all 30 PLSS states.",[22,357,359],{"id":358},"troubleshooting","Troubleshooting",[30,361,363],{"id":362},"no-results-found","\"No results found\"",[10,365,366],{},"The description may not match a known PLSS location. Check spelling, meridian name, and township\u002Frange direction (N\u002FS, E\u002FW).",[30,368,370],{"id":369},"free-limit-reached","\"Free limit reached\"",[10,372,373,374,377],{},"You've used your 10 free conversions for the month. Add an API key in ",[17,375,376],{},"Settings"," to continue, or wait until the 1st of next month.",[30,379,381],{"id":380},"invalid-api-key","\"Invalid API key\"",[10,383,384,385,47],{},"Double-check your key in the Settings dialog. Keys are generated in the ",[264,386,387],{"href":266},"Township America Developer Portal",[30,389,391],{"id":390},"network-error","\"Network error\"",[10,393,394],{},"Google Sheets could not reach the Township America API. Check your internet connection and try again.",[22,396,398],{"id":397},"related-resources","Related resources",[173,400,401,407,414,421,428],{},[176,402,403,406],{},[264,404,405],{"href":266},"API documentation"," — full reference for the Township America REST API",[176,408,409,413],{},[264,410,412],{"href":411},"\u002Fguides\u002Fapi-integration","API integration guide"," — authenticate and make API requests from any app",[176,415,416,420],{},[264,417,419],{"href":418},"\u002Fguides\u002Fpython-sdk","Python SDK"," — convert PLSS descriptions from Python scripts",[176,422,423,427],{},[264,424,426],{"href":425},"\u002Fguides\u002Fbatch-conversion","Batch conversion"," — web-based batch processing without spreadsheets",[176,429,430,434],{},[264,431,433],{"href":432},"\u002Fcontact-us","Contact support"," — help with the add-on or API access",{"title":231,"searchDepth":436,"depth":436,"links":437},2,[438,445,452,453,454,455,461],{"id":24,"depth":436,"text":25,"children":439},[440,442,443,444],{"id":32,"depth":441,"text":33},3,{"id":39,"depth":441,"text":40},{"id":50,"depth":441,"text":51},{"id":64,"depth":441,"text":65},{"id":79,"depth":436,"text":80,"children":446},[447,448,449,450,451],{"id":88,"depth":441,"text":89},{"id":162,"depth":441,"text":163},{"id":170,"depth":441,"text":171},{"id":199,"depth":441,"text":200},{"id":206,"depth":441,"text":207},{"id":217,"depth":436,"text":218},{"id":246,"depth":436,"text":247},{"id":287,"depth":436,"text":288},{"id":358,"depth":436,"text":359,"children":456},[457,458,459,460],{"id":362,"depth":441,"text":363},{"id":369,"depth":441,"text":370},{"id":380,"depth":441,"text":381},{"id":390,"depth":441,"text":391},{"id":397,"depth":436,"text":398},"api","Convert PLSS legal land descriptions to GPS coordinates directly in Google Sheets. Free add-on with 10 conversions\u002Fmonth, unlimited with API key. Batch column conversion, cell formulas, and API key management.","md","i-lucide-table",{},true,6,"\u002Fguides\u002Fgoogle-sheets-add-on",{"title":5,"description":463},"guides\u002Fgoogle-sheets-add-on","z9LFqa-obnS7Wo8iDgWkSJ44arAzT9393kEIbg3C_BY",[474,1123,2333],{"id":475,"title":476,"body":477,"category":462,"description":1117,"extension":464,"icon":1118,"meta":1119,"navigation":467,"order":866,"path":411,"seo":1120,"stem":1121,"__hash__":1122},"guides\u002Fguides\u002Fapi-integration.md","Legal Land Description API Integration Guide",{"type":7,"value":478,"toc":1081},[479,482,489,493,520,526,530,533,537,540,546,550,553,558,562,565,570,574,577,582,586,589,594,656,662,712,715,719,723,726,730,733,737,740,744,747,751,754,758,798,802,808,828,832,835,839,842,846,849,852,855,878,1000,1012,1016,1019,1023,1033,1037,1070,1077],[10,480,481],{},"Integrate Township America's legal land description services directly into your applications and workflows. Our REST APIs enable PLSS-to-coordinate conversion, autocomplete search, batch processing, and interactive grid maps—all with simple JSON responses.",[10,483,484],{},[485,486],"img",{"alt":487,"src":488},"Developer Portal","\u002Fimages\u002Fguides\u002Fapi-portal.webp",[22,490,492],{"id":491},"quick-start","Quick start",[27,494,495,499,506,510,513,517],{},[30,496,498],{"id":497},"get-an-api-key","Get an API key",[10,500,501,502,505],{},"Log into your Township America account and go to ",[17,503,504],{},"API"," in the main navigation. Subscribe to an API endpoint and create your first API key.",[30,507,509],{"id":508},"make-your-first-request","Make your first request",[10,511,512],{},"Add your API key to the request header and make a test request.",[30,514,516],{"id":515},"parse-the-response","Parse the response",[10,518,519],{},"All APIs return JSON with coordinates, legal descriptions, and metadata.",[10,521,522,523,47],{},"For full documentation and code examples, visit the ",[264,524,405],{"href":525},"\u002Fapp\u002Fapi",[22,527,529],{"id":528},"api-endpoints","API endpoints",[10,531,532],{},"Township America offers four distinct API endpoints:",[30,534,536],{"id":535},"search-api-20month","Search API ($20\u002Fmonth)",[10,538,539],{},"Convert legal land descriptions to geographic coordinates and vice versa. Supports PLSS (Public Land Survey System) formats including township, range, section, and quarter section descriptions.",[10,541,542,545],{},[17,543,544],{},"Use cases",": Property lookup, coordinate conversion, reverse geocoding",[30,547,549],{"id":548},"autocomplete-api-20month","Autocomplete API ($20\u002Fmonth)",[10,551,552],{},"Search legal land descriptions with partial text. Returns up to 10 matching results with coordinates—ideal for search boxes and type-ahead interfaces.",[10,554,555,557],{},[17,556,544],{},": Search boxes, type-ahead, field validation",[30,559,561],{"id":560},"batch-api-40month","Batch API ($40\u002Fmonth)",[10,563,564],{},"Process up to 100 records per request. Convert lists of legal land descriptions to coordinates or coordinates to legal land descriptions.",[10,566,567,569],{},[17,568,544],{},": Bulk data processing, migration, spatial analysis",[30,571,573],{"id":572},"maps-api-20month","Maps API ($20\u002Fmonth)",[10,575,576],{},"Display legal survey grids on maps in your web or mobile applications. Vector tiles format compatible with Mapbox GL, Leaflet, and other mapping libraries.",[10,578,579,581],{},[17,580,544],{},": Custom mapping applications, data visualization",[22,583,585],{"id":584},"api-pricing-tiers","API pricing tiers",[10,587,588],{},"Each API offers three pricing tiers:",[10,590,591],{},[17,592,593],{},"Search, Autocomplete & Batch APIs",[94,595,596,612],{},[97,597,598],{},[100,599,600,603,606,609],{},[103,601,602],{},"Tier",[103,604,605],{},"Monthly Requests",[103,607,608],{},"Rate Limit",[103,610,611],{},"Price",[113,613,614,628,642],{},[100,615,616,619,622,625],{},[118,617,618],{},"Build",[118,620,621],{},"1,000",[118,623,624],{},"1\u002Fsec",[118,626,627],{},"$20-40\u002Fmo",[100,629,630,633,636,639],{},[118,631,632],{},"Scale",[118,634,635],{},"10,000",[118,637,638],{},"5\u002Fsec",[118,640,641],{},"$100-200\u002Fmo",[100,643,644,647,650,653],{},[118,645,646],{},"Enterprise",[118,648,649],{},"100,000",[118,651,652],{},"25\u002Fsec",[118,654,655],{},"$500-1,000\u002Fmo",[10,657,658,661],{},[17,659,660],{},"Maps API"," (higher request quotas for tile rendering)",[94,663,664,676],{},[97,665,666],{},[100,667,668,670,672,674],{},[103,669,602],{},[103,671,605],{},[103,673,608],{},[103,675,611],{},[113,677,678,689,700],{},[100,679,680,682,684,686],{},[118,681,618],{},[118,683,635],{},[118,685,624],{},[118,687,688],{},"$20\u002Fmo",[100,690,691,693,695,697],{},[118,692,632],{},[118,694,649],{},[118,696,638],{},[118,698,699],{},"$100\u002Fmo",[100,701,702,704,707,709],{},[118,703,646],{},[118,705,706],{},"1,000,000",[118,708,652],{},[118,710,711],{},"$500\u002Fmo",[10,713,714],{},"Annual billing saves two months compared to monthly billing.",[22,716,718],{"id":717},"common-integration-patterns","Common integration patterns",[30,720,722],{"id":721},"real-estate-applications","Real Estate Applications",[10,724,725],{},"Add legal land description lookup to property search interfaces. Use the Autocomplete API for type-ahead search and the Search API for coordinate conversion.",[30,727,729],{"id":728},"oil-gas-software","Oil & Gas Software",[10,731,732],{},"Integrate batch conversion for well location management. Use the Maps API to display PLSS grids in custom mapping applications.",[30,734,736],{"id":735},"mobile-field-apps","Mobile Field Apps",[10,738,739],{},"Add PLSS search and coordinate conversion for field workers. The APIs work with any mobile development framework (React Native, Flutter, native iOS\u002FAndroid).",[30,741,743],{"id":742},"gis-platforms","GIS Platforms",[10,745,746],{},"Enhance ArcGIS, QGIS, or custom GIS tools with legal land description support. Batch API enables bulk coordinate conversion for spatial analysis.",[30,748,750],{"id":749},"agriculture-technology","Agriculture Technology",[10,752,753],{},"Add quarter section lookup to farm management software. Combine with soil and boundary data for precision agriculture applications.",[22,755,757],{"id":756},"getting-an-api-key","Getting an API key",[27,759,760,764,769,773,776,780,787,791],{},[30,761,763],{"id":762},"open-the-developer-portal","Open the Developer Portal",[10,765,43,766,768],{},[17,767,504],{}," in the main navigation to access the Developer Portal.",[30,770,772],{"id":771},"subscribe-to-an-api","Subscribe to an API",[10,774,775],{},"Click on the API you want to use (Search, Autocomplete, Batch, or Maps). Select a tier and complete payment.",[30,777,779],{"id":778},"create-an-api-key","Create an API key",[10,781,782,783,786],{},"Click ",[17,784,785],{},"+ Add Key"," and give your key a descriptive name. Copy the key immediately—it won't be shown again.",[30,788,790],{"id":789},"use-your-key","Use your key",[10,792,793,794,797],{},"Include the API key in the ",[183,795,796],{},"x-api-key"," header for all requests.",[22,799,801],{"id":800},"managing-api-subscriptions","Managing API subscriptions",[10,803,804,805,807],{},"Manage your API subscriptions from the ",[17,806,504],{}," page in the main navigation. The Developer Portal provides:",[173,809,810,816,822],{},[176,811,812,815],{},[17,813,814],{},"Overview",": View all your API keys and subscriptions",[176,817,818,821],{},[17,819,820],{},"Logs",": Monitor API requests with timestamps and response codes",[176,823,824,827],{},[17,825,826],{},"Alerts",": Configure usage threshold notifications",[30,829,831],{"id":830},"usage-monitoring","Usage monitoring",[10,833,834],{},"Track your API usage in real-time from the Overview tab. Usage resets at the start of each billing period.",[30,836,838],{"id":837},"rate-limiting","Rate limiting",[10,840,841],{},"Exceeding your rate limit results in HTTP 429 Too Many Requests responses. Implement exponential backoff in your integration to handle rate limits gracefully.",[30,843,845],{"id":844},"quota-management","Quota management",[10,847,848],{},"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.",[22,850,419],{"id":851},"python-sdk",[10,853,854],{},"The official Python SDK wraps all API endpoints with typed responses, sync and async clients, and batch support. Install from PyPI:",[223,856,860],{"className":857,"code":858,"language":859,"meta":231,"style":231},"language-bash shiki shiki-themes material-theme-lighter github-light github-dark","pip install townshipamerica\n","bash",[183,861,862],{"__ignoreMap":231},[863,864,867,871,875],"span",{"class":865,"line":866},"line",1,[863,868,870],{"class":869},"sbgvK","pip",[863,872,874],{"class":873},"s_sjI"," install",[863,876,877],{"class":873}," townshipamerica\n",[223,879,883],{"className":880,"code":881,"language":882,"meta":231,"style":231},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","from townshipamerica import TownshipAmerica\n\nclient = TownshipAmerica(api_key=\"your_api_key\")\nresult = client.search(\"NENE 12 4N 5E Indian Meridian\")\nprint(result.features[0].properties)\n","python",[183,884,885,901,906,941,967],{"__ignoreMap":231},[863,886,887,891,895,898],{"class":865,"line":866},[863,888,890],{"class":889},"sVHd0","from",[863,892,894],{"class":893},"su5hD"," townshipamerica ",[863,896,897],{"class":889},"import",[863,899,900],{"class":893}," TownshipAmerica\n",[863,902,903],{"class":865,"line":436},[863,904,905],{"emptyLinePlaceholder":467},"\n",[863,907,908,911,915,919,923,927,929,933,936,938],{"class":865,"line":441},[863,909,910],{"class":893},"client ",[863,912,914],{"class":913},"smGrS","=",[863,916,918],{"class":917},"slqww"," TownshipAmerica",[863,920,922],{"class":921},"sP7_E","(",[863,924,926],{"class":925},"s99_P","api_key",[863,928,914],{"class":913},[863,930,932],{"class":931},"sjJ54","\"",[863,934,935],{"class":873},"your_api_key",[863,937,932],{"class":931},[863,939,940],{"class":921},")\n",[863,942,944,947,949,952,954,957,959,961,963,965],{"class":865,"line":943},4,[863,945,946],{"class":893},"result ",[863,948,914],{"class":913},[863,950,951],{"class":893}," client",[863,953,47],{"class":921},[863,955,956],{"class":917},"search",[863,958,922],{"class":921},[863,960,932],{"class":931},[863,962,146],{"class":873},[863,964,932],{"class":931},[863,966,940],{"class":921},[863,968,970,974,976,979,981,985,988,992,995,998],{"class":865,"line":969},5,[863,971,973],{"class":972},"sptTA","print",[863,975,922],{"class":921},[863,977,978],{"class":917},"result",[863,980,47],{"class":921},[863,982,984],{"class":983},"skxfh","features",[863,986,987],{"class":921},"[",[863,989,991],{"class":990},"srdBf","0",[863,993,994],{"class":921},"].",[863,996,997],{"class":983},"properties",[863,999,940],{"class":921},[10,1001,1002,1003,1006,1007,1011],{},"MIT license. Python 3.9+. See the ",[264,1004,1005],{"href":418},"Python SDK Quick Start"," for full usage, or ",[264,1008,1010],{"href":1009},"\u002Fguides\u002Fpython-sdk-advanced","Advanced Patterns"," for async, GeoPandas, and production workflows.",[22,1013,1015],{"id":1014},"code-examples","Code examples",[10,1017,1018],{},"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.",[22,1020,1022],{"id":1021},"checking-system-health","Checking system health",[10,1024,1025,1026,1032],{},"For the current status of Township America's APIs, including uptime, response time, and incident history, visit ",[264,1027,1031],{"href":1028,"rel":1029},"https:\u002F\u002Fstatus.townshipamerica.com",[1030],"nofollow","status.townshipamerica.com",". This site provides real-time updates on API system health.",[22,1034,1036],{"id":1035},"related-guides","Related guides",[173,1038,1039,1044,1050,1057,1063],{},[176,1040,1041,1043],{},[264,1042,1005],{"href":418}," - Install and convert PLSS descriptions in four lines of Python",[176,1045,1046,1049],{},[264,1047,1048],{"href":1009},"Python SDK Advanced Patterns"," - Async, GeoPandas, and production workflows",[176,1051,1052,1056],{},[264,1053,1055],{"href":1054},"\u002Fguides\u002Faccount-management","Account Management"," - Manage billing for API subscriptions",[176,1058,1059,1062],{},[264,1060,1061],{"href":425},"Batch Conversion"," - Web interface for batch processing",[176,1064,1065,1069],{},[264,1066,1068],{"href":1067},"\u002Fguides\u002Fmap","Interactive Maps"," - Map features available through the Maps API",[10,1071,1072,1073,1076],{},"Need help with your integration? ",[264,1074,1075],{"href":432},"Contact us"," for technical support and custom API solutions.",[1078,1079,1080],"style",{},"html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}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 .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":231,"searchDepth":436,"depth":436,"links":1082},[1083,1088,1094,1095,1102,1108,1113,1114,1115,1116],{"id":491,"depth":436,"text":492,"children":1084},[1085,1086,1087],{"id":497,"depth":441,"text":498},{"id":508,"depth":441,"text":509},{"id":515,"depth":441,"text":516},{"id":528,"depth":436,"text":529,"children":1089},[1090,1091,1092,1093],{"id":535,"depth":441,"text":536},{"id":548,"depth":441,"text":549},{"id":560,"depth":441,"text":561},{"id":572,"depth":441,"text":573},{"id":584,"depth":436,"text":585},{"id":717,"depth":436,"text":718,"children":1096},[1097,1098,1099,1100,1101],{"id":721,"depth":441,"text":722},{"id":728,"depth":441,"text":729},{"id":735,"depth":441,"text":736},{"id":742,"depth":441,"text":743},{"id":749,"depth":441,"text":750},{"id":756,"depth":436,"text":757,"children":1103},[1104,1105,1106,1107],{"id":762,"depth":441,"text":763},{"id":771,"depth":441,"text":772},{"id":778,"depth":441,"text":779},{"id":789,"depth":441,"text":790},{"id":800,"depth":436,"text":801,"children":1109},[1110,1111,1112],{"id":830,"depth":441,"text":831},{"id":837,"depth":441,"text":838},{"id":844,"depth":441,"text":845},{"id":851,"depth":436,"text":419},{"id":1014,"depth":436,"text":1015},{"id":1021,"depth":436,"text":1022},{"id":1035,"depth":436,"text":1036},"Integrate legal land description APIs into your applications. Convert PLSS descriptions to coordinates, add autocomplete search, process batch records, and display survey grid maps. REST API with JSON responses.","i-lucide-code",{},{"title":476,"description":1117},"guides\u002Fapi-integration","v8qaOkRCuAmKItWDJkt3L9dfu4FTzbDWvLoGmFAlOxc",{"id":1124,"title":1125,"body":1126,"category":462,"description":2327,"extension":464,"icon":2328,"meta":2329,"navigation":467,"order":436,"path":418,"seo":2330,"stem":2331,"__hash__":2332},"guides\u002Fguides\u002Fpython-sdk.md","Python SDK Quick Start — PLSS Coordinate Conversion in Python",{"type":7,"value":1127,"toc":2313},[1128,1135,1139,1142,1154,1165,1169,1368,1378,1382,1385,1463,1483,1526,1530,1533,1620,1626,1693,1696,1699,1856,1859,1946,1950,1953,2178,2182,2189,2279,2281,2299,2310],[10,1129,1130,1131,1134],{},"Convert PLSS legal land descriptions to GPS coordinates in Python with the official ",[183,1132,1133],{},"townshipamerica"," package. MIT license, typed Pydantic v2 models, sync and async clients.",[22,1136,1138],{"id":1137},"installation","Installation",[10,1140,1141],{},"Install from PyPI with pip:",[223,1143,1144],{"className":857,"code":858,"language":859,"meta":231,"style":231},[183,1145,1146],{"__ignoreMap":231},[863,1147,1148,1150,1152],{"class":865,"line":866},[863,1149,870],{"class":869},[863,1151,874],{"class":873},[863,1153,877],{"class":873},[10,1155,1156,1157,1160,1161,1164],{},"Requires Python 3.9 or later. Dependencies (",[183,1158,1159],{},"httpx",", ",[183,1162,1163],{},"pydantic",") install automatically.",[22,1166,1168],{"id":1167},"your-first-conversion","Your first conversion",[27,1170,1171,1173,1182,1186,1189,1212,1216],{},[30,1172,498],{"id":497},[10,1174,1175,1176,1181],{},"Sign up at ",[264,1177,1180],{"href":1178,"rel":1179},"https:\u002F\u002Ftownshipamerica.com\u002Fapp",[1030],"townshipamerica.com\u002Fapp"," and subscribe to the Search API from the Developer Portal.",[30,1183,1185],{"id":1184},"set-your-api-key","Set your API key",[10,1187,1188],{},"Store your key as an environment variable — never hardcode it in source files.",[223,1190,1192],{"className":857,"code":1191,"language":859,"meta":231,"style":231},"export TOWNSHIPAMERICA_API_KEY=\"your_api_key\"\n",[183,1193,1194],{"__ignoreMap":231},[863,1195,1196,1200,1203,1205,1207,1209],{"class":865,"line":866},[863,1197,1199],{"class":1198},"sbsja","export",[863,1201,1202],{"class":893}," TOWNSHIPAMERICA_API_KEY",[863,1204,914],{"class":913},[863,1206,932],{"class":931},[863,1208,935],{"class":873},[863,1210,1211],{"class":931},"\"\n",[30,1213,1215],{"id":1214},"convert-a-plss-description","Convert a PLSS description",[223,1217,1219],{"className":880,"code":1218,"language":882,"meta":231,"style":231},"import os\nfrom townshipamerica import TownshipAmerica\n\nclient = TownshipAmerica(api_key=os.environ[\"TOWNSHIPAMERICA_API_KEY\"])\nresult = client.search(\"NENE 12 4N 5E Indian Meridian\")\n\nfeature = result.features[0]\nprint(feature.properties)           # Section metadata\nprint(feature.geometry.coordinates) # Boundary polygon\n",[183,1220,1221,1228,1238,1242,1276,1298,1302,1324,1344],{"__ignoreMap":231},[863,1222,1223,1225],{"class":865,"line":866},[863,1224,897],{"class":889},[863,1226,1227],{"class":893}," os\n",[863,1229,1230,1232,1234,1236],{"class":865,"line":436},[863,1231,890],{"class":889},[863,1233,894],{"class":893},[863,1235,897],{"class":889},[863,1237,900],{"class":893},[863,1239,1240],{"class":865,"line":441},[863,1241,905],{"emptyLinePlaceholder":467},[863,1243,1244,1246,1248,1250,1252,1254,1256,1259,1261,1264,1266,1268,1271,1273],{"class":865,"line":943},[863,1245,910],{"class":893},[863,1247,914],{"class":913},[863,1249,918],{"class":917},[863,1251,922],{"class":921},[863,1253,926],{"class":925},[863,1255,914],{"class":913},[863,1257,1258],{"class":917},"os",[863,1260,47],{"class":921},[863,1262,1263],{"class":983},"environ",[863,1265,987],{"class":921},[863,1267,932],{"class":931},[863,1269,1270],{"class":873},"TOWNSHIPAMERICA_API_KEY",[863,1272,932],{"class":931},[863,1274,1275],{"class":921},"])\n",[863,1277,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296],{"class":865,"line":969},[863,1279,946],{"class":893},[863,1281,914],{"class":913},[863,1283,951],{"class":893},[863,1285,47],{"class":921},[863,1287,956],{"class":917},[863,1289,922],{"class":921},[863,1291,932],{"class":931},[863,1293,146],{"class":873},[863,1295,932],{"class":931},[863,1297,940],{"class":921},[863,1299,1300],{"class":865,"line":468},[863,1301,905],{"emptyLinePlaceholder":467},[863,1303,1305,1308,1310,1313,1315,1317,1319,1321],{"class":865,"line":1304},7,[863,1306,1307],{"class":893},"feature ",[863,1309,914],{"class":913},[863,1311,1312],{"class":893}," result",[863,1314,47],{"class":921},[863,1316,984],{"class":983},[863,1318,987],{"class":921},[863,1320,991],{"class":990},[863,1322,1323],{"class":921},"]\n",[863,1325,1327,1329,1331,1334,1336,1338,1340],{"class":865,"line":1326},8,[863,1328,973],{"class":972},[863,1330,922],{"class":921},[863,1332,1333],{"class":917},"feature",[863,1335,47],{"class":921},[863,1337,997],{"class":983},[863,1339,186],{"class":921},[863,1341,1343],{"class":1342},"sutJx","           # Section metadata\n",[863,1345,1347,1349,1351,1353,1355,1358,1360,1363,1365],{"class":865,"line":1346},9,[863,1348,973],{"class":972},[863,1350,922],{"class":921},[863,1352,1333],{"class":917},[863,1354,47],{"class":921},[863,1356,1357],{"class":983},"geometry",[863,1359,47],{"class":921},[863,1361,1362],{"class":983},"coordinates",[863,1364,186],{"class":921},[863,1366,1367],{"class":1342}," # Boundary polygon\n",[10,1369,1370,1371,1373,1374,1377],{},"That's it — ",[183,1372,978],{}," is a typed ",[183,1375,1376],{},"FeatureCollection"," with GeoJSON geometry and PLSS metadata.",[22,1379,1381],{"id":1380},"reverse-geocoding","Reverse geocoding",[10,1383,1384],{},"Find the PLSS legal land description at a GPS coordinate:",[223,1386,1388],{"className":880,"code":1387,"language":882,"meta":231,"style":231},"result = client.reverse(-97.5, 36.1)\n\nfeature = result.features[0]\nprint(feature.properties.descriptor)  # \"NWSE 15 4N 7W Indian Meridian\"\n",[183,1389,1390,1419,1423,1441],{"__ignoreMap":231},[863,1391,1392,1394,1396,1398,1400,1403,1405,1408,1411,1414,1417],{"class":865,"line":866},[863,1393,946],{"class":893},[863,1395,914],{"class":913},[863,1397,951],{"class":893},[863,1399,47],{"class":921},[863,1401,1402],{"class":917},"reverse",[863,1404,922],{"class":921},[863,1406,1407],{"class":913},"-",[863,1409,1410],{"class":990},"97.5",[863,1412,1413],{"class":921},",",[863,1415,1416],{"class":990}," 36.1",[863,1418,940],{"class":921},[863,1420,1421],{"class":865,"line":436},[863,1422,905],{"emptyLinePlaceholder":467},[863,1424,1425,1427,1429,1431,1433,1435,1437,1439],{"class":865,"line":441},[863,1426,1307],{"class":893},[863,1428,914],{"class":913},[863,1430,1312],{"class":893},[863,1432,47],{"class":921},[863,1434,984],{"class":983},[863,1436,987],{"class":921},[863,1438,991],{"class":990},[863,1440,1323],{"class":921},[863,1442,1443,1445,1447,1449,1451,1453,1455,1458,1460],{"class":865,"line":943},[863,1444,973],{"class":972},[863,1446,922],{"class":921},[863,1448,1333],{"class":917},[863,1450,47],{"class":921},[863,1452,997],{"class":983},[863,1454,47],{"class":921},[863,1456,1457],{"class":983},"descriptor",[863,1459,186],{"class":921},[863,1461,1462],{"class":1342},"  # \"NWSE 15 4N 7W Indian Meridian\"\n",[10,1464,15,1465,1468,1469,1160,1472,1160,1475,1478,1479,1482],{},[183,1466,1467],{},"unit"," parameter controls precision — ",[183,1470,1471],{},"\"Township\"",[183,1473,1474],{},"\"Section\"",[183,1476,1477],{},"\"Quarter Section\"",", or ",[183,1480,1481],{},"\"all\"",":",[223,1484,1486],{"className":880,"code":1485,"language":882,"meta":231,"style":231},"result = client.reverse(-97.5, 36.1, unit=\"Quarter Section\")\n",[183,1487,1488],{"__ignoreMap":231},[863,1489,1490,1492,1494,1496,1498,1500,1502,1504,1506,1508,1510,1512,1515,1517,1519,1522,1524],{"class":865,"line":866},[863,1491,946],{"class":893},[863,1493,914],{"class":913},[863,1495,951],{"class":893},[863,1497,47],{"class":921},[863,1499,1402],{"class":917},[863,1501,922],{"class":921},[863,1503,1407],{"class":913},[863,1505,1410],{"class":990},[863,1507,1413],{"class":921},[863,1509,1416],{"class":990},[863,1511,1413],{"class":921},[863,1513,1514],{"class":925}," unit",[863,1516,914],{"class":913},[863,1518,932],{"class":931},[863,1520,1521],{"class":873},"Quarter Section",[863,1523,932],{"class":931},[863,1525,940],{"class":921},[22,1527,1529],{"id":1528},"autocomplete","Autocomplete",[10,1531,1532],{},"Add type-ahead search for PLSS descriptions:",[223,1534,1536],{"className":880,"code":1535,"language":882,"meta":231,"style":231},"suggestions = client.autocomplete(\"T4N R5E\", limit=5)\nfor item in suggestions.results:\n    print(item.text, item.location)\n",[183,1537,1538,1572,1594],{"__ignoreMap":231},[863,1539,1540,1543,1545,1547,1549,1551,1553,1555,1558,1560,1562,1565,1567,1570],{"class":865,"line":866},[863,1541,1542],{"class":893},"suggestions ",[863,1544,914],{"class":913},[863,1546,951],{"class":893},[863,1548,47],{"class":921},[863,1550,1528],{"class":917},[863,1552,922],{"class":921},[863,1554,932],{"class":931},[863,1556,1557],{"class":873},"T4N R5E",[863,1559,932],{"class":931},[863,1561,1413],{"class":921},[863,1563,1564],{"class":925}," limit",[863,1566,914],{"class":913},[863,1568,1569],{"class":990},"5",[863,1571,940],{"class":921},[863,1573,1574,1577,1580,1583,1586,1588,1591],{"class":865,"line":436},[863,1575,1576],{"class":889},"for",[863,1578,1579],{"class":893}," item ",[863,1581,1582],{"class":889},"in",[863,1584,1585],{"class":893}," suggestions",[863,1587,47],{"class":921},[863,1589,1590],{"class":983},"results",[863,1592,1593],{"class":921},":\n",[863,1595,1596,1599,1601,1604,1606,1608,1610,1613,1615,1618],{"class":865,"line":441},[863,1597,1598],{"class":972},"    print",[863,1600,922],{"class":921},[863,1602,1603],{"class":917},"item",[863,1605,47],{"class":921},[863,1607,228],{"class":983},[863,1609,1413],{"class":921},[863,1611,1612],{"class":917}," item",[863,1614,47],{"class":921},[863,1616,1617],{"class":983},"location",[863,1619,940],{"class":921},[10,1621,15,1622,1625],{},[183,1623,1624],{},"proximity"," parameter biases results toward a GPS coordinate:",[223,1627,1629],{"className":880,"code":1628,"language":882,"meta":231,"style":231},"suggestions = client.autocomplete(\n    \"T4N\",\n    limit=5,\n    proximity=(-97.5, 36.1)\n)\n",[183,1630,1631,1646,1659,1670,1689],{"__ignoreMap":231},[863,1632,1633,1635,1637,1639,1641,1643],{"class":865,"line":866},[863,1634,1542],{"class":893},[863,1636,914],{"class":913},[863,1638,951],{"class":893},[863,1640,47],{"class":921},[863,1642,1528],{"class":917},[863,1644,1645],{"class":921},"(\n",[863,1647,1648,1651,1654,1656],{"class":865,"line":436},[863,1649,1650],{"class":931},"    \"",[863,1652,1653],{"class":873},"T4N",[863,1655,932],{"class":931},[863,1657,1658],{"class":921},",\n",[863,1660,1661,1664,1666,1668],{"class":865,"line":441},[863,1662,1663],{"class":925},"    limit",[863,1665,914],{"class":913},[863,1667,1569],{"class":990},[863,1669,1658],{"class":921},[863,1671,1672,1675,1677,1679,1681,1683,1685,1687],{"class":865,"line":943},[863,1673,1674],{"class":925},"    proximity",[863,1676,914],{"class":913},[863,1678,922],{"class":921},[863,1680,1407],{"class":913},[863,1682,1410],{"class":990},[863,1684,1413],{"class":921},[863,1686,1416],{"class":990},[863,1688,940],{"class":921},[863,1690,1691],{"class":865,"line":969},[863,1692,940],{"class":921},[22,1694,426],{"id":1695},"batch-conversion",[10,1697,1698],{},"Convert up to 100 PLSS descriptions in a single request:",[223,1700,1702],{"className":880,"code":1701,"language":882,"meta":231,"style":231},"locations = [\n    \"NENE 12 4N 5E Indian Meridian\",\n    \"NESW 25 5N 30E Mount Diablo Meridian\",\n    \"SWNE 22 3N 7E Montana Meridian\",\n]\n\nresults = client.batch_search(locations)\nfor fc in results:\n    feature = fc.features[0]\n    print(feature.properties.descriptor, feature.geometry.coordinates[0][0][:2])\n",[183,1703,1704,1714,1724,1735,1746,1750,1754,1775,1789,1809],{"__ignoreMap":231},[863,1705,1706,1709,1711],{"class":865,"line":866},[863,1707,1708],{"class":893},"locations ",[863,1710,914],{"class":913},[863,1712,1713],{"class":921}," [\n",[863,1715,1716,1718,1720,1722],{"class":865,"line":436},[863,1717,1650],{"class":931},[863,1719,146],{"class":873},[863,1721,932],{"class":931},[863,1723,1658],{"class":921},[863,1725,1726,1728,1731,1733],{"class":865,"line":441},[863,1727,1650],{"class":931},[863,1729,1730],{"class":873},"NESW 25 5N 30E Mount Diablo Meridian",[863,1732,932],{"class":931},[863,1734,1658],{"class":921},[863,1736,1737,1739,1742,1744],{"class":865,"line":943},[863,1738,1650],{"class":931},[863,1740,1741],{"class":873},"SWNE 22 3N 7E Montana Meridian",[863,1743,932],{"class":931},[863,1745,1658],{"class":921},[863,1747,1748],{"class":865,"line":969},[863,1749,1323],{"class":921},[863,1751,1752],{"class":865,"line":468},[863,1753,905],{"emptyLinePlaceholder":467},[863,1755,1756,1759,1761,1763,1765,1768,1770,1773],{"class":865,"line":1304},[863,1757,1758],{"class":893},"results ",[863,1760,914],{"class":913},[863,1762,951],{"class":893},[863,1764,47],{"class":921},[863,1766,1767],{"class":917},"batch_search",[863,1769,922],{"class":921},[863,1771,1772],{"class":917},"locations",[863,1774,940],{"class":921},[863,1776,1777,1779,1782,1784,1787],{"class":865,"line":1326},[863,1778,1576],{"class":889},[863,1780,1781],{"class":893}," fc ",[863,1783,1582],{"class":889},[863,1785,1786],{"class":893}," results",[863,1788,1593],{"class":921},[863,1790,1791,1794,1796,1799,1801,1803,1805,1807],{"class":865,"line":1346},[863,1792,1793],{"class":893},"    feature ",[863,1795,914],{"class":913},[863,1797,1798],{"class":893}," fc",[863,1800,47],{"class":921},[863,1802,984],{"class":983},[863,1804,987],{"class":921},[863,1806,991],{"class":990},[863,1808,1323],{"class":921},[863,1810,1812,1814,1816,1818,1820,1822,1824,1826,1828,1831,1833,1835,1837,1839,1841,1843,1846,1848,1851,1854],{"class":865,"line":1811},10,[863,1813,1598],{"class":972},[863,1815,922],{"class":921},[863,1817,1333],{"class":917},[863,1819,47],{"class":921},[863,1821,997],{"class":983},[863,1823,47],{"class":921},[863,1825,1457],{"class":983},[863,1827,1413],{"class":921},[863,1829,1830],{"class":917}," feature",[863,1832,47],{"class":921},[863,1834,1357],{"class":983},[863,1836,47],{"class":921},[863,1838,1362],{"class":983},[863,1840,987],{"class":921},[863,1842,991],{"class":990},[863,1844,1845],{"class":921},"][",[863,1847,991],{"class":990},[863,1849,1850],{"class":921},"][:",[863,1852,1853],{"class":990},"2",[863,1855,1275],{"class":921},[10,1857,1858],{},"Batch reverse geocoding works the same way:",[223,1860,1862],{"className":880,"code":1861,"language":882,"meta":231,"style":231},"coordinates = [(-97.5, 36.1), (-110.0, 45.5), (-104.8, 39.7)]\nresults = client.batch_reverse(coordinates, unit=\"Section\")\n",[183,1863,1864,1915],{"__ignoreMap":231},[863,1865,1866,1869,1871,1874,1876,1878,1880,1882,1885,1888,1890,1893,1895,1898,1900,1902,1904,1907,1909,1912],{"class":865,"line":866},[863,1867,1868],{"class":893},"coordinates ",[863,1870,914],{"class":913},[863,1872,1873],{"class":921}," [(",[863,1875,1407],{"class":913},[863,1877,1410],{"class":990},[863,1879,1413],{"class":921},[863,1881,1416],{"class":990},[863,1883,1884],{"class":921},"),",[863,1886,1887],{"class":921}," (",[863,1889,1407],{"class":913},[863,1891,1892],{"class":990},"110.0",[863,1894,1413],{"class":921},[863,1896,1897],{"class":990}," 45.5",[863,1899,1884],{"class":921},[863,1901,1887],{"class":921},[863,1903,1407],{"class":913},[863,1905,1906],{"class":990},"104.8",[863,1908,1413],{"class":921},[863,1910,1911],{"class":990}," 39.7",[863,1913,1914],{"class":921},")]\n",[863,1916,1917,1919,1921,1923,1925,1928,1930,1932,1934,1936,1938,1940,1942,1944],{"class":865,"line":436},[863,1918,1758],{"class":893},[863,1920,914],{"class":913},[863,1922,951],{"class":893},[863,1924,47],{"class":921},[863,1926,1927],{"class":917},"batch_reverse",[863,1929,922],{"class":921},[863,1931,1362],{"class":917},[863,1933,1413],{"class":921},[863,1935,1514],{"class":925},[863,1937,914],{"class":913},[863,1939,932],{"class":931},[863,1941,328],{"class":873},[863,1943,932],{"class":931},[863,1945,940],{"class":921},[22,1947,1949],{"id":1948},"error-handling","Error handling",[10,1951,1952],{},"The SDK raises typed exceptions mapped to HTTP status codes:",[223,1954,1956],{"className":880,"code":1955,"language":882,"meta":231,"style":231},"from townshipamerica.exceptions import (\n    AuthenticationError,\n    NotFoundError,\n    RateLimitError,\n    ValidationError,\n)\n\ntry:\n    result = client.search(\"invalid input\")\nexcept ValidationError as e:\n    print(f\"Bad input: {e}\")\nexcept AuthenticationError:\n    print(\"Check your API key\")\nexcept RateLimitError as e:\n    print(f\"Rate limited — retry after {e.retry_after} seconds\")\nexcept NotFoundError:\n    print(\"No PLSS data at that location\")\n",[183,1957,1958,1975,1982,1989,1996,2003,2007,2011,2018,2042,2058,2084,2094,2110,2124,2152,2162],{"__ignoreMap":231},[863,1959,1960,1962,1965,1967,1970,1972],{"class":865,"line":866},[863,1961,890],{"class":889},[863,1963,1964],{"class":893}," townshipamerica",[863,1966,47],{"class":921},[863,1968,1969],{"class":893},"exceptions ",[863,1971,897],{"class":889},[863,1973,1974],{"class":921}," (\n",[863,1976,1977,1980],{"class":865,"line":436},[863,1978,1979],{"class":893},"    AuthenticationError",[863,1981,1658],{"class":921},[863,1983,1984,1987],{"class":865,"line":441},[863,1985,1986],{"class":893},"    NotFoundError",[863,1988,1658],{"class":921},[863,1990,1991,1994],{"class":865,"line":943},[863,1992,1993],{"class":893},"    RateLimitError",[863,1995,1658],{"class":921},[863,1997,1998,2001],{"class":865,"line":969},[863,1999,2000],{"class":893},"    ValidationError",[863,2002,1658],{"class":921},[863,2004,2005],{"class":865,"line":468},[863,2006,940],{"class":921},[863,2008,2009],{"class":865,"line":1304},[863,2010,905],{"emptyLinePlaceholder":467},[863,2012,2013,2016],{"class":865,"line":1326},[863,2014,2015],{"class":889},"try",[863,2017,1593],{"class":921},[863,2019,2020,2023,2025,2027,2029,2031,2033,2035,2038,2040],{"class":865,"line":1346},[863,2021,2022],{"class":893},"    result ",[863,2024,914],{"class":913},[863,2026,951],{"class":893},[863,2028,47],{"class":921},[863,2030,956],{"class":917},[863,2032,922],{"class":921},[863,2034,932],{"class":931},[863,2036,2037],{"class":873},"invalid input",[863,2039,932],{"class":931},[863,2041,940],{"class":921},[863,2043,2044,2047,2050,2053,2056],{"class":865,"line":1811},[863,2045,2046],{"class":889},"except",[863,2048,2049],{"class":893}," ValidationError ",[863,2051,2052],{"class":889},"as",[863,2054,2055],{"class":893}," e",[863,2057,1593],{"class":921},[863,2059,2061,2063,2065,2068,2071,2074,2077,2080,2082],{"class":865,"line":2060},11,[863,2062,1598],{"class":972},[863,2064,922],{"class":921},[863,2066,2067],{"class":1198},"f",[863,2069,2070],{"class":873},"\"Bad input: ",[863,2072,2073],{"class":990},"{",[863,2075,2076],{"class":917},"e",[863,2078,2079],{"class":990},"}",[863,2081,932],{"class":873},[863,2083,940],{"class":921},[863,2085,2087,2089,2092],{"class":865,"line":2086},12,[863,2088,2046],{"class":889},[863,2090,2091],{"class":893}," AuthenticationError",[863,2093,1593],{"class":921},[863,2095,2097,2099,2101,2103,2106,2108],{"class":865,"line":2096},13,[863,2098,1598],{"class":972},[863,2100,922],{"class":921},[863,2102,932],{"class":931},[863,2104,2105],{"class":873},"Check your API key",[863,2107,932],{"class":931},[863,2109,940],{"class":921},[863,2111,2113,2115,2118,2120,2122],{"class":865,"line":2112},14,[863,2114,2046],{"class":889},[863,2116,2117],{"class":893}," RateLimitError ",[863,2119,2052],{"class":889},[863,2121,2055],{"class":893},[863,2123,1593],{"class":921},[863,2125,2127,2129,2131,2133,2136,2138,2140,2142,2145,2147,2150],{"class":865,"line":2126},15,[863,2128,1598],{"class":972},[863,2130,922],{"class":921},[863,2132,2067],{"class":1198},[863,2134,2135],{"class":873},"\"Rate limited — retry after ",[863,2137,2073],{"class":990},[863,2139,2076],{"class":917},[863,2141,47],{"class":921},[863,2143,2144],{"class":983},"retry_after",[863,2146,2079],{"class":990},[863,2148,2149],{"class":873}," seconds\"",[863,2151,940],{"class":921},[863,2153,2155,2157,2160],{"class":865,"line":2154},16,[863,2156,2046],{"class":889},[863,2158,2159],{"class":893}," NotFoundError",[863,2161,1593],{"class":921},[863,2163,2165,2167,2169,2171,2174,2176],{"class":865,"line":2164},17,[863,2166,1598],{"class":972},[863,2168,922],{"class":921},[863,2170,932],{"class":931},[863,2172,2173],{"class":873},"No PLSS data at that location",[863,2175,932],{"class":931},[863,2177,940],{"class":921},[22,2179,2181],{"id":2180},"context-manager","Context manager",[10,2183,2184,2185,2188],{},"The client supports ",[183,2186,2187],{},"with"," statements for automatic cleanup:",[223,2190,2192],{"className":880,"code":2191,"language":882,"meta":231,"style":231},"with TownshipAmerica(api_key=os.environ[\"TOWNSHIPAMERICA_API_KEY\"]) as client:\n    result = client.search(\"NENE 12 4N 5E Indian Meridian\")\n    print(result.features[0].properties)\n# Connection closed automatically\n",[183,2193,2194,2230,2252,2274],{"__ignoreMap":231},[863,2195,2196,2198,2200,2202,2204,2206,2208,2210,2212,2214,2216,2218,2220,2223,2226,2228],{"class":865,"line":866},[863,2197,2187],{"class":889},[863,2199,918],{"class":917},[863,2201,922],{"class":921},[863,2203,926],{"class":925},[863,2205,914],{"class":913},[863,2207,1258],{"class":917},[863,2209,47],{"class":921},[863,2211,1263],{"class":983},[863,2213,987],{"class":921},[863,2215,932],{"class":931},[863,2217,1270],{"class":873},[863,2219,932],{"class":931},[863,2221,2222],{"class":921},"])",[863,2224,2225],{"class":889}," as",[863,2227,951],{"class":893},[863,2229,1593],{"class":921},[863,2231,2232,2234,2236,2238,2240,2242,2244,2246,2248,2250],{"class":865,"line":436},[863,2233,2022],{"class":893},[863,2235,914],{"class":913},[863,2237,951],{"class":893},[863,2239,47],{"class":921},[863,2241,956],{"class":917},[863,2243,922],{"class":921},[863,2245,932],{"class":931},[863,2247,146],{"class":873},[863,2249,932],{"class":931},[863,2251,940],{"class":921},[863,2253,2254,2256,2258,2260,2262,2264,2266,2268,2270,2272],{"class":865,"line":441},[863,2255,1598],{"class":972},[863,2257,922],{"class":921},[863,2259,978],{"class":917},[863,2261,47],{"class":921},[863,2263,984],{"class":983},[863,2265,987],{"class":921},[863,2267,991],{"class":990},[863,2269,994],{"class":921},[863,2271,997],{"class":983},[863,2273,940],{"class":921},[863,2275,2276],{"class":865,"line":943},[863,2277,2278],{"class":1342},"# Connection closed automatically\n",[22,2280,1036],{"id":1035},[173,2282,2283,2289,2295],{},[176,2284,2285,2288],{},[264,2286,2287],{"href":1009},"Python SDK Async & GeoPandas Patterns"," - Async workflows, GeoPandas integration, and production patterns",[176,2290,2291,2294],{},[264,2292,2293],{"href":411},"API Integration Guide"," - REST API endpoints, pricing, and integration patterns",[176,2296,2297,1062],{},[264,2298,1061],{"href":425},[10,2300,2301,2302,2304,2305,47],{},"Need help? ",[264,2303,1075],{"href":432}," or open an issue on ",[264,2306,2309],{"href":2307,"rel":2308},"https:\u002F\u002Fgithub.com\u002Fmepa1363\u002Ftownshipamerica-web\u002Fissues",[1030],"GitHub",[1078,2311,2312],{},"html pre.shiki code .sbgvK, html code.shiki .sbgvK{--shiki-light:#E2931D;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}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 .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}",{"title":231,"searchDepth":436,"depth":436,"links":2314},[2315,2316,2321,2322,2323,2324,2325,2326],{"id":1137,"depth":436,"text":1138},{"id":1167,"depth":436,"text":1168,"children":2317},[2318,2319,2320],{"id":497,"depth":441,"text":498},{"id":1184,"depth":441,"text":1185},{"id":1214,"depth":441,"text":1215},{"id":1380,"depth":436,"text":1381},{"id":1528,"depth":436,"text":1529},{"id":1695,"depth":436,"text":426},{"id":1948,"depth":436,"text":1949},{"id":2180,"depth":436,"text":2181},{"id":1035,"depth":436,"text":1036},"Install the townshipamerica Python package and convert PLSS legal land descriptions to GPS coordinates in four lines of code. Typed responses, sync and async clients.","i-lucide-terminal",{},{"title":1125,"description":2327},"guides\u002Fpython-sdk","pYFB5zyw_PgAylATNjsk1zWojezvE8suKc6YbWGD1gE",{"id":2334,"title":2335,"body":2336,"category":462,"description":4408,"extension":464,"icon":4409,"meta":4410,"navigation":467,"order":441,"path":1009,"seo":4411,"stem":4412,"__hash__":4413},"guides\u002Fguides\u002Fpython-sdk-advanced.md","Python SDK Advanced Patterns — Async, GeoPandas, and Production Workflows",{"type":7,"value":2337,"toc":4395},[2338,2344,2348,2358,2524,2537,2541,2547,2695,2701,2705,2708,3028,3032,3145,3149,3152,3544,3548,3551,3773,3777,3780,4170,4174,4185,4368,4370,4385,4392],[10,2339,2340,2341,2343],{},"Production patterns for the ",[183,2342,1133],{}," Python SDK — async clients for high-throughput pipelines, GeoPandas integration for spatial analysis, and patterns for O&G, agriculture, and GIS workflows.",[22,2345,2347],{"id":2346},"async-client","Async client",[10,2349,15,2350,2353,2354,2357],{},[183,2351,2352],{},"AsyncTownshipAmerica"," client uses ",[183,2355,2356],{},"httpx.AsyncClient"," under the hood — ideal for web servers, data pipelines, and concurrent workflows.",[223,2359,2361],{"className":880,"code":2360,"language":882,"meta":231,"style":231},"import asyncio\nimport os\nfrom townshipamerica import AsyncTownshipAmerica\n\nasync def main():\n    async with AsyncTownshipAmerica(\n        api_key=os.environ[\"TOWNSHIPAMERICA_API_KEY\"]\n    ) as client:\n        result = await client.search(\"NENE 12 4N 5E Indian Meridian\")\n        print(result.features[0].properties)\n\nasyncio.run(main())\n",[183,2362,2363,2370,2376,2387,2391,2406,2419,2442,2453,2479,2502,2506],{"__ignoreMap":231},[863,2364,2365,2367],{"class":865,"line":866},[863,2366,897],{"class":889},[863,2368,2369],{"class":893}," asyncio\n",[863,2371,2372,2374],{"class":865,"line":436},[863,2373,897],{"class":889},[863,2375,1227],{"class":893},[863,2377,2378,2380,2382,2384],{"class":865,"line":441},[863,2379,890],{"class":889},[863,2381,894],{"class":893},[863,2383,897],{"class":889},[863,2385,2386],{"class":893}," AsyncTownshipAmerica\n",[863,2388,2389],{"class":865,"line":943},[863,2390,905],{"emptyLinePlaceholder":467},[863,2392,2393,2396,2399,2403],{"class":865,"line":969},[863,2394,2395],{"class":1198},"async",[863,2397,2398],{"class":1198}," def",[863,2400,2402],{"class":2401},"sGLFI"," main",[863,2404,2405],{"class":921},"():\n",[863,2407,2408,2411,2414,2417],{"class":865,"line":468},[863,2409,2410],{"class":889},"    async",[863,2412,2413],{"class":889}," with",[863,2415,2416],{"class":917}," AsyncTownshipAmerica",[863,2418,1645],{"class":921},[863,2420,2421,2424,2426,2428,2430,2432,2434,2436,2438,2440],{"class":865,"line":1304},[863,2422,2423],{"class":925},"        api_key",[863,2425,914],{"class":913},[863,2427,1258],{"class":917},[863,2429,47],{"class":921},[863,2431,1263],{"class":983},[863,2433,987],{"class":921},[863,2435,932],{"class":931},[863,2437,1270],{"class":873},[863,2439,932],{"class":931},[863,2441,1323],{"class":921},[863,2443,2444,2447,2449,2451],{"class":865,"line":1326},[863,2445,2446],{"class":921},"    )",[863,2448,2225],{"class":889},[863,2450,951],{"class":893},[863,2452,1593],{"class":921},[863,2454,2455,2458,2460,2463,2465,2467,2469,2471,2473,2475,2477],{"class":865,"line":1346},[863,2456,2457],{"class":893},"        result ",[863,2459,914],{"class":913},[863,2461,2462],{"class":889}," await",[863,2464,951],{"class":893},[863,2466,47],{"class":921},[863,2468,956],{"class":917},[863,2470,922],{"class":921},[863,2472,932],{"class":931},[863,2474,146],{"class":873},[863,2476,932],{"class":931},[863,2478,940],{"class":921},[863,2480,2481,2484,2486,2488,2490,2492,2494,2496,2498,2500],{"class":865,"line":1811},[863,2482,2483],{"class":972},"        print",[863,2485,922],{"class":921},[863,2487,978],{"class":917},[863,2489,47],{"class":921},[863,2491,984],{"class":983},[863,2493,987],{"class":921},[863,2495,991],{"class":990},[863,2497,994],{"class":921},[863,2499,997],{"class":983},[863,2501,940],{"class":921},[863,2503,2504],{"class":865,"line":2060},[863,2505,905],{"emptyLinePlaceholder":467},[863,2507,2508,2511,2513,2516,2518,2521],{"class":865,"line":2086},[863,2509,2510],{"class":893},"asyncio",[863,2512,47],{"class":921},[863,2514,2515],{"class":917},"run",[863,2517,922],{"class":921},[863,2519,2520],{"class":917},"main",[863,2522,2523],{"class":921},"())\n",[10,2525,2526,2527,1160,2529,1160,2531,1160,2533,1160,2535,47],{},"Every method on the sync client has an async equivalent — ",[183,2528,956],{},[183,2530,1402],{},[183,2532,1528],{},[183,2534,1767],{},[183,2536,1927],{},[30,2538,2540],{"id":2539},"concurrent-requests","Concurrent requests",[10,2542,2543,2544,1482],{},"Process multiple locations concurrently with ",[183,2545,2546],{},"asyncio.gather",[223,2548,2550],{"className":880,"code":2549,"language":882,"meta":231,"style":231},"async def convert_many(descriptions: list[str]):\n    async with AsyncTownshipAmerica(\n        api_key=os.environ[\"TOWNSHIPAMERICA_API_KEY\"]\n    ) as client:\n        tasks = [client.search(desc) for desc in descriptions]\n        results = await asyncio.gather(*tasks)\n        return results\n",[183,2551,2552,2581,2591,2613,2623,2660,2687],{"__ignoreMap":231},[863,2553,2554,2556,2558,2561,2563,2567,2569,2572,2574,2578],{"class":865,"line":866},[863,2555,2395],{"class":1198},[863,2557,2398],{"class":1198},[863,2559,2560],{"class":2401}," convert_many",[863,2562,922],{"class":921},[863,2564,2566],{"class":2565},"sFwrP","descriptions",[863,2568,1482],{"class":921},[863,2570,2571],{"class":893}," list",[863,2573,987],{"class":921},[863,2575,2577],{"class":2576},"sZMiF","str",[863,2579,2580],{"class":921},"]):\n",[863,2582,2583,2585,2587,2589],{"class":865,"line":436},[863,2584,2410],{"class":889},[863,2586,2413],{"class":889},[863,2588,2416],{"class":917},[863,2590,1645],{"class":921},[863,2592,2593,2595,2597,2599,2601,2603,2605,2607,2609,2611],{"class":865,"line":441},[863,2594,2423],{"class":925},[863,2596,914],{"class":913},[863,2598,1258],{"class":917},[863,2600,47],{"class":921},[863,2602,1263],{"class":983},[863,2604,987],{"class":921},[863,2606,932],{"class":931},[863,2608,1270],{"class":873},[863,2610,932],{"class":931},[863,2612,1323],{"class":921},[863,2614,2615,2617,2619,2621],{"class":865,"line":943},[863,2616,2446],{"class":921},[863,2618,2225],{"class":889},[863,2620,951],{"class":893},[863,2622,1593],{"class":921},[863,2624,2625,2628,2630,2633,2636,2638,2640,2642,2645,2647,2650,2653,2655,2658],{"class":865,"line":969},[863,2626,2627],{"class":893},"        tasks ",[863,2629,914],{"class":913},[863,2631,2632],{"class":921}," [",[863,2634,2635],{"class":893},"client",[863,2637,47],{"class":921},[863,2639,956],{"class":917},[863,2641,922],{"class":921},[863,2643,2644],{"class":917},"desc",[863,2646,186],{"class":921},[863,2648,2649],{"class":889}," for",[863,2651,2652],{"class":893}," desc ",[863,2654,1582],{"class":889},[863,2656,2657],{"class":893}," descriptions",[863,2659,1323],{"class":921},[863,2661,2662,2665,2667,2669,2672,2674,2677,2679,2682,2685],{"class":865,"line":468},[863,2663,2664],{"class":893},"        results ",[863,2666,914],{"class":913},[863,2668,2462],{"class":889},[863,2670,2671],{"class":893}," asyncio",[863,2673,47],{"class":921},[863,2675,2676],{"class":917},"gather",[863,2678,922],{"class":921},[863,2680,2681],{"class":913},"*",[863,2683,2684],{"class":917},"tasks",[863,2686,940],{"class":921},[863,2688,2689,2692],{"class":865,"line":1304},[863,2690,2691],{"class":889},"        return",[863,2693,2694],{"class":893}," results\n",[10,2696,2697,2698,2700],{},"For large lists, use ",[183,2699,1767],{}," instead — it handles up to 100 locations per request server-side, which is faster than 100 concurrent individual calls.",[22,2702,2704],{"id":2703},"geopandas-integration","GeoPandas integration",[10,2706,2707],{},"Convert PLSS search results to a GeoPandas GeoDataFrame for spatial analysis:",[223,2709,2711],{"className":880,"code":2710,"language":882,"meta":231,"style":231},"import geopandas as gpd\nfrom shapely.geometry import shape\nfrom townshipamerica import TownshipAmerica\n\nclient = TownshipAmerica(api_key=os.environ[\"TOWNSHIPAMERICA_API_KEY\"])\n\nlocations = [\n    \"NENE 12 4N 5E Indian Meridian\",\n    \"SWNE 3 5N 11W Indian Meridian\",\n    \"SWNE 22 3N 7E Montana Meridian\",\n]\n\nresults = client.batch_search(locations)\n\nfeatures = []\nfor fc in results:\n    f = fc.features[0]\n    features.append({\n        \"descriptor\": f.properties.descriptor,\n        \"geometry\": shape(f.geometry.model_dump()),\n    })\n\ngdf = gpd.GeoDataFrame(features, crs=\"EPSG:4326\")\nprint(gdf)\n",[183,2712,2713,2725,2742,2752,2756,2786,2790,2798,2808,2819,2829,2833,2837,2855,2859,2869,2881,2900,2914,2939,2969,2975,2980,3016],{"__ignoreMap":231},[863,2714,2715,2717,2720,2722],{"class":865,"line":866},[863,2716,897],{"class":889},[863,2718,2719],{"class":893}," geopandas ",[863,2721,2052],{"class":889},[863,2723,2724],{"class":893}," gpd\n",[863,2726,2727,2729,2732,2734,2737,2739],{"class":865,"line":436},[863,2728,890],{"class":889},[863,2730,2731],{"class":893}," shapely",[863,2733,47],{"class":921},[863,2735,2736],{"class":893},"geometry ",[863,2738,897],{"class":889},[863,2740,2741],{"class":893}," shape\n",[863,2743,2744,2746,2748,2750],{"class":865,"line":441},[863,2745,890],{"class":889},[863,2747,894],{"class":893},[863,2749,897],{"class":889},[863,2751,900],{"class":893},[863,2753,2754],{"class":865,"line":943},[863,2755,905],{"emptyLinePlaceholder":467},[863,2757,2758,2760,2762,2764,2766,2768,2770,2772,2774,2776,2778,2780,2782,2784],{"class":865,"line":969},[863,2759,910],{"class":893},[863,2761,914],{"class":913},[863,2763,918],{"class":917},[863,2765,922],{"class":921},[863,2767,926],{"class":925},[863,2769,914],{"class":913},[863,2771,1258],{"class":917},[863,2773,47],{"class":921},[863,2775,1263],{"class":983},[863,2777,987],{"class":921},[863,2779,932],{"class":931},[863,2781,1270],{"class":873},[863,2783,932],{"class":931},[863,2785,1275],{"class":921},[863,2787,2788],{"class":865,"line":468},[863,2789,905],{"emptyLinePlaceholder":467},[863,2791,2792,2794,2796],{"class":865,"line":1304},[863,2793,1708],{"class":893},[863,2795,914],{"class":913},[863,2797,1713],{"class":921},[863,2799,2800,2802,2804,2806],{"class":865,"line":1326},[863,2801,1650],{"class":931},[863,2803,146],{"class":873},[863,2805,932],{"class":931},[863,2807,1658],{"class":921},[863,2809,2810,2812,2815,2817],{"class":865,"line":1346},[863,2811,1650],{"class":931},[863,2813,2814],{"class":873},"SWNE 3 5N 11W Indian Meridian",[863,2816,932],{"class":931},[863,2818,1658],{"class":921},[863,2820,2821,2823,2825,2827],{"class":865,"line":1811},[863,2822,1650],{"class":931},[863,2824,1741],{"class":873},[863,2826,932],{"class":931},[863,2828,1658],{"class":921},[863,2830,2831],{"class":865,"line":2060},[863,2832,1323],{"class":921},[863,2834,2835],{"class":865,"line":2086},[863,2836,905],{"emptyLinePlaceholder":467},[863,2838,2839,2841,2843,2845,2847,2849,2851,2853],{"class":865,"line":2096},[863,2840,1758],{"class":893},[863,2842,914],{"class":913},[863,2844,951],{"class":893},[863,2846,47],{"class":921},[863,2848,1767],{"class":917},[863,2850,922],{"class":921},[863,2852,1772],{"class":917},[863,2854,940],{"class":921},[863,2856,2857],{"class":865,"line":2112},[863,2858,905],{"emptyLinePlaceholder":467},[863,2860,2861,2864,2866],{"class":865,"line":2126},[863,2862,2863],{"class":893},"features ",[863,2865,914],{"class":913},[863,2867,2868],{"class":921}," []\n",[863,2870,2871,2873,2875,2877,2879],{"class":865,"line":2154},[863,2872,1576],{"class":889},[863,2874,1781],{"class":893},[863,2876,1582],{"class":889},[863,2878,1786],{"class":893},[863,2880,1593],{"class":921},[863,2882,2883,2886,2888,2890,2892,2894,2896,2898],{"class":865,"line":2164},[863,2884,2885],{"class":893},"    f ",[863,2887,914],{"class":913},[863,2889,1798],{"class":893},[863,2891,47],{"class":921},[863,2893,984],{"class":983},[863,2895,987],{"class":921},[863,2897,991],{"class":990},[863,2899,1323],{"class":921},[863,2901,2903,2906,2908,2911],{"class":865,"line":2902},18,[863,2904,2905],{"class":893},"    features",[863,2907,47],{"class":921},[863,2909,2910],{"class":917},"append",[863,2912,2913],{"class":921},"({\n",[863,2915,2917,2920,2922,2924,2926,2929,2931,2933,2935,2937],{"class":865,"line":2916},19,[863,2918,2919],{"class":931},"        \"",[863,2921,1457],{"class":873},[863,2923,932],{"class":931},[863,2925,1482],{"class":921},[863,2927,2928],{"class":917}," f",[863,2930,47],{"class":921},[863,2932,997],{"class":983},[863,2934,47],{"class":921},[863,2936,1457],{"class":983},[863,2938,1658],{"class":921},[863,2940,2942,2944,2946,2948,2950,2953,2955,2957,2959,2961,2963,2966],{"class":865,"line":2941},20,[863,2943,2919],{"class":931},[863,2945,1357],{"class":873},[863,2947,932],{"class":931},[863,2949,1482],{"class":921},[863,2951,2952],{"class":917}," shape",[863,2954,922],{"class":921},[863,2956,2067],{"class":917},[863,2958,47],{"class":921},[863,2960,1357],{"class":983},[863,2962,47],{"class":921},[863,2964,2965],{"class":917},"model_dump",[863,2967,2968],{"class":921},"()),\n",[863,2970,2972],{"class":865,"line":2971},21,[863,2973,2974],{"class":921},"    })\n",[863,2976,2978],{"class":865,"line":2977},22,[863,2979,905],{"emptyLinePlaceholder":467},[863,2981,2983,2986,2988,2991,2993,2996,2998,3000,3002,3005,3007,3009,3012,3014],{"class":865,"line":2982},23,[863,2984,2985],{"class":893},"gdf ",[863,2987,914],{"class":913},[863,2989,2990],{"class":893}," gpd",[863,2992,47],{"class":921},[863,2994,2995],{"class":917},"GeoDataFrame",[863,2997,922],{"class":921},[863,2999,984],{"class":917},[863,3001,1413],{"class":921},[863,3003,3004],{"class":925}," crs",[863,3006,914],{"class":913},[863,3008,932],{"class":931},[863,3010,3011],{"class":873},"EPSG:4326",[863,3013,932],{"class":931},[863,3015,940],{"class":921},[863,3017,3019,3021,3023,3026],{"class":865,"line":3018},24,[863,3020,973],{"class":972},[863,3022,922],{"class":921},[863,3024,3025],{"class":917},"gdf",[863,3027,940],{"class":921},[30,3029,3031],{"id":3030},"export-to-file","Export to file",[223,3033,3035],{"className":880,"code":3034,"language":882,"meta":231,"style":231},"# GeoJSON\ngdf.to_file(\"well_sites.geojson\", driver=\"GeoJSON\")\n\n# Shapefile\ngdf.to_file(\"well_sites.shp\")\n\n# GeoPackage\ngdf.to_file(\"well_sites.gpkg\", driver=\"GPKG\")\n",[183,3036,3037,3042,3076,3080,3085,3104,3108,3113],{"__ignoreMap":231},[863,3038,3039],{"class":865,"line":866},[863,3040,3041],{"class":1342},"# GeoJSON\n",[863,3043,3044,3046,3048,3051,3053,3055,3058,3060,3062,3065,3067,3069,3072,3074],{"class":865,"line":436},[863,3045,3025],{"class":893},[863,3047,47],{"class":921},[863,3049,3050],{"class":917},"to_file",[863,3052,922],{"class":921},[863,3054,932],{"class":931},[863,3056,3057],{"class":873},"well_sites.geojson",[863,3059,932],{"class":931},[863,3061,1413],{"class":921},[863,3063,3064],{"class":925}," driver",[863,3066,914],{"class":913},[863,3068,932],{"class":931},[863,3070,3071],{"class":873},"GeoJSON",[863,3073,932],{"class":931},[863,3075,940],{"class":921},[863,3077,3078],{"class":865,"line":441},[863,3079,905],{"emptyLinePlaceholder":467},[863,3081,3082],{"class":865,"line":943},[863,3083,3084],{"class":1342},"# Shapefile\n",[863,3086,3087,3089,3091,3093,3095,3097,3100,3102],{"class":865,"line":969},[863,3088,3025],{"class":893},[863,3090,47],{"class":921},[863,3092,3050],{"class":917},[863,3094,922],{"class":921},[863,3096,932],{"class":931},[863,3098,3099],{"class":873},"well_sites.shp",[863,3101,932],{"class":931},[863,3103,940],{"class":921},[863,3105,3106],{"class":865,"line":468},[863,3107,905],{"emptyLinePlaceholder":467},[863,3109,3110],{"class":865,"line":1304},[863,3111,3112],{"class":1342},"# GeoPackage\n",[863,3114,3115,3117,3119,3121,3123,3125,3128,3130,3132,3134,3136,3138,3141,3143],{"class":865,"line":1326},[863,3116,3025],{"class":893},[863,3118,47],{"class":921},[863,3120,3050],{"class":917},[863,3122,922],{"class":921},[863,3124,932],{"class":931},[863,3126,3127],{"class":873},"well_sites.gpkg",[863,3129,932],{"class":931},[863,3131,1413],{"class":921},[863,3133,3064],{"class":925},[863,3135,914],{"class":913},[863,3137,932],{"class":931},[863,3139,3140],{"class":873},"GPKG",[863,3142,932],{"class":931},[863,3144,940],{"class":921},[22,3146,3148],{"id":3147},"og-well-site-mapping","O&G well site mapping",[10,3150,3151],{},"A common O&G workflow: take a list of PLSS locations from an APD spreadsheet, convert to coordinates, and plot on a map.",[223,3153,3155],{"className":880,"code":3154,"language":882,"meta":231,"style":231},"import csv\nimport os\nfrom townshipamerica import TownshipAmerica\n\nclient = TownshipAmerica(api_key=os.environ[\"TOWNSHIPAMERICA_API_KEY\"])\n\n# Read PLSS descriptions from a CSV\nwith open(\"apd_locations.csv\") as f:\n    reader = csv.DictReader(f)\n    descriptions = [row[\"legal_description\"] for row in reader]\n\n# Batch convert (max 100 per request)\nall_results = []\nfor i in range(0, len(descriptions), 100):\n    batch = descriptions[i:i + 100]\n    all_results.extend(client.batch_search(batch))\n\n# Extract centroids\nfor desc, fc in zip(descriptions, all_results):\n    feature = fc.features[0]\n    coords = feature.geometry.coordinates[0][0]\n    print(f\"{desc} → {coords[1]:.6f}, {coords[0]:.6f}\")\n",[183,3156,3157,3164,3170,3180,3184,3214,3218,3223,3247,3268,3304,3308,3313,3322,3355,3381,3407,3411,3416,3443,3461,3488],{"__ignoreMap":231},[863,3158,3159,3161],{"class":865,"line":866},[863,3160,897],{"class":889},[863,3162,3163],{"class":893}," csv\n",[863,3165,3166,3168],{"class":865,"line":436},[863,3167,897],{"class":889},[863,3169,1227],{"class":893},[863,3171,3172,3174,3176,3178],{"class":865,"line":441},[863,3173,890],{"class":889},[863,3175,894],{"class":893},[863,3177,897],{"class":889},[863,3179,900],{"class":893},[863,3181,3182],{"class":865,"line":943},[863,3183,905],{"emptyLinePlaceholder":467},[863,3185,3186,3188,3190,3192,3194,3196,3198,3200,3202,3204,3206,3208,3210,3212],{"class":865,"line":969},[863,3187,910],{"class":893},[863,3189,914],{"class":913},[863,3191,918],{"class":917},[863,3193,922],{"class":921},[863,3195,926],{"class":925},[863,3197,914],{"class":913},[863,3199,1258],{"class":917},[863,3201,47],{"class":921},[863,3203,1263],{"class":983},[863,3205,987],{"class":921},[863,3207,932],{"class":931},[863,3209,1270],{"class":873},[863,3211,932],{"class":931},[863,3213,1275],{"class":921},[863,3215,3216],{"class":865,"line":468},[863,3217,905],{"emptyLinePlaceholder":467},[863,3219,3220],{"class":865,"line":1304},[863,3221,3222],{"class":1342},"# Read PLSS descriptions from a CSV\n",[863,3224,3225,3227,3230,3232,3234,3237,3239,3241,3243,3245],{"class":865,"line":1326},[863,3226,2187],{"class":889},[863,3228,3229],{"class":972}," open",[863,3231,922],{"class":921},[863,3233,932],{"class":931},[863,3235,3236],{"class":873},"apd_locations.csv",[863,3238,932],{"class":931},[863,3240,186],{"class":921},[863,3242,2225],{"class":889},[863,3244,2928],{"class":893},[863,3246,1593],{"class":921},[863,3248,3249,3252,3254,3257,3259,3262,3264,3266],{"class":865,"line":1346},[863,3250,3251],{"class":893},"    reader ",[863,3253,914],{"class":913},[863,3255,3256],{"class":893}," csv",[863,3258,47],{"class":921},[863,3260,3261],{"class":917},"DictReader",[863,3263,922],{"class":921},[863,3265,2067],{"class":917},[863,3267,940],{"class":921},[863,3269,3270,3273,3275,3277,3280,3282,3284,3287,3289,3292,3294,3297,3299,3302],{"class":865,"line":1811},[863,3271,3272],{"class":893},"    descriptions ",[863,3274,914],{"class":913},[863,3276,2632],{"class":921},[863,3278,3279],{"class":893},"row",[863,3281,987],{"class":921},[863,3283,932],{"class":931},[863,3285,3286],{"class":873},"legal_description",[863,3288,932],{"class":931},[863,3290,3291],{"class":921},"]",[863,3293,2649],{"class":889},[863,3295,3296],{"class":893}," row ",[863,3298,1582],{"class":889},[863,3300,3301],{"class":893}," reader",[863,3303,1323],{"class":921},[863,3305,3306],{"class":865,"line":2060},[863,3307,905],{"emptyLinePlaceholder":467},[863,3309,3310],{"class":865,"line":2086},[863,3311,3312],{"class":1342},"# Batch convert (max 100 per request)\n",[863,3314,3315,3318,3320],{"class":865,"line":2096},[863,3316,3317],{"class":893},"all_results ",[863,3319,914],{"class":913},[863,3321,2868],{"class":921},[863,3323,3324,3326,3329,3331,3334,3336,3338,3340,3343,3345,3347,3349,3352],{"class":865,"line":2112},[863,3325,1576],{"class":889},[863,3327,3328],{"class":893}," i ",[863,3330,1582],{"class":889},[863,3332,3333],{"class":972}," range",[863,3335,922],{"class":921},[863,3337,991],{"class":990},[863,3339,1413],{"class":921},[863,3341,3342],{"class":972}," len",[863,3344,922],{"class":921},[863,3346,2566],{"class":917},[863,3348,1884],{"class":921},[863,3350,3351],{"class":990}," 100",[863,3353,3354],{"class":921},"):\n",[863,3356,3357,3360,3362,3364,3366,3369,3371,3374,3377,3379],{"class":865,"line":2126},[863,3358,3359],{"class":893},"    batch ",[863,3361,914],{"class":913},[863,3363,2657],{"class":893},[863,3365,987],{"class":921},[863,3367,3368],{"class":893},"i",[863,3370,1482],{"class":921},[863,3372,3373],{"class":893},"i ",[863,3375,3376],{"class":913},"+",[863,3378,3351],{"class":990},[863,3380,1323],{"class":921},[863,3382,3383,3386,3388,3391,3393,3395,3397,3399,3401,3404],{"class":865,"line":2154},[863,3384,3385],{"class":893},"    all_results",[863,3387,47],{"class":921},[863,3389,3390],{"class":917},"extend",[863,3392,922],{"class":921},[863,3394,2635],{"class":917},[863,3396,47],{"class":921},[863,3398,1767],{"class":917},[863,3400,922],{"class":921},[863,3402,3403],{"class":917},"batch",[863,3405,3406],{"class":921},"))\n",[863,3408,3409],{"class":865,"line":2164},[863,3410,905],{"emptyLinePlaceholder":467},[863,3412,3413],{"class":865,"line":2902},[863,3414,3415],{"class":1342},"# Extract centroids\n",[863,3417,3418,3420,3423,3425,3427,3429,3432,3434,3436,3438,3441],{"class":865,"line":2916},[863,3419,1576],{"class":889},[863,3421,3422],{"class":893}," desc",[863,3424,1413],{"class":921},[863,3426,1781],{"class":893},[863,3428,1582],{"class":889},[863,3430,3431],{"class":972}," zip",[863,3433,922],{"class":921},[863,3435,2566],{"class":917},[863,3437,1413],{"class":921},[863,3439,3440],{"class":917}," all_results",[863,3442,3354],{"class":921},[863,3444,3445,3447,3449,3451,3453,3455,3457,3459],{"class":865,"line":2941},[863,3446,1793],{"class":893},[863,3448,914],{"class":913},[863,3450,1798],{"class":893},[863,3452,47],{"class":921},[863,3454,984],{"class":983},[863,3456,987],{"class":921},[863,3458,991],{"class":990},[863,3460,1323],{"class":921},[863,3462,3463,3466,3468,3470,3472,3474,3476,3478,3480,3482,3484,3486],{"class":865,"line":2971},[863,3464,3465],{"class":893},"    coords ",[863,3467,914],{"class":913},[863,3469,1830],{"class":893},[863,3471,47],{"class":921},[863,3473,1357],{"class":983},[863,3475,47],{"class":921},[863,3477,1362],{"class":983},[863,3479,987],{"class":921},[863,3481,991],{"class":990},[863,3483,1845],{"class":921},[863,3485,991],{"class":990},[863,3487,1323],{"class":921},[863,3489,3490,3492,3494,3496,3498,3500,3502,3504,3507,3509,3512,3514,3517,3519,3522,3524,3526,3528,3530,3532,3534,3536,3538,3540,3542],{"class":865,"line":2977},[863,3491,1598],{"class":972},[863,3493,922],{"class":921},[863,3495,2067],{"class":1198},[863,3497,932],{"class":873},[863,3499,2073],{"class":990},[863,3501,2644],{"class":917},[863,3503,2079],{"class":990},[863,3505,3506],{"class":873}," → ",[863,3508,2073],{"class":990},[863,3510,3511],{"class":917},"coords",[863,3513,987],{"class":921},[863,3515,3516],{"class":990},"1",[863,3518,3291],{"class":921},[863,3520,3521],{"class":1198},":.6f",[863,3523,2079],{"class":990},[863,3525,1160],{"class":873},[863,3527,2073],{"class":990},[863,3529,3511],{"class":917},[863,3531,987],{"class":921},[863,3533,991],{"class":990},[863,3535,3291],{"class":921},[863,3537,3521],{"class":1198},[863,3539,2079],{"class":990},[863,3541,932],{"class":873},[863,3543,940],{"class":921},[22,3545,3547],{"id":3546},"agriculture-fsa-quarter-section-verification","Agriculture — FSA quarter section verification",[10,3549,3550],{},"Verify quarter section descriptions from crop insurance filings:",[223,3552,3554],{"className":880,"code":3553,"language":882,"meta":231,"style":231},"# Verify a list of quarter sections from an FSA filing\nfilings = [\n    \"SWNE 22 9N 15W Indian Meridian\",\n    \"NWSE 22 9N 15W Indian Meridian\",\n    \"SENE 22 9N 15W Indian Meridian\",\n]\n\nresults = client.batch_search(filings)\nfor filing, fc in zip(filings, results):\n    feature = fc.features[0]\n    print(f\"{filing}\")\n    print(f\"  Verified: {feature.properties.descriptor}\")\n    print(f\"  Coordinates: {feature.geometry.coordinates[0][0][:2]}\")\n    print()\n",[183,3555,3556,3561,3570,3581,3592,3603,3607,3611,3630,3655,3673,3694,3723,3766],{"__ignoreMap":231},[863,3557,3558],{"class":865,"line":866},[863,3559,3560],{"class":1342},"# Verify a list of quarter sections from an FSA filing\n",[863,3562,3563,3566,3568],{"class":865,"line":436},[863,3564,3565],{"class":893},"filings ",[863,3567,914],{"class":913},[863,3569,1713],{"class":921},[863,3571,3572,3574,3577,3579],{"class":865,"line":441},[863,3573,1650],{"class":931},[863,3575,3576],{"class":873},"SWNE 22 9N 15W Indian Meridian",[863,3578,932],{"class":931},[863,3580,1658],{"class":921},[863,3582,3583,3585,3588,3590],{"class":865,"line":943},[863,3584,1650],{"class":931},[863,3586,3587],{"class":873},"NWSE 22 9N 15W Indian Meridian",[863,3589,932],{"class":931},[863,3591,1658],{"class":921},[863,3593,3594,3596,3599,3601],{"class":865,"line":969},[863,3595,1650],{"class":931},[863,3597,3598],{"class":873},"SENE 22 9N 15W Indian Meridian",[863,3600,932],{"class":931},[863,3602,1658],{"class":921},[863,3604,3605],{"class":865,"line":468},[863,3606,1323],{"class":921},[863,3608,3609],{"class":865,"line":1304},[863,3610,905],{"emptyLinePlaceholder":467},[863,3612,3613,3615,3617,3619,3621,3623,3625,3628],{"class":865,"line":1326},[863,3614,1758],{"class":893},[863,3616,914],{"class":913},[863,3618,951],{"class":893},[863,3620,47],{"class":921},[863,3622,1767],{"class":917},[863,3624,922],{"class":921},[863,3626,3627],{"class":917},"filings",[863,3629,940],{"class":921},[863,3631,3632,3634,3637,3639,3641,3643,3645,3647,3649,3651,3653],{"class":865,"line":1346},[863,3633,1576],{"class":889},[863,3635,3636],{"class":893}," filing",[863,3638,1413],{"class":921},[863,3640,1781],{"class":893},[863,3642,1582],{"class":889},[863,3644,3431],{"class":972},[863,3646,922],{"class":921},[863,3648,3627],{"class":917},[863,3650,1413],{"class":921},[863,3652,1786],{"class":917},[863,3654,3354],{"class":921},[863,3656,3657,3659,3661,3663,3665,3667,3669,3671],{"class":865,"line":1811},[863,3658,1793],{"class":893},[863,3660,914],{"class":913},[863,3662,1798],{"class":893},[863,3664,47],{"class":921},[863,3666,984],{"class":983},[863,3668,987],{"class":921},[863,3670,991],{"class":990},[863,3672,1323],{"class":921},[863,3674,3675,3677,3679,3681,3683,3685,3688,3690,3692],{"class":865,"line":2060},[863,3676,1598],{"class":972},[863,3678,922],{"class":921},[863,3680,2067],{"class":1198},[863,3682,932],{"class":873},[863,3684,2073],{"class":990},[863,3686,3687],{"class":917},"filing",[863,3689,2079],{"class":990},[863,3691,932],{"class":873},[863,3693,940],{"class":921},[863,3695,3696,3698,3700,3702,3705,3707,3709,3711,3713,3715,3717,3719,3721],{"class":865,"line":2086},[863,3697,1598],{"class":972},[863,3699,922],{"class":921},[863,3701,2067],{"class":1198},[863,3703,3704],{"class":873},"\"  Verified: ",[863,3706,2073],{"class":990},[863,3708,1333],{"class":917},[863,3710,47],{"class":921},[863,3712,997],{"class":983},[863,3714,47],{"class":921},[863,3716,1457],{"class":983},[863,3718,2079],{"class":990},[863,3720,932],{"class":873},[863,3722,940],{"class":921},[863,3724,3725,3727,3729,3731,3734,3736,3738,3740,3742,3744,3746,3748,3750,3752,3754,3756,3758,3760,3762,3764],{"class":865,"line":2096},[863,3726,1598],{"class":972},[863,3728,922],{"class":921},[863,3730,2067],{"class":1198},[863,3732,3733],{"class":873},"\"  Coordinates: ",[863,3735,2073],{"class":990},[863,3737,1333],{"class":917},[863,3739,47],{"class":921},[863,3741,1357],{"class":983},[863,3743,47],{"class":921},[863,3745,1362],{"class":983},[863,3747,987],{"class":921},[863,3749,991],{"class":990},[863,3751,1845],{"class":921},[863,3753,991],{"class":990},[863,3755,1850],{"class":921},[863,3757,1853],{"class":990},[863,3759,3291],{"class":921},[863,3761,2079],{"class":990},[863,3763,932],{"class":873},[863,3765,940],{"class":921},[863,3767,3768,3770],{"class":865,"line":2112},[863,3769,1598],{"class":972},[863,3771,3772],{"class":921},"()\n",[22,3774,3776],{"id":3775},"fastapi-integration","FastAPI integration",[10,3778,3779],{},"Expose PLSS conversion as an endpoint in a FastAPI application:",[223,3781,3783],{"className":880,"code":3782,"language":882,"meta":231,"style":231},"import os\nfrom fastapi import FastAPI, HTTPException\nfrom townshipamerica import AsyncTownshipAmerica\nfrom townshipamerica.exceptions import NotFoundError, ValidationError\n\napp = FastAPI()\nclient = AsyncTownshipAmerica(api_key=os.environ[\"TOWNSHIPAMERICA_API_KEY\"])\n\n@app.on_event(\"shutdown\")\nasync def shutdown():\n    await client.close()\n\n@app.get(\"\u002Fconvert\")\nasync def convert(location: str):\n    try:\n        result = await client.search(location)\n        feature = result.features[0]\n        return {\n            \"descriptor\": feature.properties.descriptor,\n            \"coordinates\": feature.geometry.coordinates,\n        }\n    except ValidationError as e:\n        raise HTTPException(status_code=400, detail=str(e))\n    except NotFoundError:\n        raise HTTPException(status_code=404, detail=\"Location not found\")\n",[183,3784,3785,3791,3808,3818,3837,3841,3852,3882,3886,3911,3922,3936,3940,3962,3982,3989,4009,4028,4035,4058,4080,4085,4098,4131,4139],{"__ignoreMap":231},[863,3786,3787,3789],{"class":865,"line":866},[863,3788,897],{"class":889},[863,3790,1227],{"class":893},[863,3792,3793,3795,3798,3800,3803,3805],{"class":865,"line":436},[863,3794,890],{"class":889},[863,3796,3797],{"class":893}," fastapi ",[863,3799,897],{"class":889},[863,3801,3802],{"class":893}," FastAPI",[863,3804,1413],{"class":921},[863,3806,3807],{"class":893}," HTTPException\n",[863,3809,3810,3812,3814,3816],{"class":865,"line":441},[863,3811,890],{"class":889},[863,3813,894],{"class":893},[863,3815,897],{"class":889},[863,3817,2386],{"class":893},[863,3819,3820,3822,3824,3826,3828,3830,3832,3834],{"class":865,"line":943},[863,3821,890],{"class":889},[863,3823,1964],{"class":893},[863,3825,47],{"class":921},[863,3827,1969],{"class":893},[863,3829,897],{"class":889},[863,3831,2159],{"class":893},[863,3833,1413],{"class":921},[863,3835,3836],{"class":893}," ValidationError\n",[863,3838,3839],{"class":865,"line":969},[863,3840,905],{"emptyLinePlaceholder":467},[863,3842,3843,3846,3848,3850],{"class":865,"line":468},[863,3844,3845],{"class":893},"app ",[863,3847,914],{"class":913},[863,3849,3802],{"class":917},[863,3851,3772],{"class":921},[863,3853,3854,3856,3858,3860,3862,3864,3866,3868,3870,3872,3874,3876,3878,3880],{"class":865,"line":1304},[863,3855,910],{"class":893},[863,3857,914],{"class":913},[863,3859,2416],{"class":917},[863,3861,922],{"class":921},[863,3863,926],{"class":925},[863,3865,914],{"class":913},[863,3867,1258],{"class":917},[863,3869,47],{"class":921},[863,3871,1263],{"class":983},[863,3873,987],{"class":921},[863,3875,932],{"class":931},[863,3877,1270],{"class":873},[863,3879,932],{"class":931},[863,3881,1275],{"class":921},[863,3883,3884],{"class":865,"line":1326},[863,3885,905],{"emptyLinePlaceholder":467},[863,3887,3888,3892,3895,3897,3900,3902,3904,3907,3909],{"class":865,"line":1346},[863,3889,3891],{"class":3890},"stp6e","@",[863,3893,3894],{"class":2401},"app",[863,3896,47],{"class":3890},[863,3898,3899],{"class":2401},"on_event",[863,3901,922],{"class":921},[863,3903,932],{"class":931},[863,3905,3906],{"class":873},"shutdown",[863,3908,932],{"class":931},[863,3910,940],{"class":921},[863,3912,3913,3915,3917,3920],{"class":865,"line":1811},[863,3914,2395],{"class":1198},[863,3916,2398],{"class":1198},[863,3918,3919],{"class":2401}," shutdown",[863,3921,2405],{"class":921},[863,3923,3924,3927,3929,3931,3934],{"class":865,"line":2060},[863,3925,3926],{"class":889},"    await",[863,3928,951],{"class":893},[863,3930,47],{"class":921},[863,3932,3933],{"class":917},"close",[863,3935,3772],{"class":921},[863,3937,3938],{"class":865,"line":2086},[863,3939,905],{"emptyLinePlaceholder":467},[863,3941,3942,3944,3946,3948,3951,3953,3955,3958,3960],{"class":865,"line":2096},[863,3943,3891],{"class":3890},[863,3945,3894],{"class":2401},[863,3947,47],{"class":3890},[863,3949,3950],{"class":2401},"get",[863,3952,922],{"class":921},[863,3954,932],{"class":931},[863,3956,3957],{"class":873},"\u002Fconvert",[863,3959,932],{"class":931},[863,3961,940],{"class":921},[863,3963,3964,3966,3968,3971,3973,3975,3977,3980],{"class":865,"line":2112},[863,3965,2395],{"class":1198},[863,3967,2398],{"class":1198},[863,3969,3970],{"class":2401}," convert",[863,3972,922],{"class":921},[863,3974,1617],{"class":2565},[863,3976,1482],{"class":921},[863,3978,3979],{"class":2576}," str",[863,3981,3354],{"class":921},[863,3983,3984,3987],{"class":865,"line":2126},[863,3985,3986],{"class":889},"    try",[863,3988,1593],{"class":921},[863,3990,3991,3993,3995,3997,3999,4001,4003,4005,4007],{"class":865,"line":2154},[863,3992,2457],{"class":893},[863,3994,914],{"class":913},[863,3996,2462],{"class":889},[863,3998,951],{"class":893},[863,4000,47],{"class":921},[863,4002,956],{"class":917},[863,4004,922],{"class":921},[863,4006,1617],{"class":917},[863,4008,940],{"class":921},[863,4010,4011,4014,4016,4018,4020,4022,4024,4026],{"class":865,"line":2164},[863,4012,4013],{"class":893},"        feature ",[863,4015,914],{"class":913},[863,4017,1312],{"class":893},[863,4019,47],{"class":921},[863,4021,984],{"class":983},[863,4023,987],{"class":921},[863,4025,991],{"class":990},[863,4027,1323],{"class":921},[863,4029,4030,4032],{"class":865,"line":2902},[863,4031,2691],{"class":889},[863,4033,4034],{"class":921}," {\n",[863,4036,4037,4040,4042,4044,4046,4048,4050,4052,4054,4056],{"class":865,"line":2916},[863,4038,4039],{"class":931},"            \"",[863,4041,1457],{"class":873},[863,4043,932],{"class":931},[863,4045,1482],{"class":921},[863,4047,1830],{"class":893},[863,4049,47],{"class":921},[863,4051,997],{"class":983},[863,4053,47],{"class":921},[863,4055,1457],{"class":983},[863,4057,1658],{"class":921},[863,4059,4060,4062,4064,4066,4068,4070,4072,4074,4076,4078],{"class":865,"line":2941},[863,4061,4039],{"class":931},[863,4063,1362],{"class":873},[863,4065,932],{"class":931},[863,4067,1482],{"class":921},[863,4069,1830],{"class":893},[863,4071,47],{"class":921},[863,4073,1357],{"class":983},[863,4075,47],{"class":921},[863,4077,1362],{"class":983},[863,4079,1658],{"class":921},[863,4081,4082],{"class":865,"line":2971},[863,4083,4084],{"class":921},"        }\n",[863,4086,4087,4090,4092,4094,4096],{"class":865,"line":2977},[863,4088,4089],{"class":889},"    except",[863,4091,2049],{"class":893},[863,4093,2052],{"class":889},[863,4095,2055],{"class":893},[863,4097,1593],{"class":921},[863,4099,4100,4103,4106,4108,4111,4113,4116,4118,4121,4123,4125,4127,4129],{"class":865,"line":2982},[863,4101,4102],{"class":889},"        raise",[863,4104,4105],{"class":917}," HTTPException",[863,4107,922],{"class":921},[863,4109,4110],{"class":925},"status_code",[863,4112,914],{"class":913},[863,4114,4115],{"class":990},"400",[863,4117,1413],{"class":921},[863,4119,4120],{"class":925}," detail",[863,4122,914],{"class":913},[863,4124,2577],{"class":2576},[863,4126,922],{"class":921},[863,4128,2076],{"class":917},[863,4130,3406],{"class":921},[863,4132,4133,4135,4137],{"class":865,"line":3018},[863,4134,4089],{"class":889},[863,4136,2159],{"class":893},[863,4138,1593],{"class":921},[863,4140,4142,4144,4146,4148,4150,4152,4155,4157,4159,4161,4163,4166,4168],{"class":865,"line":4141},25,[863,4143,4102],{"class":889},[863,4145,4105],{"class":917},[863,4147,922],{"class":921},[863,4149,4110],{"class":925},[863,4151,914],{"class":913},[863,4153,4154],{"class":990},"404",[863,4156,1413],{"class":921},[863,4158,4120],{"class":925},[863,4160,914],{"class":913},[863,4162,932],{"class":931},[863,4164,4165],{"class":873},"Location not found",[863,4167,932],{"class":931},[863,4169,940],{"class":921},[22,4171,4173],{"id":4172},"rate-limit-handling","Rate limit handling",[10,4175,4176,4177,4180,4181,4184],{},"The SDK parses the ",[183,4178,4179],{},"Retry-After"," header into ",[183,4182,4183],{},"RateLimitError.retry_after"," for easy backoff:",[223,4186,4188],{"className":880,"code":4187,"language":882,"meta":231,"style":231},"import time\nfrom townshipamerica.exceptions import RateLimitError\n\ndef search_with_retry(client, location, max_retries=3):\n    for attempt in range(max_retries):\n        try:\n            return client.search(location)\n        except RateLimitError as e:\n            if attempt == max_retries - 1:\n                raise\n            wait = e.retry_after or 2 ** attempt\n            time.sleep(wait)\n",[183,4189,4190,4197,4212,4216,4245,4264,4271,4288,4301,4321,4326,4351],{"__ignoreMap":231},[863,4191,4192,4194],{"class":865,"line":866},[863,4193,897],{"class":889},[863,4195,4196],{"class":893}," time\n",[863,4198,4199,4201,4203,4205,4207,4209],{"class":865,"line":436},[863,4200,890],{"class":889},[863,4202,1964],{"class":893},[863,4204,47],{"class":921},[863,4206,1969],{"class":893},[863,4208,897],{"class":889},[863,4210,4211],{"class":893}," RateLimitError\n",[863,4213,4214],{"class":865,"line":441},[863,4215,905],{"emptyLinePlaceholder":467},[863,4217,4218,4221,4224,4226,4228,4230,4233,4235,4238,4240,4243],{"class":865,"line":943},[863,4219,4220],{"class":1198},"def",[863,4222,4223],{"class":2401}," search_with_retry",[863,4225,922],{"class":921},[863,4227,2635],{"class":2565},[863,4229,1413],{"class":921},[863,4231,4232],{"class":2565}," location",[863,4234,1413],{"class":921},[863,4236,4237],{"class":2565}," max_retries",[863,4239,914],{"class":913},[863,4241,4242],{"class":990},"3",[863,4244,3354],{"class":921},[863,4246,4247,4250,4253,4255,4257,4259,4262],{"class":865,"line":969},[863,4248,4249],{"class":889},"    for",[863,4251,4252],{"class":893}," attempt ",[863,4254,1582],{"class":889},[863,4256,3333],{"class":972},[863,4258,922],{"class":921},[863,4260,4261],{"class":917},"max_retries",[863,4263,3354],{"class":921},[863,4265,4266,4269],{"class":865,"line":468},[863,4267,4268],{"class":889},"        try",[863,4270,1593],{"class":921},[863,4272,4273,4276,4278,4280,4282,4284,4286],{"class":865,"line":1304},[863,4274,4275],{"class":889},"            return",[863,4277,951],{"class":893},[863,4279,47],{"class":921},[863,4281,956],{"class":917},[863,4283,922],{"class":921},[863,4285,1617],{"class":917},[863,4287,940],{"class":921},[863,4289,4290,4293,4295,4297,4299],{"class":865,"line":1326},[863,4291,4292],{"class":889},"        except",[863,4294,2117],{"class":893},[863,4296,2052],{"class":889},[863,4298,2055],{"class":893},[863,4300,1593],{"class":921},[863,4302,4303,4306,4308,4311,4314,4316,4319],{"class":865,"line":1346},[863,4304,4305],{"class":889},"            if",[863,4307,4252],{"class":893},[863,4309,4310],{"class":913},"==",[863,4312,4313],{"class":893}," max_retries ",[863,4315,1407],{"class":913},[863,4317,4318],{"class":990}," 1",[863,4320,1593],{"class":921},[863,4322,4323],{"class":865,"line":1811},[863,4324,4325],{"class":889},"                raise\n",[863,4327,4328,4331,4333,4335,4337,4339,4342,4345,4348],{"class":865,"line":2060},[863,4329,4330],{"class":893},"            wait ",[863,4332,914],{"class":913},[863,4334,2055],{"class":893},[863,4336,47],{"class":921},[863,4338,2144],{"class":983},[863,4340,4341],{"class":913}," or",[863,4343,4344],{"class":990}," 2",[863,4346,4347],{"class":913}," **",[863,4349,4350],{"class":893}," attempt\n",[863,4352,4353,4356,4358,4361,4363,4366],{"class":865,"line":2086},[863,4354,4355],{"class":893},"            time",[863,4357,47],{"class":921},[863,4359,4360],{"class":917},"sleep",[863,4362,922],{"class":921},[863,4364,4365],{"class":917},"wait",[863,4367,940],{"class":921},[22,4369,1036],{"id":1035},[173,4371,4372,4377,4381],{},[176,4373,4374,4376],{},[264,4375,1005],{"href":418}," - Installation, basic usage, and first conversion",[176,4378,4379,2294],{},[264,4380,2293],{"href":411},[176,4382,4383,1062],{},[264,4384,1061],{"href":425},[10,4386,2301,4387,2304,4389,47],{},[264,4388,1075],{"href":432},[264,4390,2309],{"href":2307,"rel":4391},[1030],[1078,4393,4394],{},"html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}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 .sFwrP, html code.shiki .sFwrP{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#24292E;--shiki-default-font-style:inherit;--shiki-dark:#E1E4E8;--shiki-dark-font-style:inherit}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .stp6e, html code.shiki .stp6e{--shiki-light:#39ADB5;--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":231,"searchDepth":436,"depth":436,"links":4396},[4397,4400,4403,4404,4405,4406,4407],{"id":2346,"depth":436,"text":2347,"children":4398},[4399],{"id":2539,"depth":441,"text":2540},{"id":2703,"depth":436,"text":2704,"children":4401},[4402],{"id":3030,"depth":441,"text":3031},{"id":3147,"depth":436,"text":3148},{"id":3546,"depth":436,"text":3547},{"id":3775,"depth":436,"text":3776},{"id":4172,"depth":436,"text":4173},{"id":1035,"depth":436,"text":1036},"Use the townshipamerica Python SDK with async\u002Fawait, GeoPandas DataFrames, and production-ready error handling for GIS pipelines and land tech applications.","i-lucide-workflow",{},{"title":2335,"description":4408},"guides\u002Fpython-sdk-advanced","sTaXJZ5WimX18RbbhiLltZarEvQ1eU1Jzk9EQKhpx5U"]