[{"data":1,"prerenderedAt":6289},["ShallowReactive",2],{"docs-sidebar-pages":3,"docs-page":5741,"docs-tree-navigation":6248},[4,384,497,668,1534,1764,2120,2327,2932,3451,4094,4440,4572,4895,5018],{"id":5,"title":6,"badge":7,"body":8,"description":372,"extension":373,"group":374,"icon":375,"lastUpdated":7,"meta":376,"navigation":377,"order":112,"path":378,"popular":379,"publishedAt":7,"seo":380,"sidebarTitle":7,"stem":381,"tree":382,"__hash__":383},"docs\u002Fdocs\u002Fdevelopers\u002Fapi-overview.md","API overview",null,{"type":9,"value":10,"toc":364},"minimal",[11,15,20,31,34,40,51,55,94,208,212,222,225,243,247,260,264,337,341,360],[12,13,14],"p",{},"The Trawley API is a small, read-oriented HTTP API for querying the data your\nscrapers collect. If you can make an HTTP request, you can use it. No SDK\nrequired.",[16,17,19],"h2",{"id":18},"base-url","Base URL",[21,22,27],"pre",{"className":23,"code":25,"language":26},[24],"language-text","https:\u002F\u002Fapi.trawley.ai\n","text",[28,29,25],"code",{"__ignoreMap":30},"",[12,32,33],{},"Every endpoint is scoped to a single scraper:",[21,35,38],{"className":36,"code":37,"language":26},[24],"\u002Fv1\u002Fscrapers\u002F{scraperId}\u002F...\n",[28,39,37],{"__ignoreMap":30},[12,41,42,43,46,47,50],{},"Your ",[28,44,45],{},"scraperId"," is the last segment of the scraper's dashboard URL\n(for example ",[28,48,49],{},"scr_8f2a1c9e",").",[16,52,54],{"id":53},"conventions","Conventions",[56,57,58,70,76],"ul",{},[59,60,61,65,66,69],"li",{},[62,63,64],"strong",{},"Requests"," are HTTP ",[28,67,68],{},"GET"," unless noted, with parameters in the query string.",[59,71,72,75],{},[62,73,74],{},"Responses"," are JSON.",[59,77,78,81,82,85,86,89,90,93],{},[62,79,80],{},"Search-style endpoints"," share a common envelope: a ",[28,83,84],{},"data"," array, a\n",[28,87,88],{},"pagination"," object, and a ",[28,91,92],{},"meta"," object.",[21,95,99],{"className":96,"code":97,"language":98,"meta":30,"style":30},"language-json shiki shiki-themes github-light","{\n  \"data\": [ \u002F* records *\u002F ],\n  \"pagination\": { \"total\": 0, \"page\": 1, \"take\": 10, \"totalPages\": 0, \"hasMore\": false },\n  \"meta\": { \u002F* endpoint-specific *\u002F }\n}\n","json",[28,100,101,110,127,188,202],{"__ignoreMap":30},[102,103,106],"span",{"class":104,"line":105},"line",1,[102,107,109],{"class":108},"sgsFI","{\n",[102,111,113,117,120,124],{"class":104,"line":112},2,[102,114,116],{"class":115},"sYu0t","  \"data\"",[102,118,119],{"class":108},": [ ",[102,121,123],{"class":122},"sAwPA","\u002F* records *\u002F",[102,125,126],{"class":108}," ],\n",[102,128,130,133,136,139,142,145,148,151,153,156,158,161,163,166,168,171,173,175,177,180,182,185],{"class":104,"line":129},3,[102,131,132],{"class":115},"  \"pagination\"",[102,134,135],{"class":108},": { ",[102,137,138],{"class":115},"\"total\"",[102,140,141],{"class":108},": ",[102,143,144],{"class":115},"0",[102,146,147],{"class":108},", ",[102,149,150],{"class":115},"\"page\"",[102,152,141],{"class":108},[102,154,155],{"class":115},"1",[102,157,147],{"class":108},[102,159,160],{"class":115},"\"take\"",[102,162,141],{"class":108},[102,164,165],{"class":115},"10",[102,167,147],{"class":108},[102,169,170],{"class":115},"\"totalPages\"",[102,172,141],{"class":108},[102,174,144],{"class":115},[102,176,147],{"class":108},[102,178,179],{"class":115},"\"hasMore\"",[102,181,141],{"class":108},[102,183,184],{"class":115},"false",[102,186,187],{"class":108}," },\n",[102,189,191,194,196,199],{"class":104,"line":190},4,[102,192,193],{"class":115},"  \"meta\"",[102,195,135],{"class":108},[102,197,198],{"class":122},"\u002F* endpoint-specific *\u002F",[102,200,201],{"class":108}," }\n",[102,203,205],{"class":104,"line":204},5,[102,206,207],{"class":108},"}\n",[16,209,211],{"id":210},"authentication","Authentication",[213,214,216],"callout",{"type":215},"warning",[12,217,218,221],{},[62,219,220],{},"There is no API key yet."," Endpoints are currently reached by scraper ID, and\na scraper's results are returned to anyone who has its ID. Authentication and\nper-key access control are on the roadmap.",[12,223,224],{},"What this means in practice today:",[56,226,227,233,236],{},[59,228,229,230,232],{},"Treat a ",[28,231,45],{}," like a shared secret. Anyone with it can read that\nscraper's results.",[59,234,235],{},"Do not embed scraper IDs in public client-side code you would not want copied.",[59,237,238,239,242],{},"When authentication ships, existing endpoints keep working and gain an\n",[28,240,241],{},"Authorization"," header. We will document the migration here.",[16,244,246],{"id":245},"rate-limits","Rate limits",[12,248,249,250,253,254,259],{},"Search API calls are metered against your team's plan. When you exceed your\nmonthly allowance the API responds with ",[28,251,252],{},"429 Too Many Requests",". Upgrade your\nplan or wait for the next billing period to reset. See\n",[255,256,258],"a",{"href":257},"\u002Fdocs\u002Fusers\u002Fbilling-and-plans","billing and plans"," for current limits.",[16,261,263],{"id":262},"endpoints-at-a-glance","Endpoints at a glance",[265,266,267,280],"table",{},[268,269,270],"thead",{},[271,272,273,277],"tr",{},[274,275,276],"th",{},"Endpoint",[274,278,279],{},"Purpose",[281,282,283,297,307,317,327],"tbody",{},[271,284,285,294],{},[286,287,288],"td",{},[255,289,291],{"href":290},"\u002Fdocs\u002Fdevelopers\u002Fhybrid-search",[28,292,293],{},"GET \u002Fv1\u002Fscrapers\u002F{id}\u002Fhybrid",[286,295,296],{},"Natural language search (recommended)",[271,298,299,304],{},[286,300,301],{},[28,302,303],{},"GET \u002Fv1\u002Fscrapers\u002F{id}\u002Fresults",[286,305,306],{},"Raw paginated results, no query",[271,308,309,314],{},[286,310,311],{},[28,312,313],{},"GET \u002Fv1\u002Fscrapers\u002F{id}\u002Fexport",[286,315,316],{},"Bulk export of all results",[271,318,319,324],{},[286,320,321],{},[28,322,323],{},"GET \u002Fv1\u002Fscrapers\u002F{id}\u002Fdiff",[286,325,326],{},"Differences between scrape runs",[271,328,329,334],{},[286,330,331],{},[28,332,333],{},"POST \u002Fv1\u002Fscrapers\u002F{id}\u002Fchat",[286,335,336],{},"Conversational queries over results",[16,338,340],{"id":339},"whats-next","What's next",[342,343,344,352],"card-group",{"cols":112},[345,346,349],"card",{"href":290,"icon":347,"title":348},"search","Hybrid search",[12,350,351],{},"The endpoint you will use most. Full parameter and response reference.",[345,353,357],{"href":354,"icon":355,"title":356},"\u002Fdocs\u002Fdevelopers\u002Ftools-overview","plug","Integration guides",[12,358,359],{},"Turn the API into a tool your AI agent can call.",[361,362,363],"style",{},"html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}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);}",{"title":30,"searchDepth":129,"depth":129,"links":365},[366,367,368,369,370,371],{"id":18,"depth":112,"text":19},{"id":53,"depth":112,"text":54},{"id":210,"depth":112,"text":211},{"id":245,"depth":112,"text":246},{"id":262,"depth":112,"text":263},{"id":339,"depth":112,"text":340},"Base URL, conventions, authentication status, and how the Trawley API is shaped.","md","Getting started","book",{},true,"\u002Fdocs\u002Fdevelopers\u002Fapi-overview",false,{"title":6,"description":372},"docs\u002Fdevelopers\u002Fapi-overview","developers","sClWHc8LKjf964kBXzeWAS7yQukeHB3uskfVPfUpRDo",{"id":385,"title":211,"badge":386,"body":387,"description":489,"extension":373,"group":490,"icon":491,"lastUpdated":7,"meta":492,"navigation":377,"order":129,"path":493,"popular":379,"publishedAt":7,"seo":494,"sidebarTitle":7,"stem":495,"tree":382,"__hash__":496},"docs\u002Fdocs\u002Fdevelopers\u002Fauthentication.md","Coming soon",{"type":9,"value":388,"toc":484},[389,397,401,404,410,413,429,437,441,444,459,468,470],[213,390,391],{"type":215},[12,392,393,396],{},[62,394,395],{},"API keys are not available yet."," This page documents the current state\nhonestly so you can plan around it.",[16,398,400],{"id":399},"today","Today",[12,402,403],{},"The public search endpoints (hybrid, results, export, diff) are reached by\nscraper ID and do not require an API key:",[21,405,408],{"className":406,"code":407,"language":26},[24],"GET https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F{scraperId}\u002Fhybrid?search=...\n",[28,409,407],{"__ignoreMap":30},[12,411,412],{},"A scraper's results are returned to anyone who has its ID. In practice:",[56,414,415,423],{},[59,416,417,422],{},[62,418,229,419,421],{},[28,420,45],{}," like a shared secret."," Do not publish it anywhere you\nwould not publish read access to that data.",[59,424,425,428],{},[62,426,427],{},"Avoid embedding scraper IDs in public client-side code."," Proxy requests\nthrough your own backend so the ID is not exposed in a browser bundle.",[12,430,431,432,436],{},"The ",[255,433,435],{"href":434},"\u002Fdocs\u002Fdevelopers\u002Fchat-endpoint","chat endpoint"," is the exception. It is\nsession-authenticated and currently serves the Trawley web app rather than\nexternal callers.",[16,438,440],{"id":439},"what-is-coming","What is coming",[12,442,443],{},"API key authentication is on the roadmap (tracked internally as issue #45). When\nit ships:",[56,445,446,449,456],{},[59,447,448],{},"You will generate keys from your dashboard.",[59,450,451,452,455],{},"Requests will carry an ",[28,453,454],{},"Authorization: Bearer \u003Ckey>"," header.",[59,457,458],{},"Existing endpoints keep working. The migration will be documented here.",[213,460,462],{"type":461},"info",[12,463,464,465,467],{},"Building an integration now? Write your request layer so an ",[28,466,241],{},"\nheader is easy to add later. Centralise your fetch calls in one place so adding\nauth is a one-line change when keys arrive.",[16,469,340],{"id":339},[342,471,472,477],{"cols":112},[345,473,474],{"href":378,"icon":375,"title":6},[12,475,476],{},"Base URL, conventions, and the endpoint map.",[345,478,481],{"href":479,"icon":480,"title":246},"\u002Fdocs\u002Fdevelopers\u002Frate-limits-and-quotas","gauge",[12,482,483],{},"How usage is metered today.",{"title":30,"searchDepth":129,"depth":129,"links":485},[486,487,488],{"id":399,"depth":112,"text":400},{"id":439,"depth":112,"text":440},{"id":339,"depth":112,"text":340},"The current state of API authentication and what is coming.","Reference","lock",{},"\u002Fdocs\u002Fdevelopers\u002Fauthentication",{"title":211,"description":489},"docs\u002Fdevelopers\u002Fauthentication","7OfL5WqVk0tKwXI8lMYE9iF50cV84xW1Sr6yAFUdWWE",{"id":498,"title":499,"badge":7,"body":500,"description":661,"extension":373,"group":662,"icon":663,"lastUpdated":7,"meta":664,"navigation":377,"order":204,"path":434,"popular":379,"publishedAt":7,"seo":665,"sidebarTitle":7,"stem":666,"tree":382,"__hash__":667},"docs\u002Fdocs\u002Fdevelopers\u002Fchat-endpoint.md","Chat endpoint",{"type":9,"value":501,"toc":654},[502,505,518,522,528,533,585,591,595,598,617,620,634,636,651],[12,503,504],{},"The chat endpoint runs a small agent over a scraper's results. You send a\nconversation, and it replies in natural language, calling search and aggregation\ntools internally to ground its answer in real records. It is what powers the\nin-dashboard \"chat with your results\" panel.",[213,506,507],{"type":215},[12,508,509,510,513,514,517],{},"The chat endpoint is ",[62,511,512],{},"session-authenticated"," today. Unlike hybrid search and\nthe results endpoint (which are reached by scraper ID), chat requires a logged-in\nsession, so it is currently usable from the Trawley web app rather than as a\nstandalone public API. External programmatic access waits on API authentication\n(issue #45). For server-to-server natural language querying today, call\n",[255,515,516],{"href":290},"hybrid search"," directly.",[16,519,521],{"id":520},"request","Request",[21,523,526],{"className":524,"code":525,"language":26},[24],"POST https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F{scraperId}\u002Fchat\n",[28,527,525],{"__ignoreMap":30},[529,530,532],"h3",{"id":531},"body","Body",[21,534,536],{"className":96,"code":535,"language":98,"meta":30,"style":30},"{\n  \"messages\": [\n    { \"role\": \"user\", \"content\": \"Which listings dropped in price this week?\" }\n  ]\n}\n",[28,537,538,542,550,576,581],{"__ignoreMap":30},[102,539,540],{"class":104,"line":105},[102,541,109],{"class":108},[102,543,544,547],{"class":104,"line":112},[102,545,546],{"class":115},"  \"messages\"",[102,548,549],{"class":108},": [\n",[102,551,552,555,558,560,564,566,569,571,574],{"class":104,"line":129},[102,553,554],{"class":108},"    { ",[102,556,557],{"class":115},"\"role\"",[102,559,141],{"class":108},[102,561,563],{"class":562},"sYBdl","\"user\"",[102,565,147],{"class":108},[102,567,568],{"class":115},"\"content\"",[102,570,141],{"class":108},[102,572,573],{"class":562},"\"Which listings dropped in price this week?\"",[102,575,201],{"class":108},[102,577,578],{"class":104,"line":190},[102,579,580],{"class":108},"  ]\n",[102,582,583],{"class":104,"line":204},[102,584,207],{"class":108},[12,586,431,587,590],{},[28,588,589],{},"messages"," array follows the AI SDK UI message format. The response is a\nstreamed text reply.",[16,592,594],{"id":593},"what-it-does-under-the-hood","What it does under the hood",[12,596,597],{},"The endpoint gives its model three tools and lets it choose:",[56,599,600,605,611],{},[59,601,602,604],{},[62,603,347],{}," results using hybrid search for \"find\" and \"filter\" questions.",[59,606,607,610],{},[62,608,609],{},"aggregate"," results for \"how many\", \"average\", \"min\", and \"max\" questions.",[59,612,613,616],{},[62,614,615],{},"browse"," results with pagination when no query is needed.",[12,618,619],{},"It always grounds answers in tool output rather than inventing data, and returns\na readable summary.",[213,621,623],{"type":622},"tip",[12,624,625,626,628,629,633],{},"If you are building your own chat experience, you usually do not need this\nendpoint. Wrap ",[255,627,516],{"href":290}," as a tool in your\nown agent instead. See the ",[255,630,632],{"href":631},"\u002Fdocs\u002Fdevelopers\u002Fvercel-ai-sdk","Vercel AI SDK guide","\nfor that pattern, which gives you full control over the model and prompt.",[16,635,340],{"id":339},[342,637,638,645],{"cols":112},[345,639,642],{"href":631,"icon":640,"title":641},"sparkles","Build your own agent",[12,643,644],{},"The recommended pattern for conversational access.",[345,646,648],{"href":493,"icon":491,"title":647},"Authentication status",[12,649,650],{},"Where API auth stands and what is coming.",[361,652,653],{},"html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}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);}",{"title":30,"searchDepth":129,"depth":129,"links":655},[656,659,660],{"id":520,"depth":112,"text":521,"children":657},[658],{"id":531,"depth":129,"text":532},{"id":593,"depth":112,"text":594},{"id":339,"depth":112,"text":340},"A conversational endpoint that answers questions over a scraper's results.","Search API","message-circle",{},{"title":499,"description":661},"docs\u002Fdevelopers\u002Fchat-endpoint","FmA_2GeZBboJcXm7LxEjmVCkDtSIn9k2vBaWSLtFGxg",{"id":669,"title":670,"badge":7,"body":671,"description":1527,"extension":373,"group":356,"icon":1528,"lastUpdated":7,"meta":1529,"navigation":377,"order":129,"path":1530,"popular":379,"publishedAt":7,"seo":1531,"sidebarTitle":7,"stem":1532,"tree":382,"__hash__":1533},"docs\u002Fdocs\u002Fdevelopers\u002Fclaude-agent-sdk.md","Claude (Anthropic SDK)",{"type":9,"value":672,"toc":1521},[673,683,702,706,709,1026,1030,1033,1461,1479,1483,1503,1505,1518],[12,674,675,676,679,680,682],{},"This guide gives Claude a ",[28,677,678],{},"search_listings"," tool backed by Trawley's\n",[255,681,516],{"href":290}," endpoint, using the Anthropic\nTypeScript SDK and its tool-use loop.",[21,684,688],{"className":685,"code":686,"language":687,"meta":30,"style":30},"language-bash shiki shiki-themes github-light","npm install @anthropic-ai\u002Fsdk\n","bash",[28,689,690],{"__ignoreMap":30},[102,691,692,696,699],{"class":104,"line":105},[102,693,695],{"class":694},"s7eDp","npm",[102,697,698],{"class":562}," install",[102,700,701],{"class":562}," @anthropic-ai\u002Fsdk\n",[16,703,705],{"id":704},"define-the-tool","Define the tool",[12,707,708],{},"A tool is a name, a description, and a JSON Schema for its input.",[21,710,714],{"className":711,"code":712,"language":713,"meta":30,"style":30},"language-ts shiki shiki-themes github-light","const searchListings = {\n  name: 'search_listings',\n  description:\n    'Search live property listings from acmehomes.co.uk. Accepts a natural ' +\n    'language query; constraints like price, bedrooms, or date are understood. ' +\n    'Returns structured records.',\n  input_schema: {\n    type: 'object',\n    properties: {\n      query: {\n        type: 'string',\n        description: 'What to find, e.g. \"3 bed houses under £500k with a garden\"',\n      },\n    },\n    required: ['query'],\n  },\n} as const\n\nconst TRAWLEY_SCRAPER_ID = 'scr_8f2a1c9e'\n\nasync function runSearch(query: string) {\n  const params = new URLSearchParams({ search: query, take: '10' })\n  const res = await fetch(\n    `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F${TRAWLEY_SCRAPER_ID}\u002Fhybrid?${params}`,\n  )\n  const { data } = await res.json()\n  return data\n}\n","ts",[28,715,716,731,742,747,755,762,770,776,787,793,799,810,821,827,833,845,851,863,869,882,887,915,941,960,980,986,1012,1021],{"__ignoreMap":30},[102,717,718,722,725,728],{"class":104,"line":105},[102,719,721],{"class":720},"sD7c4","const",[102,723,724],{"class":115}," searchListings",[102,726,727],{"class":720}," =",[102,729,730],{"class":108}," {\n",[102,732,733,736,739],{"class":104,"line":112},[102,734,735],{"class":108},"  name: ",[102,737,738],{"class":562},"'search_listings'",[102,740,741],{"class":108},",\n",[102,743,744],{"class":104,"line":129},[102,745,746],{"class":108},"  description:\n",[102,748,749,752],{"class":104,"line":190},[102,750,751],{"class":562},"    'Search live property listings from acmehomes.co.uk. Accepts a natural '",[102,753,754],{"class":720}," +\n",[102,756,757,760],{"class":104,"line":204},[102,758,759],{"class":562},"    'language query; constraints like price, bedrooms, or date are understood. '",[102,761,754],{"class":720},[102,763,765,768],{"class":104,"line":764},6,[102,766,767],{"class":562},"    'Returns structured records.'",[102,769,741],{"class":108},[102,771,773],{"class":104,"line":772},7,[102,774,775],{"class":108},"  input_schema: {\n",[102,777,779,782,785],{"class":104,"line":778},8,[102,780,781],{"class":108},"    type: ",[102,783,784],{"class":562},"'object'",[102,786,741],{"class":108},[102,788,790],{"class":104,"line":789},9,[102,791,792],{"class":108},"    properties: {\n",[102,794,796],{"class":104,"line":795},10,[102,797,798],{"class":108},"      query: {\n",[102,800,802,805,808],{"class":104,"line":801},11,[102,803,804],{"class":108},"        type: ",[102,806,807],{"class":562},"'string'",[102,809,741],{"class":108},[102,811,813,816,819],{"class":104,"line":812},12,[102,814,815],{"class":108},"        description: ",[102,817,818],{"class":562},"'What to find, e.g. \"3 bed houses under £500k with a garden\"'",[102,820,741],{"class":108},[102,822,824],{"class":104,"line":823},13,[102,825,826],{"class":108},"      },\n",[102,828,830],{"class":104,"line":829},14,[102,831,832],{"class":108},"    },\n",[102,834,836,839,842],{"class":104,"line":835},15,[102,837,838],{"class":108},"    required: [",[102,840,841],{"class":562},"'query'",[102,843,844],{"class":108},"],\n",[102,846,848],{"class":104,"line":847},16,[102,849,850],{"class":108},"  },\n",[102,852,854,857,860],{"class":104,"line":853},17,[102,855,856],{"class":108},"} ",[102,858,859],{"class":720},"as",[102,861,862],{"class":720}," const\n",[102,864,866],{"class":104,"line":865},18,[102,867,868],{"emptyLinePlaceholder":377},"\n",[102,870,872,874,877,879],{"class":104,"line":871},19,[102,873,721],{"class":720},[102,875,876],{"class":115}," TRAWLEY_SCRAPER_ID",[102,878,727],{"class":720},[102,880,881],{"class":562}," 'scr_8f2a1c9e'\n",[102,883,885],{"class":104,"line":884},20,[102,886,868],{"emptyLinePlaceholder":377},[102,888,890,893,896,899,902,906,909,912],{"class":104,"line":889},21,[102,891,892],{"class":720},"async",[102,894,895],{"class":720}," function",[102,897,898],{"class":694}," runSearch",[102,900,901],{"class":108},"(",[102,903,905],{"class":904},"sqxcx","query",[102,907,908],{"class":720},":",[102,910,911],{"class":115}," string",[102,913,914],{"class":108},") {\n",[102,916,918,921,924,926,929,932,935,938],{"class":104,"line":917},22,[102,919,920],{"class":720},"  const",[102,922,923],{"class":115}," params",[102,925,727],{"class":720},[102,927,928],{"class":720}," new",[102,930,931],{"class":694}," URLSearchParams",[102,933,934],{"class":108},"({ search: query, take: ",[102,936,937],{"class":562},"'10'",[102,939,940],{"class":108}," })\n",[102,942,944,946,949,951,954,957],{"class":104,"line":943},23,[102,945,920],{"class":720},[102,947,948],{"class":115}," res",[102,950,727],{"class":720},[102,952,953],{"class":720}," await",[102,955,956],{"class":694}," fetch",[102,958,959],{"class":108},"(\n",[102,961,963,966,969,972,975,978],{"class":104,"line":962},24,[102,964,965],{"class":562},"    `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F${",[102,967,968],{"class":115},"TRAWLEY_SCRAPER_ID",[102,970,971],{"class":562},"}\u002Fhybrid?${",[102,973,974],{"class":108},"params",[102,976,977],{"class":562},"}`",[102,979,741],{"class":108},[102,981,983],{"class":104,"line":982},25,[102,984,985],{"class":108},"  )\n",[102,987,989,991,994,996,999,1002,1004,1007,1009],{"class":104,"line":988},26,[102,990,920],{"class":720},[102,992,993],{"class":108}," { ",[102,995,84],{"class":115},[102,997,998],{"class":108}," } ",[102,1000,1001],{"class":720},"=",[102,1003,953],{"class":720},[102,1005,1006],{"class":108}," res.",[102,1008,98],{"class":694},[102,1010,1011],{"class":108},"()\n",[102,1013,1015,1018],{"class":104,"line":1014},27,[102,1016,1017],{"class":720},"  return",[102,1019,1020],{"class":108}," data\n",[102,1022,1024],{"class":104,"line":1023},28,[102,1025,207],{"class":108},[16,1027,1029],{"id":1028},"run-the-tool-use-loop","Run the tool-use loop",[12,1031,1032],{},"Claude decides when to call the tool. When it does, run the search and send the\nresult back so it can finish its answer.",[21,1034,1036],{"className":711,"code":1035,"language":713,"meta":30,"style":30},"import Anthropic from '@anthropic-ai\u002Fsdk'\n\nconst client = new Anthropic()\n\nconst messages: Anthropic.MessageParam[] = [\n  { role: 'user', content: 'Find a 3 bed house near Kendal with a garden under £500k.' },\n]\n\nwhile (true) {\n  const response = await client.messages.create({\n    model: 'claude-sonnet-4-5',\n    max_tokens: 1024,\n    tools: [searchListings],\n    messages,\n  })\n\n  messages.push({ role: 'assistant', content: response.content })\n\n  const toolUse = response.content.find((block) => block.type === 'tool_use')\n  if (response.stop_reason !== 'tool_use' || !toolUse) {\n    \u002F\u002F No tool call — Claude has answered.\n    const text = response.content.find((b) => b.type === 'text')\n    console.log(text?.text)\n    break\n  }\n\n  const results = await runSearch((toolUse.input as { query: string }).query)\n\n  messages.push({\n    role: 'user',\n    content: [\n      {\n        type: 'tool_result',\n        tool_use_id: toolUse.id,\n        content: JSON.stringify(results),\n      },\n    ],\n  })\n}\n",[28,1037,1038,1052,1056,1072,1076,1101,1117,1122,1126,1139,1159,1169,1179,1184,1189,1194,1198,1215,1219,1258,1280,1285,1318,1329,1334,1339,1343,1372,1376,1385,1395,1401,1407,1417,1423,1440,1445,1451,1456],{"__ignoreMap":30},[102,1039,1040,1043,1046,1049],{"class":104,"line":105},[102,1041,1042],{"class":720},"import",[102,1044,1045],{"class":108}," Anthropic ",[102,1047,1048],{"class":720},"from",[102,1050,1051],{"class":562}," '@anthropic-ai\u002Fsdk'\n",[102,1053,1054],{"class":104,"line":112},[102,1055,868],{"emptyLinePlaceholder":377},[102,1057,1058,1060,1063,1065,1067,1070],{"class":104,"line":129},[102,1059,721],{"class":720},[102,1061,1062],{"class":115}," client",[102,1064,727],{"class":720},[102,1066,928],{"class":720},[102,1068,1069],{"class":694}," Anthropic",[102,1071,1011],{"class":108},[102,1073,1074],{"class":104,"line":190},[102,1075,868],{"emptyLinePlaceholder":377},[102,1077,1078,1080,1083,1085,1087,1090,1093,1096,1098],{"class":104,"line":204},[102,1079,721],{"class":720},[102,1081,1082],{"class":115}," messages",[102,1084,908],{"class":720},[102,1086,1069],{"class":694},[102,1088,1089],{"class":108},".",[102,1091,1092],{"class":694},"MessageParam",[102,1094,1095],{"class":108},"[] ",[102,1097,1001],{"class":720},[102,1099,1100],{"class":108}," [\n",[102,1102,1103,1106,1109,1112,1115],{"class":104,"line":764},[102,1104,1105],{"class":108},"  { role: ",[102,1107,1108],{"class":562},"'user'",[102,1110,1111],{"class":108},", content: ",[102,1113,1114],{"class":562},"'Find a 3 bed house near Kendal with a garden under £500k.'",[102,1116,187],{"class":108},[102,1118,1119],{"class":104,"line":772},[102,1120,1121],{"class":108},"]\n",[102,1123,1124],{"class":104,"line":778},[102,1125,868],{"emptyLinePlaceholder":377},[102,1127,1128,1131,1134,1137],{"class":104,"line":789},[102,1129,1130],{"class":720},"while",[102,1132,1133],{"class":108}," (",[102,1135,1136],{"class":115},"true",[102,1138,914],{"class":108},[102,1140,1141,1143,1146,1148,1150,1153,1156],{"class":104,"line":795},[102,1142,920],{"class":720},[102,1144,1145],{"class":115}," response",[102,1147,727],{"class":720},[102,1149,953],{"class":720},[102,1151,1152],{"class":108}," client.messages.",[102,1154,1155],{"class":694},"create",[102,1157,1158],{"class":108},"({\n",[102,1160,1161,1164,1167],{"class":104,"line":801},[102,1162,1163],{"class":108},"    model: ",[102,1165,1166],{"class":562},"'claude-sonnet-4-5'",[102,1168,741],{"class":108},[102,1170,1171,1174,1177],{"class":104,"line":812},[102,1172,1173],{"class":108},"    max_tokens: ",[102,1175,1176],{"class":115},"1024",[102,1178,741],{"class":108},[102,1180,1181],{"class":104,"line":823},[102,1182,1183],{"class":108},"    tools: [searchListings],\n",[102,1185,1186],{"class":104,"line":829},[102,1187,1188],{"class":108},"    messages,\n",[102,1190,1191],{"class":104,"line":835},[102,1192,1193],{"class":108},"  })\n",[102,1195,1196],{"class":104,"line":847},[102,1197,868],{"emptyLinePlaceholder":377},[102,1199,1200,1203,1206,1209,1212],{"class":104,"line":853},[102,1201,1202],{"class":108},"  messages.",[102,1204,1205],{"class":694},"push",[102,1207,1208],{"class":108},"({ role: ",[102,1210,1211],{"class":562},"'assistant'",[102,1213,1214],{"class":108},", content: response.content })\n",[102,1216,1217],{"class":104,"line":865},[102,1218,868],{"emptyLinePlaceholder":377},[102,1220,1221,1223,1226,1228,1231,1234,1237,1240,1243,1246,1249,1252,1255],{"class":104,"line":871},[102,1222,920],{"class":720},[102,1224,1225],{"class":115}," toolUse",[102,1227,727],{"class":720},[102,1229,1230],{"class":108}," response.content.",[102,1232,1233],{"class":694},"find",[102,1235,1236],{"class":108},"((",[102,1238,1239],{"class":904},"block",[102,1241,1242],{"class":108},") ",[102,1244,1245],{"class":720},"=>",[102,1247,1248],{"class":108}," block.type ",[102,1250,1251],{"class":720},"===",[102,1253,1254],{"class":562}," 'tool_use'",[102,1256,1257],{"class":108},")\n",[102,1259,1260,1263,1266,1269,1271,1274,1277],{"class":104,"line":884},[102,1261,1262],{"class":720},"  if",[102,1264,1265],{"class":108}," (response.stop_reason ",[102,1267,1268],{"class":720},"!==",[102,1270,1254],{"class":562},[102,1272,1273],{"class":720}," ||",[102,1275,1276],{"class":720}," !",[102,1278,1279],{"class":108},"toolUse) {\n",[102,1281,1282],{"class":104,"line":889},[102,1283,1284],{"class":122},"    \u002F\u002F No tool call — Claude has answered.\n",[102,1286,1287,1290,1293,1295,1297,1299,1301,1304,1306,1308,1311,1313,1316],{"class":104,"line":917},[102,1288,1289],{"class":720},"    const",[102,1291,1292],{"class":115}," text",[102,1294,727],{"class":720},[102,1296,1230],{"class":108},[102,1298,1233],{"class":694},[102,1300,1236],{"class":108},[102,1302,1303],{"class":904},"b",[102,1305,1242],{"class":108},[102,1307,1245],{"class":720},[102,1309,1310],{"class":108}," b.type ",[102,1312,1251],{"class":720},[102,1314,1315],{"class":562}," 'text'",[102,1317,1257],{"class":108},[102,1319,1320,1323,1326],{"class":104,"line":943},[102,1321,1322],{"class":108},"    console.",[102,1324,1325],{"class":694},"log",[102,1327,1328],{"class":108},"(text?.text)\n",[102,1330,1331],{"class":104,"line":962},[102,1332,1333],{"class":720},"    break\n",[102,1335,1336],{"class":104,"line":982},[102,1337,1338],{"class":108},"  }\n",[102,1340,1341],{"class":104,"line":988},[102,1342,868],{"emptyLinePlaceholder":377},[102,1344,1345,1347,1350,1352,1354,1356,1359,1361,1363,1365,1367,1369],{"class":104,"line":1014},[102,1346,920],{"class":720},[102,1348,1349],{"class":115}," results",[102,1351,727],{"class":720},[102,1353,953],{"class":720},[102,1355,898],{"class":694},[102,1357,1358],{"class":108},"((toolUse.input ",[102,1360,859],{"class":720},[102,1362,993],{"class":108},[102,1364,905],{"class":904},[102,1366,908],{"class":720},[102,1368,911],{"class":115},[102,1370,1371],{"class":108}," }).query)\n",[102,1373,1374],{"class":104,"line":1023},[102,1375,868],{"emptyLinePlaceholder":377},[102,1377,1379,1381,1383],{"class":104,"line":1378},29,[102,1380,1202],{"class":108},[102,1382,1205],{"class":694},[102,1384,1158],{"class":108},[102,1386,1388,1391,1393],{"class":104,"line":1387},30,[102,1389,1390],{"class":108},"    role: ",[102,1392,1108],{"class":562},[102,1394,741],{"class":108},[102,1396,1398],{"class":104,"line":1397},31,[102,1399,1400],{"class":108},"    content: [\n",[102,1402,1404],{"class":104,"line":1403},32,[102,1405,1406],{"class":108},"      {\n",[102,1408,1410,1412,1415],{"class":104,"line":1409},33,[102,1411,804],{"class":108},[102,1413,1414],{"class":562},"'tool_result'",[102,1416,741],{"class":108},[102,1418,1420],{"class":104,"line":1419},34,[102,1421,1422],{"class":108},"        tool_use_id: toolUse.id,\n",[102,1424,1426,1429,1432,1434,1437],{"class":104,"line":1425},35,[102,1427,1428],{"class":108},"        content: ",[102,1430,1431],{"class":115},"JSON",[102,1433,1089],{"class":108},[102,1435,1436],{"class":694},"stringify",[102,1438,1439],{"class":108},"(results),\n",[102,1441,1443],{"class":104,"line":1442},36,[102,1444,826],{"class":108},[102,1446,1448],{"class":104,"line":1447},37,[102,1449,1450],{"class":108},"    ],\n",[102,1452,1454],{"class":104,"line":1453},38,[102,1455,1193],{"class":108},[102,1457,1459],{"class":104,"line":1458},39,[102,1460,207],{"class":108},[213,1462,1464],{"type":1463},"note",[12,1465,1466,1467,1470,1471,1474,1475,1478],{},"The shape is always the same: send the tools, watch for a ",[28,1468,1469],{},"tool_use"," block, run\nyour function, and return a ",[28,1472,1473],{},"tool_result"," with the matching ",[28,1476,1477],{},"tool_use_id",". Claude\nloops until it has what it needs to answer.",[16,1480,1482],{"id":1481},"tips","Tips",[56,1484,1485,1491,1497],{},[59,1486,1487,1490],{},[62,1488,1489],{},"Trim the records"," you return to the fields Claude needs. Smaller tool\nresults are cheaper and keep the answer focused.",[59,1492,1493,1496],{},[62,1494,1495],{},"One query input is enough."," Hybrid search interprets price, bedrooms, and\ndates from the query string, so you do not need a parameter per filter.",[59,1498,1499,1502],{},[62,1500,1501],{},"Return an empty array gracefully"," when a scraper has no completed run, so\nClaude can say nothing was found.",[16,1504,340],{"id":339},[342,1506,1507,1513],{"cols":112},[345,1508,1510],{"href":354,"icon":355,"title":1509},"The pattern",[12,1511,1512],{},"Why one tool is all you need.",[345,1514,1515],{"href":290,"icon":347,"title":348},[12,1516,1517],{},"The endpoint behind the tool.",[361,1519,1520],{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}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 pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sqxcx, html code.shiki .sqxcx{--shiki-default:#E36209}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":30,"searchDepth":129,"depth":129,"links":1522},[1523,1524,1525,1526],{"id":704,"depth":112,"text":705},{"id":1028,"depth":112,"text":1029},{"id":1481,"depth":112,"text":1482},{"id":339,"depth":112,"text":340},"Give Claude a tool that searches your Trawley scraper via the Anthropic SDK.","bot",{},"\u002Fdocs\u002Fdevelopers\u002Fclaude-agent-sdk",{"title":670,"description":1527},"docs\u002Fdevelopers\u002Fclaude-agent-sdk","NGUYsEAOX2Ydo4WmvrByyBbTsyowp0stayd7XWQkzLQ",{"id":1535,"title":1536,"badge":7,"body":1537,"description":1757,"extension":373,"group":662,"icon":1758,"lastUpdated":7,"meta":1759,"navigation":377,"order":190,"path":1760,"popular":379,"publishedAt":7,"seo":1761,"sidebarTitle":7,"stem":1762,"tree":382,"__hash__":1763},"docs\u002Fdocs\u002Fdevelopers\u002Fdiff-endpoint.md","Diff endpoint",{"type":9,"value":1538,"toc":1750},[1539,1542,1544,1550,1554,1596,1599,1704,1708,1711,1720,1722,1747],[12,1540,1541],{},"The diff endpoint compares the results of two completed scrape runs of the same\nscraper and reports what changed. Use it to detect new listings, dropped items,\nor updated values between runs, for example to power a \"what's new today\" feed or\na price-change alert.",[16,1543,521],{"id":520},[21,1545,1548],{"className":1546,"code":1547,"language":26},[24],"GET https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F{scraperId}\u002Fdiff?jobId1={older}&jobId2={newer}\n",[28,1549,1547],{"__ignoreMap":30},[529,1551,1553],{"id":1552},"query-parameters","Query parameters",[265,1555,1556,1569],{},[268,1557,1558],{},[271,1559,1560,1563,1566],{},[274,1561,1562],{},"Parameter",[274,1564,1565],{},"Type",[274,1567,1568],{},"Description",[281,1570,1571,1584],{},[271,1572,1573,1578,1581],{},[286,1574,1575],{},[28,1576,1577],{},"jobId1",[286,1579,1580],{},"string",[286,1582,1583],{},"The first run to compare. Required.",[271,1585,1586,1591,1593],{},[286,1587,1588],{},[28,1589,1590],{},"jobId2",[286,1592,1580],{},[286,1594,1595],{},"The second run to compare. Required.",[12,1597,1598],{},"Both jobs must belong to the scraper and must have completed.",[1600,1601,1602,1624],"code-group",{},[21,1603,1606],{"className":685,"code":1604,"filename":1605,"language":687,"meta":30,"style":30},"curl \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fdiff?\\\njobId1=job_a1&jobId2=job_b2\"\n","cURL",[28,1607,1608,1619],{"__ignoreMap":30},[102,1609,1610,1613,1616],{"class":104,"line":105},[102,1611,1612],{"class":694},"curl",[102,1614,1615],{"class":562}," \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fdiff?",[102,1617,1618],{"class":115},"\\\n",[102,1620,1621],{"class":104,"line":112},[102,1622,1623],{"class":562},"jobId1=job_a1&jobId2=job_b2\"\n",[21,1625,1630],{"className":1626,"code":1627,"filename":1628,"language":1629,"meta":30,"style":30},"language-js shiki shiki-themes github-light","const params = new URLSearchParams({ jobId1: 'job_a1', jobId2: 'job_b2' })\nconst res = await fetch(\n  `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fdiff?${params}`,\n)\nconst diff = await res.json()\n","JavaScript","js",[28,1631,1632,1658,1672,1683,1687],{"__ignoreMap":30},[102,1633,1634,1636,1638,1640,1642,1644,1647,1650,1653,1656],{"class":104,"line":105},[102,1635,721],{"class":720},[102,1637,923],{"class":115},[102,1639,727],{"class":720},[102,1641,928],{"class":720},[102,1643,931],{"class":694},[102,1645,1646],{"class":108},"({ jobId1: ",[102,1648,1649],{"class":562},"'job_a1'",[102,1651,1652],{"class":108},", jobId2: ",[102,1654,1655],{"class":562},"'job_b2'",[102,1657,940],{"class":108},[102,1659,1660,1662,1664,1666,1668,1670],{"class":104,"line":112},[102,1661,721],{"class":720},[102,1663,948],{"class":115},[102,1665,727],{"class":720},[102,1667,953],{"class":720},[102,1669,956],{"class":694},[102,1671,959],{"class":108},[102,1673,1674,1677,1679,1681],{"class":104,"line":129},[102,1675,1676],{"class":562},"  `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fdiff?${",[102,1678,974],{"class":108},[102,1680,977],{"class":562},[102,1682,741],{"class":108},[102,1684,1685],{"class":104,"line":190},[102,1686,1257],{"class":108},[102,1688,1689,1691,1694,1696,1698,1700,1702],{"class":104,"line":204},[102,1690,721],{"class":720},[102,1692,1693],{"class":115}," diff",[102,1695,727],{"class":720},[102,1697,953],{"class":720},[102,1699,1006],{"class":108},[102,1701,98],{"class":694},[102,1703,1011],{"class":108},[16,1705,1707],{"id":1706},"how-records-are-matched","How records are matched",[12,1709,1710],{},"Records are matched across the two runs using the scraper's first text field as\na stable key (for example a title or a listing URL). A record present in one run\nbut not the other is an addition or removal; a matched record whose contents\nchanged is reported as a change.",[213,1712,1713],{"type":461},[12,1714,1715,1716,1719],{},"If the scraper has no text field, there is no stable key to match on and the\nendpoint returns ",[28,1717,1718],{},"400",". Make sure your scraper captures something unique and\nstable, like a listing URL, to use diffs.",[16,1721,340],{"id":339},[342,1723,1724,1732],{"cols":112},[345,1725,1729],{"href":1726,"icon":1727,"title":1728},"\u002Fdocs\u002Fusers\u002Fviewing-results","database","Find job IDs",[12,1730,1731],{},"Each run has a job ID. List a scraper's runs in the dashboard.",[345,1733,1737],{"href":1734,"icon":1735,"title":1736},"\u002Fdocs\u002Fdevelopers\u002Ferror-responses","bug","Error responses",[12,1738,1739,1740,1742,1743,1746],{},"What ",[28,1741,1718],{}," and ",[28,1744,1745],{},"404"," mean here.",[361,1748,1749],{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}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 pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}",{"title":30,"searchDepth":129,"depth":129,"links":1751},[1752,1755,1756],{"id":520,"depth":112,"text":521,"children":1753},[1754],{"id":1552,"depth":129,"text":1553},{"id":1706,"depth":112,"text":1707},{"id":339,"depth":112,"text":340},"Compare two scrape runs to see what was added, removed, or changed.","boxes",{},"\u002Fdocs\u002Fdevelopers\u002Fdiff-endpoint",{"title":1536,"description":1757},"docs\u002Fdevelopers\u002Fdiff-endpoint","UNPUlBxPVyMYWa8OFuRQG5W24lqO3IAFoO2eJbOcJqc",{"id":1765,"title":1736,"badge":7,"body":1766,"description":2115,"extension":373,"group":490,"icon":1735,"lastUpdated":7,"meta":2116,"navigation":377,"order":112,"path":1734,"popular":379,"publishedAt":7,"seo":2117,"sidebarTitle":7,"stem":2118,"tree":382,"__hash__":2119},"docs\u002Fdocs\u002Fdevelopers\u002Ferror-responses.md",{"type":9,"value":1767,"toc":2109},[1768,1778,1782,1858,1862,1871,1937,1945,1949,2089,2091,2106],[12,1769,1770,1771,1774,1775,1089],{},"The API uses standard HTTP status codes. Errors return a JSON body with a\n",[28,1772,1773],{},"statusCode"," and a human-readable ",[28,1776,1777],{},"statusMessage",[16,1779,1781],{"id":1780},"status-codes","Status codes",[265,1783,1784,1797],{},[268,1785,1786],{},[271,1787,1788,1791,1794],{},[274,1789,1790],{},"Code",[274,1792,1793],{},"Meaning",[274,1795,1796],{},"Common cause",[281,1798,1799,1812,1833,1845],{},[271,1800,1801,1806,1809],{},[286,1802,1803],{},[28,1804,1805],{},"200",[286,1807,1808],{},"Success",[286,1810,1811],{},"The request succeeded.",[271,1813,1814,1818,1821],{},[286,1815,1816],{},[28,1817,1718],{},[286,1819,1820],{},"Bad request",[286,1822,1823,1824,1827,1828,1830,1831,50],{},"A required parameter is missing or invalid (for example an unknown ",[28,1825,1826],{},"format",", or a diff request missing ",[28,1829,1577],{},"\u002F",[28,1832,1590],{},[271,1834,1835,1839,1842],{},[286,1836,1837],{},[28,1838,1745],{},[286,1840,1841],{},"Not found",[286,1843,1844],{},"The scraper ID does not exist, or a referenced job is not found or has not completed.",[271,1846,1847,1852,1855],{},[286,1848,1849],{},[28,1850,1851],{},"429",[286,1853,1854],{},"Too many requests",[286,1856,1857],{},"You exceeded your plan's monthly allowance for that endpoint.",[16,1859,1861],{"id":1860},"the-empty-result-case","The empty result case",[12,1863,1864,1865,1867,1868,1870],{},"A request can succeed with no data. If a scraper exists but has never completed a\nrun, search and results endpoints return ",[28,1866,1805],{}," with an empty ",[28,1869,84],{}," array:",[21,1872,1874],{"className":96,"code":1873,"language":98,"meta":30,"style":30},"{\n  \"data\": [],\n  \"pagination\": { \"total\": 0, \"page\": 1, \"take\": 10, \"totalPages\": 0, \"hasMore\": false }\n}\n",[28,1875,1876,1880,1887,1933],{"__ignoreMap":30},[102,1877,1878],{"class":104,"line":105},[102,1879,109],{"class":108},[102,1881,1882,1884],{"class":104,"line":112},[102,1883,116],{"class":115},[102,1885,1886],{"class":108},": [],\n",[102,1888,1889,1891,1893,1895,1897,1899,1901,1903,1905,1907,1909,1911,1913,1915,1917,1919,1921,1923,1925,1927,1929,1931],{"class":104,"line":129},[102,1890,132],{"class":115},[102,1892,135],{"class":108},[102,1894,138],{"class":115},[102,1896,141],{"class":108},[102,1898,144],{"class":115},[102,1900,147],{"class":108},[102,1902,150],{"class":115},[102,1904,141],{"class":108},[102,1906,155],{"class":115},[102,1908,147],{"class":108},[102,1910,160],{"class":115},[102,1912,141],{"class":108},[102,1914,165],{"class":115},[102,1916,147],{"class":108},[102,1918,170],{"class":115},[102,1920,141],{"class":108},[102,1922,144],{"class":115},[102,1924,147],{"class":108},[102,1926,179],{"class":115},[102,1928,141],{"class":108},[102,1930,184],{"class":115},[102,1932,201],{"class":108},[102,1934,1935],{"class":104,"line":190},[102,1936,207],{"class":108},[213,1938,1939],{"type":622},[12,1940,1941,1942,1944],{},"Treat empty ",[28,1943,84],{}," as a normal state, not an error. In an agent, return \"I could\nnot find any matching records\" rather than throwing. It usually means the query\nmatched nothing, or the scraper has not run yet.",[16,1946,1948],{"id":1947},"handling-errors-in-code","Handling errors in code",[21,1950,1952],{"className":1626,"code":1951,"language":1629,"meta":30,"style":30},"const res = await fetch(url)\n\nif (res.status === 429) {\n  \u002F\u002F Back off or tell the user the quota is exhausted.\n}\nif (!res.ok) {\n  const { statusMessage } = await res.json()\n  throw new Error(`Trawley API ${res.status}: ${statusMessage}`)\n}\n\nconst { data } = await res.json()\n",[28,1953,1954,1969,1973,1988,1993,1997,2009,2029,2061,2065,2069],{"__ignoreMap":30},[102,1955,1956,1958,1960,1962,1964,1966],{"class":104,"line":105},[102,1957,721],{"class":720},[102,1959,948],{"class":115},[102,1961,727],{"class":720},[102,1963,953],{"class":720},[102,1965,956],{"class":694},[102,1967,1968],{"class":108},"(url)\n",[102,1970,1971],{"class":104,"line":112},[102,1972,868],{"emptyLinePlaceholder":377},[102,1974,1975,1978,1981,1983,1986],{"class":104,"line":129},[102,1976,1977],{"class":720},"if",[102,1979,1980],{"class":108}," (res.status ",[102,1982,1251],{"class":720},[102,1984,1985],{"class":115}," 429",[102,1987,914],{"class":108},[102,1989,1990],{"class":104,"line":190},[102,1991,1992],{"class":122},"  \u002F\u002F Back off or tell the user the quota is exhausted.\n",[102,1994,1995],{"class":104,"line":204},[102,1996,207],{"class":108},[102,1998,1999,2001,2003,2006],{"class":104,"line":764},[102,2000,1977],{"class":720},[102,2002,1133],{"class":108},[102,2004,2005],{"class":720},"!",[102,2007,2008],{"class":108},"res.ok) {\n",[102,2010,2011,2013,2015,2017,2019,2021,2023,2025,2027],{"class":104,"line":772},[102,2012,920],{"class":720},[102,2014,993],{"class":108},[102,2016,1777],{"class":115},[102,2018,998],{"class":108},[102,2020,1001],{"class":720},[102,2022,953],{"class":720},[102,2024,1006],{"class":108},[102,2026,98],{"class":694},[102,2028,1011],{"class":108},[102,2030,2031,2034,2036,2039,2041,2044,2047,2049,2052,2055,2057,2059],{"class":104,"line":778},[102,2032,2033],{"class":720},"  throw",[102,2035,928],{"class":720},[102,2037,2038],{"class":694}," Error",[102,2040,901],{"class":108},[102,2042,2043],{"class":562},"`Trawley API ${",[102,2045,2046],{"class":108},"res",[102,2048,1089],{"class":562},[102,2050,2051],{"class":108},"status",[102,2053,2054],{"class":562},"}: ${",[102,2056,1777],{"class":108},[102,2058,977],{"class":562},[102,2060,1257],{"class":108},[102,2062,2063],{"class":104,"line":789},[102,2064,207],{"class":108},[102,2066,2067],{"class":104,"line":795},[102,2068,868],{"emptyLinePlaceholder":377},[102,2070,2071,2073,2075,2077,2079,2081,2083,2085,2087],{"class":104,"line":801},[102,2072,721],{"class":720},[102,2074,993],{"class":108},[102,2076,84],{"class":115},[102,2078,998],{"class":108},[102,2080,1001],{"class":720},[102,2082,953],{"class":720},[102,2084,1006],{"class":108},[102,2086,98],{"class":694},[102,2088,1011],{"class":108},[16,2090,340],{"id":339},[342,2092,2093,2101],{"cols":112},[345,2094,2095],{"href":479,"icon":480,"title":246},[12,2096,2097,2098,2100],{},"What triggers a ",[28,2099,1851],{}," and how allowances work.",[345,2102,2103],{"href":493,"icon":491,"title":211},[12,2104,2105],{},"Current status of API auth.",[361,2107,2108],{},"html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}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 pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}",{"title":30,"searchDepth":129,"depth":129,"links":2110},[2111,2112,2113,2114],{"id":1780,"depth":112,"text":1781},{"id":1860,"depth":112,"text":1861},{"id":1947,"depth":112,"text":1948},{"id":339,"depth":112,"text":340},"Status codes the Trawley API returns and how to handle them.",{},{"title":1736,"description":2115},"docs\u002Fdevelopers\u002Ferror-responses","CZXDO4kpiuJJ0vcHaUbtyKV_vS0VQ_neCvxYFYJBCmM",{"id":2121,"title":2122,"badge":7,"body":2123,"description":2320,"extension":373,"group":662,"icon":2321,"lastUpdated":7,"meta":2322,"navigation":377,"order":129,"path":2323,"popular":379,"publishedAt":7,"seo":2324,"sidebarTitle":7,"stem":2325,"tree":382,"__hash__":2326},"docs\u002Fdocs\u002Fdevelopers\u002Fexport-endpoint.md","Export endpoint",{"type":9,"value":2124,"toc":2313},[2125,2128,2130,2136,2138,2176,2228,2235,2251,2255,2293,2295,2310],[12,2126,2127],{},"The export endpoint streams all of a scraper's results as a downloadable file.\nIt pages through the full result set for you, so a single request returns\neverything rather than one page.",[16,2129,521],{"id":520},[21,2131,2134],{"className":2132,"code":2133,"language":26},[24],"GET https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F{scraperId}\u002Fexport?format=json\n",[28,2135,2133],{"__ignoreMap":30},[529,2137,1553],{"id":1552},[265,2139,2140,2153],{},[268,2141,2142],{},[271,2143,2144,2146,2148,2151],{},[274,2145,1562],{},[274,2147,1565],{},[274,2149,2150],{},"Default",[274,2152,1568],{},[281,2154,2155],{},[271,2156,2157,2161,2163,2167],{},[286,2158,2159],{},[28,2160,1826],{},[286,2162,1580],{},[286,2164,2165],{},[28,2166,98],{},[286,2168,2169,2170,2172,2173,1089],{},"Output format. One of ",[28,2171,98],{}," or ",[28,2174,2175],{},"csv",[1600,2177,2178,2204],{},[21,2179,2181],{"className":685,"code":2180,"filename":1431,"language":687,"meta":30,"style":30},"curl -L \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fexport?format=json\" \\\n  -o results.json\n",[28,2182,2183,2196],{"__ignoreMap":30},[102,2184,2185,2187,2190,2193],{"class":104,"line":105},[102,2186,1612],{"class":694},[102,2188,2189],{"class":115}," -L",[102,2191,2192],{"class":562}," \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fexport?format=json\"",[102,2194,2195],{"class":115}," \\\n",[102,2197,2198,2201],{"class":104,"line":112},[102,2199,2200],{"class":115},"  -o",[102,2202,2203],{"class":562}," results.json\n",[21,2205,2208],{"className":685,"code":2206,"filename":2207,"language":687,"meta":30,"style":30},"curl -L \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fexport?format=csv\" \\\n  -o results.csv\n","CSV",[28,2209,2210,2221],{"__ignoreMap":30},[102,2211,2212,2214,2216,2219],{"class":104,"line":105},[102,2213,1612],{"class":694},[102,2215,2189],{"class":115},[102,2217,2218],{"class":562}," \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fexport?format=csv\"",[102,2220,2195],{"class":115},[102,2222,2223,2225],{"class":104,"line":112},[102,2224,2200],{"class":115},[102,2226,2227],{"class":562}," results.csv\n",[12,2229,2230,2231,2234],{},"The response is sent as a file attachment named after your scraper (for example\n",[28,2232,2233],{},"acme_listings_results.csv","). CSV columns are your scraper's field names.",[213,2236,2237],{"type":215},[12,2238,2239,2240,2242,2243,2172,2245,2247,2248,1089],{},"Passing any ",[28,2241,1826],{}," other than ",[28,2244,98],{},[28,2246,2175],{}," returns ",[28,2249,2250],{},"400 Bad Request",[16,2252,2254],{"id":2253},"when-to-use-export-vs-results","When to use export vs results",[265,2256,2257,2267],{},[268,2258,2259],{},[271,2260,2261,2264],{},[274,2262,2263],{},"Use export when",[274,2265,2266],{},"Use the results endpoint when",[281,2268,2269,2277,2285],{},[271,2270,2271,2274],{},[286,2272,2273],{},"You want the entire dataset in one file",[286,2275,2276],{},"You want to page through results in your app",[271,2278,2279,2282],{},[286,2280,2281],{},"You are loading into a spreadsheet or warehouse",[286,2283,2284],{},"You need a small, fast slice",[271,2286,2287,2290],{},[286,2288,2289],{},"A download is the end product",[286,2291,2292],{},"The data feeds further requests",[16,2294,340],{"id":339},[342,2296,2297,2304],{"cols":112},[345,2298,2301],{"href":2299,"icon":1727,"title":2300},"\u002Fdocs\u002Fdevelopers\u002Fresults-endpoint","Results endpoint",[12,2302,2303],{},"Paginated access when you do not need the whole set.",[345,2305,2307],{"href":1760,"icon":1758,"title":2306},"Compare two runs",[12,2308,2309],{},"See what changed between scrapes.",[361,2311,2312],{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}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);}",{"title":30,"searchDepth":129,"depth":129,"links":2314},[2315,2318,2319],{"id":520,"depth":112,"text":521,"children":2316},[2317],{"id":1552,"depth":129,"text":1553},{"id":2253,"depth":112,"text":2254},{"id":339,"depth":112,"text":340},"Download every result from a scraper as JSON or CSV in one request.","file-text",{},"\u002Fdocs\u002Fdevelopers\u002Fexport-endpoint",{"title":2122,"description":2320},"docs\u002Fdevelopers\u002Fexport-endpoint","9-0Z9iSC5Z4SehEmz2JNq5vWyZcPhFkNuXX4zXzowic",{"id":2328,"title":348,"badge":7,"body":2329,"description":2927,"extension":373,"group":662,"icon":347,"lastUpdated":7,"meta":2928,"navigation":377,"order":105,"path":290,"popular":377,"publishedAt":7,"seo":2929,"sidebarTitle":7,"stem":2930,"tree":382,"__hash__":2931},"docs\u002Fdocs\u002Fdevelopers\u002Fhybrid-search.md",{"type":9,"value":2330,"toc":2917},[2331,2334,2355,2358,2360,2366,2368,2431,2603,2607,2786,2852,2858,2863,2875,2878,2882,2896,2898,2915],[12,2332,2333],{},"Hybrid search is the endpoint you will reach for most. You send a natural\nlanguage query, and Trawley combines three techniques in a single call:",[2335,2336,2337,2343,2349],"ol",{},[59,2338,2339,2342],{},[62,2340,2341],{},"AI-generated structured filters"," turn precise constraints in your query\n(bedrooms, price, dates) into exact filters.",[59,2344,2345,2348],{},[62,2346,2347],{},"Vector similarity"," matches fuzzy, semantic parts of the query (locations,\ndescriptions, names) by meaning, not exact words.",[59,2350,2351,2354],{},[62,2352,2353],{},"Keyword matching"," catches literal term overlaps.",[12,2356,2357],{},"The result: \"3 bed houses near Kendal under £500k with a garden\" returns the\nright records without you writing any query logic.",[16,2359,521],{"id":520},[21,2361,2364],{"className":2362,"code":2363,"language":26},[24],"GET https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F{scraperId}\u002Fhybrid\n",[28,2365,2363],{"__ignoreMap":30},[529,2367,1553],{"id":1552},[265,2369,2370,2382],{},[268,2371,2372],{},[271,2373,2374,2376,2378,2380],{},[274,2375,1562],{},[274,2377,1565],{},[274,2379,2150],{},[274,2381,1568],{},[281,2383,2384,2398,2415],{},[271,2385,2386,2390,2392,2395],{},[286,2387,2388],{},[28,2389,347],{},[286,2391,1580],{},[286,2393,2394],{},"required",[286,2396,2397],{},"The natural language query.",[271,2399,2400,2405,2408,2412],{},[286,2401,2402],{},[28,2403,2404],{},"page",[286,2406,2407],{},"number",[286,2409,2410],{},[28,2411,155],{},[286,2413,2414],{},"Page of results to return.",[271,2416,2417,2422,2424,2428],{},[286,2418,2419],{},[28,2420,2421],{},"take",[286,2423,2407],{},[286,2425,2426],{},[28,2427,165],{},[286,2429,2430],{},"Number of results per page.",[1600,2432,2433,2452,2562],{},[21,2434,2436],{"className":685,"code":2435,"filename":1605,"language":687,"meta":30,"style":30},"curl \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?\\\nsearch=3+bed+houses+with+a+garden&page=1&take=10\"\n",[28,2437,2438,2447],{"__ignoreMap":30},[102,2439,2440,2442,2445],{"class":104,"line":105},[102,2441,1612],{"class":694},[102,2443,2444],{"class":562}," \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?",[102,2446,1618],{"class":115},[102,2448,2449],{"class":104,"line":112},[102,2450,2451],{"class":562},"search=3+bed+houses+with+a+garden&page=1&take=10\"\n",[21,2453,2455],{"className":1626,"code":2454,"filename":1628,"language":1629,"meta":30,"style":30},"const params = new URLSearchParams({\n  search: '3 bed houses with a garden',\n  page: '1',\n  take: '10',\n})\nconst res = await fetch(\n  `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?${params}`,\n)\nconst { data, pagination, meta } = await res.json()\n",[28,2456,2457,2471,2481,2491,2500,2505,2519,2530,2534],{"__ignoreMap":30},[102,2458,2459,2461,2463,2465,2467,2469],{"class":104,"line":105},[102,2460,721],{"class":720},[102,2462,923],{"class":115},[102,2464,727],{"class":720},[102,2466,928],{"class":720},[102,2468,931],{"class":694},[102,2470,1158],{"class":108},[102,2472,2473,2476,2479],{"class":104,"line":112},[102,2474,2475],{"class":108},"  search: ",[102,2477,2478],{"class":562},"'3 bed houses with a garden'",[102,2480,741],{"class":108},[102,2482,2483,2486,2489],{"class":104,"line":129},[102,2484,2485],{"class":108},"  page: ",[102,2487,2488],{"class":562},"'1'",[102,2490,741],{"class":108},[102,2492,2493,2496,2498],{"class":104,"line":190},[102,2494,2495],{"class":108},"  take: ",[102,2497,937],{"class":562},[102,2499,741],{"class":108},[102,2501,2502],{"class":104,"line":204},[102,2503,2504],{"class":108},"})\n",[102,2506,2507,2509,2511,2513,2515,2517],{"class":104,"line":764},[102,2508,721],{"class":720},[102,2510,948],{"class":115},[102,2512,727],{"class":720},[102,2514,953],{"class":720},[102,2516,956],{"class":694},[102,2518,959],{"class":108},[102,2520,2521,2524,2526,2528],{"class":104,"line":772},[102,2522,2523],{"class":562},"  `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?${",[102,2525,974],{"class":108},[102,2527,977],{"class":562},[102,2529,741],{"class":108},[102,2531,2532],{"class":104,"line":778},[102,2533,1257],{"class":108},[102,2535,2536,2538,2540,2542,2544,2546,2548,2550,2552,2554,2556,2558,2560],{"class":104,"line":789},[102,2537,721],{"class":720},[102,2539,993],{"class":108},[102,2541,84],{"class":115},[102,2543,147],{"class":108},[102,2545,88],{"class":115},[102,2547,147],{"class":108},[102,2549,92],{"class":115},[102,2551,998],{"class":108},[102,2553,1001],{"class":720},[102,2555,953],{"class":720},[102,2557,1006],{"class":108},[102,2559,98],{"class":694},[102,2561,1011],{"class":108},[21,2563,2568],{"className":2564,"code":2565,"filename":2566,"language":2567,"meta":30,"style":30},"language-python shiki shiki-themes github-light","import requests\n\nres = requests.get(\n    \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid\",\n    params={\"search\": \"3 bed houses with a garden\", \"page\": 1, \"take\": 10},\n)\nbody = res.json()\n","Python","python",[28,2569,2570,2575,2579,2584,2589,2594,2598],{"__ignoreMap":30},[102,2571,2572],{"class":104,"line":105},[102,2573,2574],{},"import requests\n",[102,2576,2577],{"class":104,"line":112},[102,2578,868],{"emptyLinePlaceholder":377},[102,2580,2581],{"class":104,"line":129},[102,2582,2583],{},"res = requests.get(\n",[102,2585,2586],{"class":104,"line":190},[102,2587,2588],{},"    \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid\",\n",[102,2590,2591],{"class":104,"line":204},[102,2592,2593],{},"    params={\"search\": \"3 bed houses with a garden\", \"page\": 1, \"take\": 10},\n",[102,2595,2596],{"class":104,"line":764},[102,2597,1257],{},[102,2599,2600],{"class":104,"line":772},[102,2601,2602],{},"body = res.json()\n",[16,2604,2606],{"id":2605},"response","Response",[21,2608,2610],{"className":96,"code":2609,"language":98,"meta":30,"style":30},"{\n  \"data\": [\n    {\n      \"title\": \"3 bed semi-detached house\",\n      \"price\": 425000,\n      \"bedrooms\": 3,\n      \"location\": \"Kendal\",\n      \"url\": \"https:\u002F\u002Facmehomes.co.uk\u002Flistings\u002F3-bed-semi-kendal\"\n    }\n  ],\n  \"pagination\": {\n    \"total\": 18,\n    \"page\": 1,\n    \"take\": 10,\n    \"totalPages\": 2,\n    \"hasMore\": true\n  },\n  \"meta\": {\n    \"filter\": \"bedrooms = 3\"\n  }\n}\n",[28,2611,2612,2616,2622,2627,2639,2651,2663,2675,2685,2690,2695,2702,2714,2725,2736,2748,2758,2762,2768,2778,2782],{"__ignoreMap":30},[102,2613,2614],{"class":104,"line":105},[102,2615,109],{"class":108},[102,2617,2618,2620],{"class":104,"line":112},[102,2619,116],{"class":115},[102,2621,549],{"class":108},[102,2623,2624],{"class":104,"line":129},[102,2625,2626],{"class":108},"    {\n",[102,2628,2629,2632,2634,2637],{"class":104,"line":190},[102,2630,2631],{"class":115},"      \"title\"",[102,2633,141],{"class":108},[102,2635,2636],{"class":562},"\"3 bed semi-detached house\"",[102,2638,741],{"class":108},[102,2640,2641,2644,2646,2649],{"class":104,"line":204},[102,2642,2643],{"class":115},"      \"price\"",[102,2645,141],{"class":108},[102,2647,2648],{"class":115},"425000",[102,2650,741],{"class":108},[102,2652,2653,2656,2658,2661],{"class":104,"line":764},[102,2654,2655],{"class":115},"      \"bedrooms\"",[102,2657,141],{"class":108},[102,2659,2660],{"class":115},"3",[102,2662,741],{"class":108},[102,2664,2665,2668,2670,2673],{"class":104,"line":772},[102,2666,2667],{"class":115},"      \"location\"",[102,2669,141],{"class":108},[102,2671,2672],{"class":562},"\"Kendal\"",[102,2674,741],{"class":108},[102,2676,2677,2680,2682],{"class":104,"line":778},[102,2678,2679],{"class":115},"      \"url\"",[102,2681,141],{"class":108},[102,2683,2684],{"class":562},"\"https:\u002F\u002Facmehomes.co.uk\u002Flistings\u002F3-bed-semi-kendal\"\n",[102,2686,2687],{"class":104,"line":789},[102,2688,2689],{"class":108},"    }\n",[102,2691,2692],{"class":104,"line":795},[102,2693,2694],{"class":108},"  ],\n",[102,2696,2697,2699],{"class":104,"line":801},[102,2698,132],{"class":115},[102,2700,2701],{"class":108},": {\n",[102,2703,2704,2707,2709,2712],{"class":104,"line":812},[102,2705,2706],{"class":115},"    \"total\"",[102,2708,141],{"class":108},[102,2710,2711],{"class":115},"18",[102,2713,741],{"class":108},[102,2715,2716,2719,2721,2723],{"class":104,"line":823},[102,2717,2718],{"class":115},"    \"page\"",[102,2720,141],{"class":108},[102,2722,155],{"class":115},[102,2724,741],{"class":108},[102,2726,2727,2730,2732,2734],{"class":104,"line":829},[102,2728,2729],{"class":115},"    \"take\"",[102,2731,141],{"class":108},[102,2733,165],{"class":115},[102,2735,741],{"class":108},[102,2737,2738,2741,2743,2746],{"class":104,"line":835},[102,2739,2740],{"class":115},"    \"totalPages\"",[102,2742,141],{"class":108},[102,2744,2745],{"class":115},"2",[102,2747,741],{"class":108},[102,2749,2750,2753,2755],{"class":104,"line":847},[102,2751,2752],{"class":115},"    \"hasMore\"",[102,2754,141],{"class":108},[102,2756,2757],{"class":115},"true\n",[102,2759,2760],{"class":104,"line":853},[102,2761,850],{"class":108},[102,2763,2764,2766],{"class":104,"line":865},[102,2765,193],{"class":115},[102,2767,2701],{"class":108},[102,2769,2770,2773,2775],{"class":104,"line":871},[102,2771,2772],{"class":115},"    \"filter\"",[102,2774,141],{"class":108},[102,2776,2777],{"class":562},"\"bedrooms = 3\"\n",[102,2779,2780],{"class":104,"line":884},[102,2781,1338],{"class":108},[102,2783,2784],{"class":104,"line":889},[102,2785,207],{"class":108},[265,2787,2788,2797],{},[268,2789,2790],{},[271,2791,2792,2795],{},[274,2793,2794],{},"Field",[274,2796,1568],{},[281,2798,2799,2808,2818,2830,2842],{},[271,2800,2801,2805],{},[286,2802,2803],{},[28,2804,84],{},[286,2806,2807],{},"Array of matching records. Each record's fields are the ones you defined on the scraper.",[271,2809,2810,2815],{},[286,2811,2812],{},[28,2813,2814],{},"pagination.total",[286,2816,2817],{},"Estimated total number of matches across all pages.",[271,2819,2820,2825],{},[286,2821,2822],{},[28,2823,2824],{},"pagination.totalPages",[286,2826,2827,2828,1089],{},"Total pages given the current ",[28,2829,2421],{},[271,2831,2832,2837],{},[286,2833,2834],{},[28,2835,2836],{},"pagination.hasMore",[286,2838,2839,2841],{},[28,2840,1136],{}," when more pages remain after this one.",[271,2843,2844,2849],{},[286,2845,2846],{},[28,2847,2848],{},"meta.filter",[286,2850,2851],{},"The structured filter Trawley's AI derived from your query.",[16,2853,2855,2856],{"id":2854},"debugging-with-metafilter","Debugging with ",[28,2857,2848],{},[12,2859,2860,2862],{},[28,2861,2848],{}," shows the exact structured filter the AI built from your natural\nlanguage query before similarity ranking. It is the single most useful field\nfor understanding why you got the results you did.",[213,2864,2865],{"type":622},[12,2866,2867,2868,2870,2871,2874],{},"If a query returns too few or unexpected results, check ",[28,2869,2848],{},". A query\nlike \"cheap flats\" might produce no filter at all (price thresholds are fuzzy),\nwhile \"flats under £200k\" produces ",[28,2872,2873],{},"price \u003C 200000",". Seeing the filter tells you\nwhether the constraint was interpreted as exact or left to similarity search.",[12,2876,2877],{},"Trawley deliberately leaves fuzzy aspects (approximate locations, names, free\ntext) out of the filter and resolves them through vector similarity instead, so\nyou do not need exact-match values for them.",[16,2879,2881],{"id":2880},"notes","Notes",[56,2883,2884,2887,2890],{},[59,2885,2886],{},"Only fields with a non-text data type (number, date, boolean) are eligible for\nstructured filters. Text fields are always matched by similarity.",[59,2888,2889],{},"Results come from the most recent completed scrape run.",[59,2891,2892,2893,2895],{},"If the scraper has never completed a run, ",[28,2894,84],{}," is an empty array.",[16,2897,340],{"id":339},[342,2899,2900,2909],{"cols":112},[345,2901,2903],{"href":378,"icon":480,"title":2902},"Rate limits & errors",[12,2904,2905,2906,2908],{},"What a ",[28,2907,1851],{}," looks like and how quotas work.",[345,2910,2912],{"href":631,"icon":640,"title":2911},"Use it as an agent tool",[12,2913,2914],{},"Wrap this endpoint as a function your LLM can call.",[361,2916,1749],{},{"title":30,"searchDepth":129,"depth":129,"links":2918},[2919,2922,2923,2925,2926],{"id":520,"depth":112,"text":521,"children":2920},[2921],{"id":1552,"depth":129,"text":1553},{"id":2605,"depth":112,"text":2606},{"id":2854,"depth":112,"text":2924},"Debugging with meta.filter",{"id":2880,"depth":112,"text":2881},{"id":339,"depth":112,"text":340},"The recommended endpoint — natural language search combining AI filters, vector similarity, and keyword matching.",{},{"title":348,"description":2927},"docs\u002Fdevelopers\u002Fhybrid-search","19JeFKP2eEz8im9jEGKSgLCKZ6ZiPyd_FmaYzB7QszI",{"id":2933,"title":2934,"badge":7,"body":2935,"description":3444,"extension":373,"group":356,"icon":3445,"lastUpdated":7,"meta":3446,"navigation":377,"order":204,"path":3447,"popular":379,"publishedAt":7,"seo":3448,"sidebarTitle":7,"stem":3449,"tree":382,"__hash__":3450},"docs\u002Fdocs\u002Fdevelopers\u002Flangchain.md","LangChain",{"type":9,"value":2936,"toc":3439},[2937,2943,2966,2968,2975,3235,3239,3414,3423,3425,3436],[12,2938,2939,2940,2942],{},"This guide wraps Trawley's ",[255,2941,516],{"href":290},"\nendpoint as a LangChain tool, so a LangChain agent can call it.",[21,2944,2946],{"className":685,"code":2945,"language":687,"meta":30,"style":30},"npm install langchain @langchain\u002Fcore @langchain\u002Fopenai zod\n",[28,2947,2948],{"__ignoreMap":30},[102,2949,2950,2952,2954,2957,2960,2963],{"class":104,"line":105},[102,2951,695],{"class":694},[102,2953,698],{"class":562},[102,2955,2956],{"class":562}," langchain",[102,2958,2959],{"class":562}," @langchain\u002Fcore",[102,2961,2962],{"class":562}," @langchain\u002Fopenai",[102,2964,2965],{"class":562}," zod\n",[16,2967,705],{"id":704},[12,2969,2970,2971,2974],{},"LangChain's ",[28,2972,2973],{},"tool"," helper takes a function plus a Zod schema describing its\ninput.",[21,2976,2978],{"className":711,"code":2977,"language":713,"meta":30,"style":30},"import { tool } from '@langchain\u002Fcore\u002Ftools'\nimport { z } from 'zod'\n\nconst TRAWLEY_SCRAPER_ID = 'scr_8f2a1c9e'\n\nexport const searchListings = tool(\n  async ({ query }) => {\n    const params = new URLSearchParams({ search: query, take: '10' })\n    const res = await fetch(\n      `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F${TRAWLEY_SCRAPER_ID}\u002Fhybrid?${params}`,\n    )\n    const { data } = await res.json()\n    \u002F\u002F Tools must return a string; the model reads it as the observation.\n    return JSON.stringify(data)\n  },\n  {\n    name: 'search_listings',\n    description:\n      'Search live property listings from acmehomes.co.uk. Accepts a natural ' +\n      'language query; constraints like price, bedrooms, or date are understood. ' +\n      'Returns structured records.',\n    schema: z.object({\n      query: z.string().describe('What to find, e.g. \"3 bed houses under £500k with a garden\"'),\n    }),\n  },\n)\n",[28,2979,2980,2992,3004,3008,3018,3022,3039,3056,3074,3088,3103,3108,3128,3133,3148,3152,3157,3166,3171,3178,3185,3192,3202,3222,3227,3231],{"__ignoreMap":30},[102,2981,2982,2984,2987,2989],{"class":104,"line":105},[102,2983,1042],{"class":720},[102,2985,2986],{"class":108}," { tool } ",[102,2988,1048],{"class":720},[102,2990,2991],{"class":562}," '@langchain\u002Fcore\u002Ftools'\n",[102,2993,2994,2996,2999,3001],{"class":104,"line":112},[102,2995,1042],{"class":720},[102,2997,2998],{"class":108}," { z } ",[102,3000,1048],{"class":720},[102,3002,3003],{"class":562}," 'zod'\n",[102,3005,3006],{"class":104,"line":129},[102,3007,868],{"emptyLinePlaceholder":377},[102,3009,3010,3012,3014,3016],{"class":104,"line":190},[102,3011,721],{"class":720},[102,3013,876],{"class":115},[102,3015,727],{"class":720},[102,3017,881],{"class":562},[102,3019,3020],{"class":104,"line":204},[102,3021,868],{"emptyLinePlaceholder":377},[102,3023,3024,3027,3030,3032,3034,3037],{"class":104,"line":764},[102,3025,3026],{"class":720},"export",[102,3028,3029],{"class":720}," const",[102,3031,724],{"class":115},[102,3033,727],{"class":720},[102,3035,3036],{"class":694}," tool",[102,3038,959],{"class":108},[102,3040,3041,3044,3047,3049,3052,3054],{"class":104,"line":772},[102,3042,3043],{"class":720},"  async",[102,3045,3046],{"class":108}," ({ ",[102,3048,905],{"class":904},[102,3050,3051],{"class":108}," }) ",[102,3053,1245],{"class":720},[102,3055,730],{"class":108},[102,3057,3058,3060,3062,3064,3066,3068,3070,3072],{"class":104,"line":778},[102,3059,1289],{"class":720},[102,3061,923],{"class":115},[102,3063,727],{"class":720},[102,3065,928],{"class":720},[102,3067,931],{"class":694},[102,3069,934],{"class":108},[102,3071,937],{"class":562},[102,3073,940],{"class":108},[102,3075,3076,3078,3080,3082,3084,3086],{"class":104,"line":789},[102,3077,1289],{"class":720},[102,3079,948],{"class":115},[102,3081,727],{"class":720},[102,3083,953],{"class":720},[102,3085,956],{"class":694},[102,3087,959],{"class":108},[102,3089,3090,3093,3095,3097,3099,3101],{"class":104,"line":795},[102,3091,3092],{"class":562},"      `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F${",[102,3094,968],{"class":115},[102,3096,971],{"class":562},[102,3098,974],{"class":108},[102,3100,977],{"class":562},[102,3102,741],{"class":108},[102,3104,3105],{"class":104,"line":801},[102,3106,3107],{"class":108},"    )\n",[102,3109,3110,3112,3114,3116,3118,3120,3122,3124,3126],{"class":104,"line":812},[102,3111,1289],{"class":720},[102,3113,993],{"class":108},[102,3115,84],{"class":115},[102,3117,998],{"class":108},[102,3119,1001],{"class":720},[102,3121,953],{"class":720},[102,3123,1006],{"class":108},[102,3125,98],{"class":694},[102,3127,1011],{"class":108},[102,3129,3130],{"class":104,"line":823},[102,3131,3132],{"class":122},"    \u002F\u002F Tools must return a string; the model reads it as the observation.\n",[102,3134,3135,3138,3141,3143,3145],{"class":104,"line":829},[102,3136,3137],{"class":720},"    return",[102,3139,3140],{"class":115}," JSON",[102,3142,1089],{"class":108},[102,3144,1436],{"class":694},[102,3146,3147],{"class":108},"(data)\n",[102,3149,3150],{"class":104,"line":835},[102,3151,850],{"class":108},[102,3153,3154],{"class":104,"line":847},[102,3155,3156],{"class":108},"  {\n",[102,3158,3159,3162,3164],{"class":104,"line":853},[102,3160,3161],{"class":108},"    name: ",[102,3163,738],{"class":562},[102,3165,741],{"class":108},[102,3167,3168],{"class":104,"line":865},[102,3169,3170],{"class":108},"    description:\n",[102,3172,3173,3176],{"class":104,"line":871},[102,3174,3175],{"class":562},"      'Search live property listings from acmehomes.co.uk. Accepts a natural '",[102,3177,754],{"class":720},[102,3179,3180,3183],{"class":104,"line":884},[102,3181,3182],{"class":562},"      'language query; constraints like price, bedrooms, or date are understood. '",[102,3184,754],{"class":720},[102,3186,3187,3190],{"class":104,"line":889},[102,3188,3189],{"class":562},"      'Returns structured records.'",[102,3191,741],{"class":108},[102,3193,3194,3197,3200],{"class":104,"line":917},[102,3195,3196],{"class":108},"    schema: z.",[102,3198,3199],{"class":694},"object",[102,3201,1158],{"class":108},[102,3203,3204,3207,3209,3212,3215,3217,3219],{"class":104,"line":943},[102,3205,3206],{"class":108},"      query: z.",[102,3208,1580],{"class":694},[102,3210,3211],{"class":108},"().",[102,3213,3214],{"class":694},"describe",[102,3216,901],{"class":108},[102,3218,818],{"class":562},[102,3220,3221],{"class":108},"),\n",[102,3223,3224],{"class":104,"line":962},[102,3225,3226],{"class":108},"    }),\n",[102,3228,3229],{"class":104,"line":982},[102,3230,850],{"class":108},[102,3232,3233],{"class":104,"line":988},[102,3234,1257],{"class":108},[16,3236,3238],{"id":3237},"use-it-in-an-agent","Use it in an agent",[21,3240,3242],{"className":711,"code":3241,"language":713,"meta":30,"style":30},"import { ChatOpenAI } from '@langchain\u002Fopenai'\nimport { createReactAgent } from 'langchain\u002Fagents'\nimport { searchListings } from '.\u002Fsearch-listings'\n\nconst model = new ChatOpenAI({ model: 'gpt-4.1' })\n\nconst agent = createReactAgent({\n  llm: model,\n  tools: [searchListings],\n})\n\nconst result = await agent.invoke({\n  messages: [\n    { role: 'user', content: 'Find a 3 bed house near Kendal with a garden under £500k.' },\n  ],\n})\n\nconsole.log(result.messages.at(-1)?.content)\n",[28,3243,3244,3256,3268,3280,3284,3306,3310,3324,3329,3334,3338,3342,3361,3366,3379,3383,3387,3391],{"__ignoreMap":30},[102,3245,3246,3248,3251,3253],{"class":104,"line":105},[102,3247,1042],{"class":720},[102,3249,3250],{"class":108}," { ChatOpenAI } ",[102,3252,1048],{"class":720},[102,3254,3255],{"class":562}," '@langchain\u002Fopenai'\n",[102,3257,3258,3260,3263,3265],{"class":104,"line":112},[102,3259,1042],{"class":720},[102,3261,3262],{"class":108}," { createReactAgent } ",[102,3264,1048],{"class":720},[102,3266,3267],{"class":562}," 'langchain\u002Fagents'\n",[102,3269,3270,3272,3275,3277],{"class":104,"line":129},[102,3271,1042],{"class":720},[102,3273,3274],{"class":108}," { searchListings } ",[102,3276,1048],{"class":720},[102,3278,3279],{"class":562}," '.\u002Fsearch-listings'\n",[102,3281,3282],{"class":104,"line":190},[102,3283,868],{"emptyLinePlaceholder":377},[102,3285,3286,3288,3291,3293,3295,3298,3301,3304],{"class":104,"line":204},[102,3287,721],{"class":720},[102,3289,3290],{"class":115}," model",[102,3292,727],{"class":720},[102,3294,928],{"class":720},[102,3296,3297],{"class":694}," ChatOpenAI",[102,3299,3300],{"class":108},"({ model: ",[102,3302,3303],{"class":562},"'gpt-4.1'",[102,3305,940],{"class":108},[102,3307,3308],{"class":104,"line":764},[102,3309,868],{"emptyLinePlaceholder":377},[102,3311,3312,3314,3317,3319,3322],{"class":104,"line":772},[102,3313,721],{"class":720},[102,3315,3316],{"class":115}," agent",[102,3318,727],{"class":720},[102,3320,3321],{"class":694}," createReactAgent",[102,3323,1158],{"class":108},[102,3325,3326],{"class":104,"line":778},[102,3327,3328],{"class":108},"  llm: model,\n",[102,3330,3331],{"class":104,"line":789},[102,3332,3333],{"class":108},"  tools: [searchListings],\n",[102,3335,3336],{"class":104,"line":795},[102,3337,2504],{"class":108},[102,3339,3340],{"class":104,"line":801},[102,3341,868],{"emptyLinePlaceholder":377},[102,3343,3344,3346,3349,3351,3353,3356,3359],{"class":104,"line":812},[102,3345,721],{"class":720},[102,3347,3348],{"class":115}," result",[102,3350,727],{"class":720},[102,3352,953],{"class":720},[102,3354,3355],{"class":108}," agent.",[102,3357,3358],{"class":694},"invoke",[102,3360,1158],{"class":108},[102,3362,3363],{"class":104,"line":823},[102,3364,3365],{"class":108},"  messages: [\n",[102,3367,3368,3371,3373,3375,3377],{"class":104,"line":829},[102,3369,3370],{"class":108},"    { role: ",[102,3372,1108],{"class":562},[102,3374,1111],{"class":108},[102,3376,1114],{"class":562},[102,3378,187],{"class":108},[102,3380,3381],{"class":104,"line":835},[102,3382,2694],{"class":108},[102,3384,3385],{"class":104,"line":847},[102,3386,2504],{"class":108},[102,3388,3389],{"class":104,"line":853},[102,3390,868],{"emptyLinePlaceholder":377},[102,3392,3393,3396,3398,3401,3404,3406,3409,3411],{"class":104,"line":865},[102,3394,3395],{"class":108},"console.",[102,3397,1325],{"class":694},[102,3399,3400],{"class":108},"(result.messages.",[102,3402,3403],{"class":694},"at",[102,3405,901],{"class":108},[102,3407,3408],{"class":720},"-",[102,3410,155],{"class":115},[102,3412,3413],{"class":108},")?.content)\n",[213,3415,3416],{"type":1463},[12,3417,3418,3419,3422],{},"A LangChain tool must return a string, so serialise the records with\n",[28,3420,3421],{},"JSON.stringify",". The agent reads that string as the tool observation and uses it\nto answer.",[16,3424,340],{"id":339},[342,3426,3427,3432],{"cols":112},[345,3428,3429],{"href":354,"icon":355,"title":1509},[12,3430,3431],{},"Why a single query tool beats one tool per filter.",[345,3433,3434],{"href":290,"icon":347,"title":348},[12,3435,1517],{},[361,3437,3438],{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}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 pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sqxcx, html code.shiki .sqxcx{--shiki-default:#E36209}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":30,"searchDepth":129,"depth":129,"links":3440},[3441,3442,3443],{"id":704,"depth":112,"text":705},{"id":3237,"depth":112,"text":3238},{"id":339,"depth":112,"text":340},"Wrap your Trawley scraper as a LangChain tool for an agent.","link",{},"\u002Fdocs\u002Fdevelopers\u002Flangchain",{"title":2934,"description":3444},"docs\u002Fdevelopers\u002Flangchain","y6wA1jXJxyscA4hTrdEWcbztHiho_cMhwZW9dBqniIQ",{"id":3452,"title":3453,"badge":7,"body":3454,"description":4087,"extension":373,"group":356,"icon":4088,"lastUpdated":7,"meta":4089,"navigation":377,"order":190,"path":4090,"popular":379,"publishedAt":7,"seo":4091,"sidebarTitle":7,"stem":4092,"tree":382,"__hash__":4093},"docs\u002Fdocs\u002Fdevelopers\u002Fopenai-function-calling.md","OpenAI function calling",{"type":9,"value":3455,"toc":4082},[3456,3465,3479,3483,3742,3746,4052,4065,4067,4079],[12,3457,3458,3459,3461,3462,3464],{},"This guide defines a ",[28,3460,678],{}," function that the OpenAI models can call,\nbacked by Trawley's ",[255,3463,516],{"href":290}," endpoint.",[21,3466,3468],{"className":685,"code":3467,"language":687,"meta":30,"style":30},"npm install openai\n",[28,3469,3470],{"__ignoreMap":30},[102,3471,3472,3474,3476],{"class":104,"line":105},[102,3473,695],{"class":694},[102,3475,698],{"class":562},[102,3477,3478],{"class":562}," openai\n",[16,3480,3482],{"id":3481},"define-the-function","Define the function",[21,3484,3486],{"className":711,"code":3485,"language":713,"meta":30,"style":30},"const tools = [\n  {\n    type: 'function',\n    function: {\n      name: 'search_listings',\n      description:\n        'Search live property listings from acmehomes.co.uk. Accepts a natural ' +\n        'language query; constraints like price, bedrooms, or date are understood.',\n      parameters: {\n        type: 'object',\n        properties: {\n          query: {\n            type: 'string',\n            description: 'What to find, e.g. \"3 bed houses under £500k with a garden\"',\n          },\n        },\n        required: ['query'],\n      },\n    },\n  },\n] as const\n\nconst TRAWLEY_SCRAPER_ID = 'scr_8f2a1c9e'\n\nasync function runSearch(query: string) {\n  const params = new URLSearchParams({ search: query, take: '10' })\n  const res = await fetch(\n    `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F${TRAWLEY_SCRAPER_ID}\u002Fhybrid?${params}`,\n  )\n  const { data } = await res.json()\n  return data\n}\n",[28,3487,3488,3499,3503,3512,3517,3526,3531,3538,3545,3550,3558,3563,3568,3577,3586,3591,3596,3605,3609,3613,3617,3626,3630,3640,3644,3662,3680,3694,3708,3712,3732,3738],{"__ignoreMap":30},[102,3489,3490,3492,3495,3497],{"class":104,"line":105},[102,3491,721],{"class":720},[102,3493,3494],{"class":115}," tools",[102,3496,727],{"class":720},[102,3498,1100],{"class":108},[102,3500,3501],{"class":104,"line":112},[102,3502,3156],{"class":108},[102,3504,3505,3507,3510],{"class":104,"line":129},[102,3506,781],{"class":108},[102,3508,3509],{"class":562},"'function'",[102,3511,741],{"class":108},[102,3513,3514],{"class":104,"line":190},[102,3515,3516],{"class":108},"    function: {\n",[102,3518,3519,3522,3524],{"class":104,"line":204},[102,3520,3521],{"class":108},"      name: ",[102,3523,738],{"class":562},[102,3525,741],{"class":108},[102,3527,3528],{"class":104,"line":764},[102,3529,3530],{"class":108},"      description:\n",[102,3532,3533,3536],{"class":104,"line":772},[102,3534,3535],{"class":562},"        'Search live property listings from acmehomes.co.uk. Accepts a natural '",[102,3537,754],{"class":720},[102,3539,3540,3543],{"class":104,"line":778},[102,3541,3542],{"class":562},"        'language query; constraints like price, bedrooms, or date are understood.'",[102,3544,741],{"class":108},[102,3546,3547],{"class":104,"line":789},[102,3548,3549],{"class":108},"      parameters: {\n",[102,3551,3552,3554,3556],{"class":104,"line":795},[102,3553,804],{"class":108},[102,3555,784],{"class":562},[102,3557,741],{"class":108},[102,3559,3560],{"class":104,"line":801},[102,3561,3562],{"class":108},"        properties: {\n",[102,3564,3565],{"class":104,"line":812},[102,3566,3567],{"class":108},"          query: {\n",[102,3569,3570,3573,3575],{"class":104,"line":823},[102,3571,3572],{"class":108},"            type: ",[102,3574,807],{"class":562},[102,3576,741],{"class":108},[102,3578,3579,3582,3584],{"class":104,"line":829},[102,3580,3581],{"class":108},"            description: ",[102,3583,818],{"class":562},[102,3585,741],{"class":108},[102,3587,3588],{"class":104,"line":835},[102,3589,3590],{"class":108},"          },\n",[102,3592,3593],{"class":104,"line":847},[102,3594,3595],{"class":108},"        },\n",[102,3597,3598,3601,3603],{"class":104,"line":853},[102,3599,3600],{"class":108},"        required: [",[102,3602,841],{"class":562},[102,3604,844],{"class":108},[102,3606,3607],{"class":104,"line":865},[102,3608,826],{"class":108},[102,3610,3611],{"class":104,"line":871},[102,3612,832],{"class":108},[102,3614,3615],{"class":104,"line":884},[102,3616,850],{"class":108},[102,3618,3619,3622,3624],{"class":104,"line":889},[102,3620,3621],{"class":108},"] ",[102,3623,859],{"class":720},[102,3625,862],{"class":720},[102,3627,3628],{"class":104,"line":917},[102,3629,868],{"emptyLinePlaceholder":377},[102,3631,3632,3634,3636,3638],{"class":104,"line":943},[102,3633,721],{"class":720},[102,3635,876],{"class":115},[102,3637,727],{"class":720},[102,3639,881],{"class":562},[102,3641,3642],{"class":104,"line":962},[102,3643,868],{"emptyLinePlaceholder":377},[102,3645,3646,3648,3650,3652,3654,3656,3658,3660],{"class":104,"line":982},[102,3647,892],{"class":720},[102,3649,895],{"class":720},[102,3651,898],{"class":694},[102,3653,901],{"class":108},[102,3655,905],{"class":904},[102,3657,908],{"class":720},[102,3659,911],{"class":115},[102,3661,914],{"class":108},[102,3663,3664,3666,3668,3670,3672,3674,3676,3678],{"class":104,"line":988},[102,3665,920],{"class":720},[102,3667,923],{"class":115},[102,3669,727],{"class":720},[102,3671,928],{"class":720},[102,3673,931],{"class":694},[102,3675,934],{"class":108},[102,3677,937],{"class":562},[102,3679,940],{"class":108},[102,3681,3682,3684,3686,3688,3690,3692],{"class":104,"line":1014},[102,3683,920],{"class":720},[102,3685,948],{"class":115},[102,3687,727],{"class":720},[102,3689,953],{"class":720},[102,3691,956],{"class":694},[102,3693,959],{"class":108},[102,3695,3696,3698,3700,3702,3704,3706],{"class":104,"line":1023},[102,3697,965],{"class":562},[102,3699,968],{"class":115},[102,3701,971],{"class":562},[102,3703,974],{"class":108},[102,3705,977],{"class":562},[102,3707,741],{"class":108},[102,3709,3710],{"class":104,"line":1378},[102,3711,985],{"class":108},[102,3713,3714,3716,3718,3720,3722,3724,3726,3728,3730],{"class":104,"line":1387},[102,3715,920],{"class":720},[102,3717,993],{"class":108},[102,3719,84],{"class":115},[102,3721,998],{"class":108},[102,3723,1001],{"class":720},[102,3725,953],{"class":720},[102,3727,1006],{"class":108},[102,3729,98],{"class":694},[102,3731,1011],{"class":108},[102,3733,3734,3736],{"class":104,"line":1397},[102,3735,1017],{"class":720},[102,3737,1020],{"class":108},[102,3739,3740],{"class":104,"line":1403},[102,3741,207],{"class":108},[16,3743,3745],{"id":3744},"run-the-call-loop","Run the call loop",[21,3747,3749],{"className":711,"code":3748,"language":713,"meta":30,"style":30},"import OpenAI from 'openai'\n\nconst client = new OpenAI()\n\nconst messages: OpenAI.ChatCompletionMessageParam[] = [\n  { role: 'user', content: 'Find a 3 bed house near Kendal with a garden under £500k.' },\n]\n\nwhile (true) {\n  const completion = await client.chat.completions.create({\n    model: 'gpt-4.1',\n    messages,\n    tools,\n  })\n\n  const message = completion.choices[0].message\n  messages.push(message)\n\n  if (!message.tool_calls?.length) {\n    console.log(message.content)\n    break\n  }\n\n  for (const call of message.tool_calls) {\n    const { query } = JSON.parse(call.function.arguments)\n    const results = await runSearch(query)\n    messages.push({\n      role: 'tool',\n      tool_call_id: call.id,\n      content: JSON.stringify(results),\n    })\n  }\n}\n",[28,3750,3751,3763,3767,3782,3786,3807,3819,3823,3827,3837,3855,3863,3867,3872,3876,3880,3897,3906,3910,3926,3935,3939,3943,3947,3965,3987,4002,4011,4021,4026,4039,4044,4048],{"__ignoreMap":30},[102,3752,3753,3755,3758,3760],{"class":104,"line":105},[102,3754,1042],{"class":720},[102,3756,3757],{"class":108}," OpenAI ",[102,3759,1048],{"class":720},[102,3761,3762],{"class":562}," 'openai'\n",[102,3764,3765],{"class":104,"line":112},[102,3766,868],{"emptyLinePlaceholder":377},[102,3768,3769,3771,3773,3775,3777,3780],{"class":104,"line":129},[102,3770,721],{"class":720},[102,3772,1062],{"class":115},[102,3774,727],{"class":720},[102,3776,928],{"class":720},[102,3778,3779],{"class":694}," OpenAI",[102,3781,1011],{"class":108},[102,3783,3784],{"class":104,"line":190},[102,3785,868],{"emptyLinePlaceholder":377},[102,3787,3788,3790,3792,3794,3796,3798,3801,3803,3805],{"class":104,"line":204},[102,3789,721],{"class":720},[102,3791,1082],{"class":115},[102,3793,908],{"class":720},[102,3795,3779],{"class":694},[102,3797,1089],{"class":108},[102,3799,3800],{"class":694},"ChatCompletionMessageParam",[102,3802,1095],{"class":108},[102,3804,1001],{"class":720},[102,3806,1100],{"class":108},[102,3808,3809,3811,3813,3815,3817],{"class":104,"line":764},[102,3810,1105],{"class":108},[102,3812,1108],{"class":562},[102,3814,1111],{"class":108},[102,3816,1114],{"class":562},[102,3818,187],{"class":108},[102,3820,3821],{"class":104,"line":772},[102,3822,1121],{"class":108},[102,3824,3825],{"class":104,"line":778},[102,3826,868],{"emptyLinePlaceholder":377},[102,3828,3829,3831,3833,3835],{"class":104,"line":789},[102,3830,1130],{"class":720},[102,3832,1133],{"class":108},[102,3834,1136],{"class":115},[102,3836,914],{"class":108},[102,3838,3839,3841,3844,3846,3848,3851,3853],{"class":104,"line":795},[102,3840,920],{"class":720},[102,3842,3843],{"class":115}," completion",[102,3845,727],{"class":720},[102,3847,953],{"class":720},[102,3849,3850],{"class":108}," client.chat.completions.",[102,3852,1155],{"class":694},[102,3854,1158],{"class":108},[102,3856,3857,3859,3861],{"class":104,"line":801},[102,3858,1163],{"class":108},[102,3860,3303],{"class":562},[102,3862,741],{"class":108},[102,3864,3865],{"class":104,"line":812},[102,3866,1188],{"class":108},[102,3868,3869],{"class":104,"line":823},[102,3870,3871],{"class":108},"    tools,\n",[102,3873,3874],{"class":104,"line":829},[102,3875,1193],{"class":108},[102,3877,3878],{"class":104,"line":835},[102,3879,868],{"emptyLinePlaceholder":377},[102,3881,3882,3884,3887,3889,3892,3894],{"class":104,"line":847},[102,3883,920],{"class":720},[102,3885,3886],{"class":115}," message",[102,3888,727],{"class":720},[102,3890,3891],{"class":108}," completion.choices[",[102,3893,144],{"class":115},[102,3895,3896],{"class":108},"].message\n",[102,3898,3899,3901,3903],{"class":104,"line":853},[102,3900,1202],{"class":108},[102,3902,1205],{"class":694},[102,3904,3905],{"class":108},"(message)\n",[102,3907,3908],{"class":104,"line":865},[102,3909,868],{"emptyLinePlaceholder":377},[102,3911,3912,3914,3916,3918,3921,3924],{"class":104,"line":871},[102,3913,1262],{"class":720},[102,3915,1133],{"class":108},[102,3917,2005],{"class":720},[102,3919,3920],{"class":108},"message.tool_calls?.",[102,3922,3923],{"class":115},"length",[102,3925,914],{"class":108},[102,3927,3928,3930,3932],{"class":104,"line":884},[102,3929,1322],{"class":108},[102,3931,1325],{"class":694},[102,3933,3934],{"class":108},"(message.content)\n",[102,3936,3937],{"class":104,"line":889},[102,3938,1333],{"class":720},[102,3940,3941],{"class":104,"line":917},[102,3942,1338],{"class":108},[102,3944,3945],{"class":104,"line":943},[102,3946,868],{"emptyLinePlaceholder":377},[102,3948,3949,3952,3954,3956,3959,3962],{"class":104,"line":962},[102,3950,3951],{"class":720},"  for",[102,3953,1133],{"class":108},[102,3955,721],{"class":720},[102,3957,3958],{"class":115}," call",[102,3960,3961],{"class":720}," of",[102,3963,3964],{"class":108}," message.tool_calls) {\n",[102,3966,3967,3969,3971,3973,3975,3977,3979,3981,3984],{"class":104,"line":982},[102,3968,1289],{"class":720},[102,3970,993],{"class":108},[102,3972,905],{"class":115},[102,3974,998],{"class":108},[102,3976,1001],{"class":720},[102,3978,3140],{"class":115},[102,3980,1089],{"class":108},[102,3982,3983],{"class":694},"parse",[102,3985,3986],{"class":108},"(call.function.arguments)\n",[102,3988,3989,3991,3993,3995,3997,3999],{"class":104,"line":988},[102,3990,1289],{"class":720},[102,3992,1349],{"class":115},[102,3994,727],{"class":720},[102,3996,953],{"class":720},[102,3998,898],{"class":694},[102,4000,4001],{"class":108},"(query)\n",[102,4003,4004,4007,4009],{"class":104,"line":1014},[102,4005,4006],{"class":108},"    messages.",[102,4008,1205],{"class":694},[102,4010,1158],{"class":108},[102,4012,4013,4016,4019],{"class":104,"line":1023},[102,4014,4015],{"class":108},"      role: ",[102,4017,4018],{"class":562},"'tool'",[102,4020,741],{"class":108},[102,4022,4023],{"class":104,"line":1378},[102,4024,4025],{"class":108},"      tool_call_id: call.id,\n",[102,4027,4028,4031,4033,4035,4037],{"class":104,"line":1387},[102,4029,4030],{"class":108},"      content: ",[102,4032,1431],{"class":115},[102,4034,1089],{"class":108},[102,4036,1436],{"class":694},[102,4038,1439],{"class":108},[102,4040,4041],{"class":104,"line":1397},[102,4042,4043],{"class":108},"    })\n",[102,4045,4046],{"class":104,"line":1403},[102,4047,1338],{"class":108},[102,4049,4050],{"class":104,"line":1409},[102,4051,207],{"class":108},[213,4053,4054],{"type":1463},[12,4055,4056,4057,4060,4061,4064],{},"After running a function, push a ",[28,4058,4059],{},"role: 'tool'"," message with the matching\n",[28,4062,4063],{},"tool_call_id",". The model reads the result and continues until it can answer in\nplain text.",[16,4066,340],{"id":339},[342,4068,4069,4074],{"cols":112},[345,4070,4071],{"href":354,"icon":355,"title":1509},[12,4072,4073],{},"One tool, natural language in, structured records out.",[345,4075,4076],{"href":290,"icon":347,"title":348},[12,4077,4078],{},"Parameters and response shape.",[361,4080,4081],{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}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 pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sqxcx, html code.shiki .sqxcx{--shiki-default:#E36209}",{"title":30,"searchDepth":129,"depth":129,"links":4083},[4084,4085,4086],{"id":3481,"depth":112,"text":3482},{"id":3744,"depth":112,"text":3745},{"id":339,"depth":112,"text":340},"Expose your Trawley scraper as a function the OpenAI models can call.","puzzle",{},"\u002Fdocs\u002Fdevelopers\u002Fopenai-function-calling",{"title":3453,"description":4087},"docs\u002Fdevelopers\u002Fopenai-function-calling","z2IvlQXUQt4HcXX2ERkL0hr7beRe0KgSaOwS6uJm6xY",{"id":4095,"title":4096,"badge":7,"body":4097,"description":4433,"extension":373,"group":374,"icon":4434,"lastUpdated":7,"meta":4435,"navigation":377,"order":105,"path":4436,"popular":377,"publishedAt":7,"seo":4437,"sidebarTitle":7,"stem":4438,"tree":382,"__hash__":4439},"docs\u002Fdocs\u002Fdevelopers\u002Fquickstart.md","Quickstart",{"type":9,"value":4098,"toc":4429},[4099,4102,4105,4115,4119,4268,4271,4394,4396,4399,4407,4409,4426],[12,4100,4101],{},"Trawley turns any website into a natural language search API. You build a\nscraper once in the dashboard, and Trawley keeps it indexed so your code can\nask questions like \"3 bed houses under £500k with parking\" and get structured\nJSON back.",[12,4103,4104],{},"This quickstart gets you from a finished scraper to your first API response.",[213,4106,4107],{"type":461},[12,4108,4109,4110,4114],{},"You need a scraper that has run at least once. If you have not built one yet,\nstart with the ",[255,4111,4113],{"href":4112},"\u002Fdocs\u002Fusers\u002Fthe-setup-wizard","no-code setup wizard",", then come\nback here.",[16,4116,4118],{"id":4117},"steps","Steps",[4117,4120,4121,4138],{},[4122,4123,4125,4132],"step",{"title":4124},"Grab your scraper ID",[12,4126,4127,4128,4131],{},"Open your scraper in the dashboard at ",[28,4129,4130],{},"app.trawley.ai",". The ID is the last\nsegment of the URL:",[21,4133,4136],{"className":4134,"code":4135,"language":26},[24],"https:\u002F\u002Fapp.trawley.ai\u002Fscrapers\u002Fscr_8f2a1c9e\n                                 ^^^^^^^^^^^^\n",[28,4137,4135],{"__ignoreMap":30},[4122,4139,4141,4150],{"title":4140},"Call the search endpoint",[12,4142,4143,4144,4146,4147,4149],{},"The recommended endpoint is ",[62,4145,516],{},". Pass a natural language query in\nthe ",[28,4148,347],{}," parameter:",[1600,4151,4152,4164,4233],{},[21,4153,4155],{"className":685,"code":4154,"filename":1605,"language":687,"meta":30,"style":30},"curl \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?search=3+bed+houses+with+a+garden\"\n",[28,4156,4157],{"__ignoreMap":30},[102,4158,4159,4161],{"class":104,"line":105},[102,4160,1612],{"class":694},[102,4162,4163],{"class":562}," \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?search=3+bed+houses+with+a+garden\"\n",[21,4165,4167],{"className":1626,"code":4166,"filename":1628,"language":1629,"meta":30,"style":30},"const res = await fetch(\n  'https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?' +\n    new URLSearchParams({ search: '3 bed houses with a garden' }),\n)\nconst { data, pagination } = await res.json()\n",[28,4168,4169,4183,4190,4205,4209],{"__ignoreMap":30},[102,4170,4171,4173,4175,4177,4179,4181],{"class":104,"line":105},[102,4172,721],{"class":720},[102,4174,948],{"class":115},[102,4176,727],{"class":720},[102,4178,953],{"class":720},[102,4180,956],{"class":694},[102,4182,959],{"class":108},[102,4184,4185,4188],{"class":104,"line":112},[102,4186,4187],{"class":562},"  'https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid?'",[102,4189,754],{"class":720},[102,4191,4192,4195,4197,4200,4202],{"class":104,"line":129},[102,4193,4194],{"class":720},"    new",[102,4196,931],{"class":694},[102,4198,4199],{"class":108},"({ search: ",[102,4201,2478],{"class":562},[102,4203,4204],{"class":108}," }),\n",[102,4206,4207],{"class":104,"line":190},[102,4208,1257],{"class":108},[102,4210,4211,4213,4215,4217,4219,4221,4223,4225,4227,4229,4231],{"class":104,"line":204},[102,4212,721],{"class":720},[102,4214,993],{"class":108},[102,4216,84],{"class":115},[102,4218,147],{"class":108},[102,4220,88],{"class":115},[102,4222,998],{"class":108},[102,4224,1001],{"class":720},[102,4226,953],{"class":720},[102,4228,1006],{"class":108},[102,4230,98],{"class":694},[102,4232,1011],{"class":108},[21,4234,4236],{"className":2564,"code":4235,"filename":2566,"language":2567,"meta":30,"style":30},"import requests\n\nres = requests.get(\n    \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fhybrid\",\n    params={\"search\": \"3 bed houses with a garden\"},\n)\ndata = res.json()[\"data\"]\n",[28,4237,4238,4242,4246,4250,4254,4259,4263],{"__ignoreMap":30},[102,4239,4240],{"class":104,"line":105},[102,4241,2574],{},[102,4243,4244],{"class":104,"line":112},[102,4245,868],{"emptyLinePlaceholder":377},[102,4247,4248],{"class":104,"line":129},[102,4249,2583],{},[102,4251,4252],{"class":104,"line":190},[102,4253,2588],{},[102,4255,4256],{"class":104,"line":204},[102,4257,4258],{},"    params={\"search\": \"3 bed houses with a garden\"},\n",[102,4260,4261],{"class":104,"line":764},[102,4262,1257],{},[102,4264,4265],{"class":104,"line":772},[102,4266,4267],{},"data = res.json()[\"data\"]\n",[12,4269,4270],{},"::",[4122,4272,4274,4277],{"title":4273},"Read the results",[12,4275,4276],{},"You get back structured records matching the query, plus pagination metadata:",[21,4278,4280],{"className":96,"code":4279,"language":98,"meta":30,"style":30},"{\n  \"data\": [\n    { \"title\": \"3 bed semi in Kendal\", \"price\": 425000, \"bedrooms\": 3 }\n  ],\n  \"pagination\": { \"total\": 18, \"page\": 1, \"take\": 10, \"totalPages\": 2, \"hasMore\": true },\n  \"meta\": { \"filter\": \"bedrooms = 3\" }\n}\n",[28,4281,4282,4286,4292,4324,4328,4374,4390],{"__ignoreMap":30},[102,4283,4284],{"class":104,"line":105},[102,4285,109],{"class":108},[102,4287,4288,4290],{"class":104,"line":112},[102,4289,116],{"class":115},[102,4291,549],{"class":108},[102,4293,4294,4296,4299,4301,4304,4306,4309,4311,4313,4315,4318,4320,4322],{"class":104,"line":129},[102,4295,554],{"class":108},[102,4297,4298],{"class":115},"\"title\"",[102,4300,141],{"class":108},[102,4302,4303],{"class":562},"\"3 bed semi in Kendal\"",[102,4305,147],{"class":108},[102,4307,4308],{"class":115},"\"price\"",[102,4310,141],{"class":108},[102,4312,2648],{"class":115},[102,4314,147],{"class":108},[102,4316,4317],{"class":115},"\"bedrooms\"",[102,4319,141],{"class":108},[102,4321,2660],{"class":115},[102,4323,201],{"class":108},[102,4325,4326],{"class":104,"line":190},[102,4327,2694],{"class":108},[102,4329,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,4352,4354,4356,4358,4360,4362,4364,4366,4368,4370,4372],{"class":104,"line":204},[102,4331,132],{"class":115},[102,4333,135],{"class":108},[102,4335,138],{"class":115},[102,4337,141],{"class":108},[102,4339,2711],{"class":115},[102,4341,147],{"class":108},[102,4343,150],{"class":115},[102,4345,141],{"class":108},[102,4347,155],{"class":115},[102,4349,147],{"class":108},[102,4351,160],{"class":115},[102,4353,141],{"class":108},[102,4355,165],{"class":115},[102,4357,147],{"class":108},[102,4359,170],{"class":115},[102,4361,141],{"class":108},[102,4363,2745],{"class":115},[102,4365,147],{"class":108},[102,4367,179],{"class":115},[102,4369,141],{"class":108},[102,4371,1136],{"class":115},[102,4373,187],{"class":108},[102,4375,4376,4378,4380,4383,4385,4388],{"class":104,"line":764},[102,4377,193],{"class":115},[102,4379,135],{"class":108},[102,4381,4382],{"class":115},"\"filter\"",[102,4384,141],{"class":108},[102,4386,4387],{"class":562},"\"bedrooms = 3\"",[102,4389,201],{"class":108},[102,4391,4392],{"class":104,"line":772},[102,4393,207],{"class":108},[12,4395,4270],{},[12,4397,4398],{},"That is the whole loop: one GET request, structured results, no HTML parsing.",[213,4400,4401],{"type":215},[12,4402,4403,4404,4406],{},"The API is currently reached by scraper ID and does not yet require an API key.\nAuthentication is coming. See the ",[255,4405,6],{"href":378},"\nfor what that means for you today.",[16,4408,340],{"id":339},[342,4410,4411,4420],{"cols":112},[345,4412,4414],{"href":290,"icon":347,"title":4413},"Hybrid search reference",[12,4415,4416,4417,4419],{},"Every query parameter, the full response shape, and how ",[28,4418,2848],{}," works.",[345,4421,4423],{"href":354,"icon":640,"title":4422},"Wire it into an agent",[12,4424,4425],{},"Expose Trawley as a tool your LLM can call. Start with the Vercel AI SDK.",[361,4427,4428],{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}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 pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}",{"title":30,"searchDepth":129,"depth":129,"links":4430},[4431,4432],{"id":4117,"depth":112,"text":4118},{"id":339,"depth":112,"text":340},"Query a Trawley scraper from your code in five minutes.","rocket",{},"\u002Fdocs\u002Fdevelopers\u002Fquickstart",{"title":4096,"description":4433},"docs\u002Fdevelopers\u002Fquickstart","8AQ_IRBTZIqWAFFdCzF7mF6Pxjm88-qtYvzn4LZvGvg",{"id":4441,"title":4442,"badge":7,"body":4443,"description":4567,"extension":373,"group":490,"icon":480,"lastUpdated":7,"meta":4568,"navigation":377,"order":105,"path":479,"popular":379,"publishedAt":7,"seo":4569,"sidebarTitle":7,"stem":4570,"tree":382,"__hash__":4571},"docs\u002Fdocs\u002Fdevelopers\u002Frate-limits-and-quotas.md","Rate limits & quotas",{"type":9,"value":4444,"toc":4561},[4445,4448,4452,4479,4482,4486,4492,4526,4534,4538,4544,4546,4559],[12,4446,4447],{},"Trawley meters API usage against your team's plan. Each plan includes a monthly\nallowance of API calls, counted per billing period.",[16,4449,4451],{"id":4450},"how-metering-works","How metering works",[56,4453,4454,4464,4473],{},[59,4455,4456,4459,4460,4463],{},[62,4457,4458],{},"Search calls"," (the ",[255,4461,4462],{"href":290},"hybrid endpoint",") count\nagainst your monthly search allowance.",[59,4465,4466,4459,4469,4472],{},[62,4467,4468],{},"Results calls",[255,4470,4471],{"href":2299},"results endpoint",")\ncount against a separate monthly results allowance.",[59,4474,4475,4478],{},[62,4476,4477],{},"Exports"," are counted as a fractional call, so bulk downloads do not burn a\nfull request each.",[12,4480,4481],{},"Allowances reset at the start of each billing period.",[16,4483,4485],{"id":4484},"hitting-a-limit","Hitting a limit",[12,4487,4488,4489,4491],{},"When you exceed an allowance, the API responds with ",[28,4490,252],{}," and\na message naming the limit:",[21,4493,4495],{"className":96,"code":4494,"language":98,"meta":30,"style":30},"{\n  \"statusCode\": 429,\n  \"statusMessage\": \"Monthly search API limit reached (1000). Upgrade your plan for more calls.\"\n}\n",[28,4496,4497,4501,4512,4522],{"__ignoreMap":30},[102,4498,4499],{"class":104,"line":105},[102,4500,109],{"class":108},[102,4502,4503,4506,4508,4510],{"class":104,"line":112},[102,4504,4505],{"class":115},"  \"statusCode\"",[102,4507,141],{"class":108},[102,4509,1851],{"class":115},[102,4511,741],{"class":108},[102,4513,4514,4517,4519],{"class":104,"line":129},[102,4515,4516],{"class":115},"  \"statusMessage\"",[102,4518,141],{"class":108},[102,4520,4521],{"class":562},"\"Monthly search API limit reached (1000). Upgrade your plan for more calls.\"\n",[102,4523,4524],{"class":104,"line":190},[102,4525,207],{"class":108},[213,4527,4528],{"type":622},[12,4529,4530,4531,4533],{},"Handle ",[28,4532,1851],{}," by backing off until the next billing period or upgrading the plan.\nIn an agent, catch it and return a graceful \"search is temporarily unavailable\"\nmessage rather than failing the whole turn.",[16,4535,4537],{"id":4536},"raising-your-limits","Raising your limits",[12,4539,4540,4541,4543],{},"Limits scale with your plan. See ",[255,4542,258],{"href":257},"\nfor current allowances and how to upgrade. You can view current usage against\nyour allowance in the dashboard.",[16,4545,340],{"id":339},[342,4547,4548,4553],{"cols":112},[345,4549,4550],{"href":1734,"icon":1735,"title":1736},[12,4551,4552],{},"The full set of status codes the API returns.",[345,4554,4556],{"href":257,"icon":480,"title":4555},"Plans & billing",[12,4557,4558],{},"Allowances per plan and how to upgrade.",[361,4560,653],{},{"title":30,"searchDepth":129,"depth":129,"links":4562},[4563,4564,4565,4566],{"id":4450,"depth":112,"text":4451},{"id":4484,"depth":112,"text":4485},{"id":4536,"depth":112,"text":4537},{"id":339,"depth":112,"text":340},"How API usage is metered against your plan, and what a 429 means.",{},{"title":4442,"description":4567},"docs\u002Fdevelopers\u002Frate-limits-and-quotas","-BOt4ErXGn4DervHz0aYwngnj6ycsZkN8EqmFK3ehDk",{"id":4573,"title":2300,"badge":7,"body":4574,"description":4890,"extension":373,"group":662,"icon":1727,"lastUpdated":7,"meta":4891,"navigation":377,"order":112,"path":2299,"popular":379,"publishedAt":7,"seo":4892,"sidebarTitle":7,"stem":4893,"tree":382,"__hash__":4894},"docs\u002Fdocs\u002Fdevelopers\u002Fresults-endpoint.md",{"type":9,"value":4575,"toc":4882},[4576,4582,4584,4590,4592,4636,4733,4735,4835,4838,4853,4855,4864,4866,4880],[12,4577,4578,4579,4581],{},"The results endpoint returns a scraper's records directly, with pagination and\nsorting but no natural language interpretation. Reach for it when you want raw\ndata rather than relevance ranking. For \"answer this question\" style access, use\n",[255,4580,516],{"href":290}," instead.",[16,4583,521],{"id":520},[21,4585,4588],{"className":4586,"code":4587,"language":26},[24],"GET https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F{scraperId}\u002Fresults\n",[28,4589,4587],{"__ignoreMap":30},[529,4591,1553],{"id":1552},[265,4593,4594,4606],{},[268,4595,4596],{},[271,4597,4598,4600,4602,4604],{},[274,4599,1562],{},[274,4601,1565],{},[274,4603,2150],{},[274,4605,1568],{},[281,4607,4608,4622],{},[271,4609,4610,4614,4616,4620],{},[286,4611,4612],{},[28,4613,2404],{},[286,4615,2407],{},[286,4617,4618],{},[28,4619,155],{},[286,4621,2414],{},[271,4623,4624,4628,4630,4634],{},[286,4625,4626],{},[28,4627,2421],{},[286,4629,2407],{},[286,4631,4632],{},[28,4633,165],{},[286,4635,2430],{},[1600,4637,4638,4650],{},[21,4639,4641],{"className":685,"code":4640,"filename":1605,"language":687,"meta":30,"style":30},"curl \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fresults?page=1&take=50\"\n",[28,4642,4643],{"__ignoreMap":30},[102,4644,4645,4647],{"class":104,"line":105},[102,4646,1612],{"class":694},[102,4648,4649],{"class":562}," \"https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fresults?page=1&take=50\"\n",[21,4651,4653],{"className":1626,"code":4652,"filename":1628,"language":1629,"meta":30,"style":30},"const params = new URLSearchParams({ page: '1', take: '50' })\nconst res = await fetch(\n  `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fresults?${params}`,\n)\nconst { data, pagination } = await res.json()\n",[28,4654,4655,4680,4694,4705,4709],{"__ignoreMap":30},[102,4656,4657,4659,4661,4663,4665,4667,4670,4672,4675,4678],{"class":104,"line":105},[102,4658,721],{"class":720},[102,4660,923],{"class":115},[102,4662,727],{"class":720},[102,4664,928],{"class":720},[102,4666,931],{"class":694},[102,4668,4669],{"class":108},"({ page: ",[102,4671,2488],{"class":562},[102,4673,4674],{"class":108},", take: ",[102,4676,4677],{"class":562},"'50'",[102,4679,940],{"class":108},[102,4681,4682,4684,4686,4688,4690,4692],{"class":104,"line":112},[102,4683,721],{"class":720},[102,4685,948],{"class":115},[102,4687,727],{"class":720},[102,4689,953],{"class":720},[102,4691,956],{"class":694},[102,4693,959],{"class":108},[102,4695,4696,4699,4701,4703],{"class":104,"line":129},[102,4697,4698],{"class":562},"  `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002Fscr_8f2a1c9e\u002Fresults?${",[102,4700,974],{"class":108},[102,4702,977],{"class":562},[102,4704,741],{"class":108},[102,4706,4707],{"class":104,"line":190},[102,4708,1257],{"class":108},[102,4710,4711,4713,4715,4717,4719,4721,4723,4725,4727,4729,4731],{"class":104,"line":204},[102,4712,721],{"class":720},[102,4714,993],{"class":108},[102,4716,84],{"class":115},[102,4718,147],{"class":108},[102,4720,88],{"class":115},[102,4722,998],{"class":108},[102,4724,1001],{"class":720},[102,4726,953],{"class":720},[102,4728,1006],{"class":108},[102,4730,98],{"class":694},[102,4732,1011],{"class":108},[16,4734,2606],{"id":2605},[21,4736,4738],{"className":96,"code":4737,"language":98,"meta":30,"style":30},"{\n  \"data\": [\n    { \"title\": \"3 bed semi-detached house\", \"price\": 425000, \"bedrooms\": 3 }\n  ],\n  \"pagination\": { \"total\": 240, \"page\": 1, \"take\": 50, \"totalPages\": 5, \"hasMore\": true }\n}\n",[28,4739,4740,4744,4750,4778,4782,4831],{"__ignoreMap":30},[102,4741,4742],{"class":104,"line":105},[102,4743,109],{"class":108},[102,4745,4746,4748],{"class":104,"line":112},[102,4747,116],{"class":115},[102,4749,549],{"class":108},[102,4751,4752,4754,4756,4758,4760,4762,4764,4766,4768,4770,4772,4774,4776],{"class":104,"line":129},[102,4753,554],{"class":108},[102,4755,4298],{"class":115},[102,4757,141],{"class":108},[102,4759,2636],{"class":562},[102,4761,147],{"class":108},[102,4763,4308],{"class":115},[102,4765,141],{"class":108},[102,4767,2648],{"class":115},[102,4769,147],{"class":108},[102,4771,4317],{"class":115},[102,4773,141],{"class":108},[102,4775,2660],{"class":115},[102,4777,201],{"class":108},[102,4779,4780],{"class":104,"line":190},[102,4781,2694],{"class":108},[102,4783,4784,4786,4788,4790,4792,4795,4797,4799,4801,4803,4805,4807,4809,4812,4814,4816,4818,4821,4823,4825,4827,4829],{"class":104,"line":204},[102,4785,132],{"class":115},[102,4787,135],{"class":108},[102,4789,138],{"class":115},[102,4791,141],{"class":108},[102,4793,4794],{"class":115},"240",[102,4796,147],{"class":108},[102,4798,150],{"class":115},[102,4800,141],{"class":108},[102,4802,155],{"class":115},[102,4804,147],{"class":108},[102,4806,160],{"class":115},[102,4808,141],{"class":108},[102,4810,4811],{"class":115},"50",[102,4813,147],{"class":108},[102,4815,170],{"class":115},[102,4817,141],{"class":108},[102,4819,4820],{"class":115},"5",[102,4822,147],{"class":108},[102,4824,179],{"class":115},[102,4826,141],{"class":108},[102,4828,1136],{"class":115},[102,4830,201],{"class":108},[102,4832,4833],{"class":104,"line":764},[102,4834,207],{"class":108},[12,4836,4837],{},"Records contain the fields you defined on the scraper, drawn from its most\nrecent completed run.",[213,4839,4840],{"type":622},[12,4841,4842,4843,4845,4846,4848,4849,4852],{},"To pull every record, page until ",[28,4844,2836],{}," is ",[28,4847,184],{},". For a\none-shot download of all results, the ",[255,4850,4851],{"href":2323},"export endpoint","\ndoes this for you and streams a file.",[16,4854,246],{"id":245},[12,4856,4857,4858,4860,4861,1089],{},"The results endpoint is metered separately from search. Each plan has a monthly\nresults call allowance; exceeding it returns ",[28,4859,1851],{},". See\n",[255,4862,4863],{"href":479},"rate limits and quotas",[16,4865,340],{"id":339},[342,4867,4868,4874],{"cols":112},[345,4869,4871],{"href":290,"icon":347,"title":4870},"Natural language search",[12,4872,4873],{},"Let users ask in plain language instead of paging raw data.",[345,4875,4877],{"href":2323,"icon":2321,"title":4876},"Bulk export",[12,4878,4879],{},"Download every record as JSON or CSV in one call.",[361,4881,4428],{},{"title":30,"searchDepth":129,"depth":129,"links":4883},[4884,4887,4888,4889],{"id":520,"depth":112,"text":521,"children":4885},[4886],{"id":1552,"depth":129,"text":1553},{"id":2605,"depth":112,"text":2606},{"id":245,"depth":112,"text":246},{"id":339,"depth":112,"text":340},"Fetch a scraper's results with pagination, no query interpretation.",{},{"title":2300,"description":4890},"docs\u002Fdevelopers\u002Fresults-endpoint","bR-8ioZN2Mui_rsPdIB0yiKOfZjJdgqVvz1t113iiTw",{"id":4896,"title":4897,"badge":7,"body":4898,"description":5013,"extension":373,"group":356,"icon":355,"lastUpdated":7,"meta":5014,"navigation":377,"order":105,"path":354,"popular":379,"publishedAt":7,"seo":5015,"sidebarTitle":7,"stem":5016,"tree":382,"__hash__":5017},"docs\u002Fdocs\u002Fdevelopers\u002Ftools-overview.md","Tools overview",{"type":9,"value":4899,"toc":5007},[4900,4903,4906,4909,4942,4945,4949,4972,4976,4979,4985,4989],[12,4901,4902],{},"Trawley is built to be an agent's data source. An LLM is good at understanding a\nuser's intent but has no live, structured view of a website. Trawley gives it\none: a single function the model can call with a natural language query and get\nback clean, structured records.",[16,4904,1509],{"id":4905},"the-pattern",[12,4907,4908],{},"Every integration in this section is the same shape. You expose one tool to your\nmodel:",[4117,4910,4911,4924,4933],{},[4122,4912,4914],{"title":4913},"Define a tool",[12,4915,4916,4917,4920,4921,4923],{},"Give it a name like ",[28,4918,4919],{},"searchListings",", a description of what data it returns, and\na single ",[28,4922,905],{}," input. The model decides when to call it.",[4122,4925,4927],{"title":4926},"Call hybrid search",[12,4928,4929,4930,4932],{},"Inside the tool, make a GET request to the\n",[255,4931,4462],{"href":290}," with the model's query.",[4122,4934,4936],{"title":4935},"Return the results",[12,4937,4938,4939,4941],{},"Hand the ",[28,4940,84],{}," array back to the model. It uses the records to answer the user,\ncite specifics, or take the next step.",[12,4943,4944],{},"That is the entire integration. The model handles phrasing and reasoning;\nTrawley handles retrieval.",[16,4946,4948],{"id":4947},"why-this-works-well","Why this works well",[56,4950,4951,4960,4966],{},[59,4952,4953,4956,4957,4959],{},[62,4954,4955],{},"One tool, not ten."," The model does not need a tool per filter. Hybrid search\ninterprets constraints from plain language, so a single ",[28,4958,905],{}," input covers\n\"cheap flats\", \"3 beds near Kendal\", and \"listings added this week\".",[59,4961,4962,4965],{},[62,4963,4964],{},"Structured output."," The model receives typed fields, not a wall of HTML, so\nit can reason about prices and dates reliably.",[59,4967,4968,4971],{},[62,4969,4970],{},"Fresh data."," Results come from your scheduled scrapes, so the agent answers\nfrom current data without you maintaining a pipeline.",[16,4973,4975],{"id":4974},"a-reusable-description","A reusable description",[12,4977,4978],{},"Tool descriptions matter more than tool code. A good one tells the model exactly\nwhat is behind the tool so it calls it at the right moments:",[21,4980,4983],{"className":4981,"code":4982,"language":26,"meta":30},[24],"Search live {your domain} data from {source site}. Accepts a natural language\nquery describing what to find (constraints like price, bedrooms, or date are\nunderstood). Returns structured records. Use this whenever the user asks about\nspecific listings, availability, or current data.\n",[28,4984,4982],{"__ignoreMap":30},[16,4986,4988],{"id":4987},"pick-your-framework","Pick your framework",[342,4990,4991,5001],{"cols":112},[345,4992,4994],{"icon":640,"title":4993,"href":631},"Vercel AI SDK",[12,4995,4996,4997,5000],{},"TypeScript. Wrap hybrid search as a ",[28,4998,4999],{},"tool()"," and let the model call it.",[345,5002,5004],{"icon":4088,"title":5003},"More frameworks",[12,5005,5006],{},"Claude Agent SDK, OpenAI function calling, and LangChain follow the same\npattern. Guides are being added here.",{"title":30,"searchDepth":129,"depth":129,"links":5008},[5009,5010,5011,5012],{"id":4905,"depth":112,"text":1509},{"id":4947,"depth":112,"text":4948},{"id":4974,"depth":112,"text":4975},{"id":4987,"depth":112,"text":4988},"Why Trawley makes a good tool for AI agents, and the pattern every integration guide follows.",{},{"title":4897,"description":5013},"docs\u002Fdevelopers\u002Ftools-overview","9CPcggqE8G4wK8gdrMYpQS9vzgOsHs7kaAHZ--ounNY",{"id":5019,"title":4993,"badge":7,"body":5020,"description":5736,"extension":373,"group":356,"icon":640,"lastUpdated":7,"meta":5737,"navigation":377,"order":112,"path":631,"popular":377,"publishedAt":7,"seo":5738,"sidebarTitle":7,"stem":5739,"tree":382,"__hash__":5740},"docs\u002Fdocs\u002Fdevelopers\u002Fvercel-ai-sdk.md",{"type":9,"value":5021,"toc":5727},[5022,5037,5041,5053,5072,5074,5083,5352,5369,5373,5384,5505,5509,5550,5554,5564,5671,5673,5706,5708,5724],[12,5023,5024,5025,5030,5031,5033,5034,5036],{},"This guide wires a Trawley scraper into an agent built with the\n",[255,5026,4993],{"href":5027,"rel":5028},"https:\u002F\u002Fsdk.vercel.ai",[5029],"nofollow",". The model gets one tool, ",[28,5032,4919],{},",\nthat calls Trawley's ",[255,5035,516],{"href":290}," endpoint.\nWhen a user asks a question about your data, the model calls the tool, reads the\nstructured results, and answers.",[16,5038,5040],{"id":5039},"prerequisites","Prerequisites",[56,5042,5043,5046],{},[59,5044,5045],{},"A Trawley scraper that has completed at least one run, and its scraper ID.",[59,5047,5048,5049,5052],{},"An AI SDK project with a model provider configured (this example uses\n",[28,5050,5051],{},"@ai-sdk\u002Fopenai",", but any provider works).",[21,5054,5056],{"className":685,"code":5055,"language":687,"meta":30,"style":30},"npm install ai @ai-sdk\u002Fopenai zod\n",[28,5057,5058],{"__ignoreMap":30},[102,5059,5060,5062,5064,5067,5070],{"class":104,"line":105},[102,5061,695],{"class":694},[102,5063,698],{"class":562},[102,5065,5066],{"class":562}," ai",[102,5068,5069],{"class":562}," @ai-sdk\u002Fopenai",[102,5071,2965],{"class":562},[16,5073,705],{"id":704},[12,5075,5076,5077,5079,5080,1089],{},"The tool has one input, ",[28,5078,905],{},", and calls the hybrid endpoint inside ",[28,5081,5082],{},"execute",[21,5084,5086],{"className":711,"code":5085,"language":713,"meta":30,"style":30},"import { tool } from 'ai'\nimport { z } from 'zod'\n\nconst TRAWLEY_SCRAPER_ID = 'scr_8f2a1c9e'\n\nexport const searchListings = tool({\n  description:\n    'Search live property listings from acmehomes.co.uk. Accepts a natural ' +\n    'language query; constraints like price, bedrooms, or date are understood. ' +\n    'Returns structured records. Use whenever the user asks about specific ' +\n    'listings, availability, or current data.',\n  inputSchema: z.object({\n    query: z\n      .string()\n      .describe('A natural language description of what to find, e.g. \"3 bed houses under £500k with a garden\"'),\n  }),\n  execute: async ({ query }) => {\n    const params = new URLSearchParams({ search: query, take: '10' })\n    const res = await fetch(\n      `https:\u002F\u002Fapi.trawley.ai\u002Fv1\u002Fscrapers\u002F${TRAWLEY_SCRAPER_ID}\u002Fhybrid?${params}`,\n    )\n    if (!res.ok) {\n      return { error: `Search failed with status ${res.status}` }\n    }\n    const { data } = await res.json()\n    return { results: data }\n  },\n})\n",[28,5087,5088,5099,5109,5113,5123,5127,5141,5145,5151,5157,5164,5171,5180,5185,5194,5207,5212,5231,5249,5263,5277,5281,5292,5313,5317,5337,5344,5348],{"__ignoreMap":30},[102,5089,5090,5092,5094,5096],{"class":104,"line":105},[102,5091,1042],{"class":720},[102,5093,2986],{"class":108},[102,5095,1048],{"class":720},[102,5097,5098],{"class":562}," 'ai'\n",[102,5100,5101,5103,5105,5107],{"class":104,"line":112},[102,5102,1042],{"class":720},[102,5104,2998],{"class":108},[102,5106,1048],{"class":720},[102,5108,3003],{"class":562},[102,5110,5111],{"class":104,"line":129},[102,5112,868],{"emptyLinePlaceholder":377},[102,5114,5115,5117,5119,5121],{"class":104,"line":190},[102,5116,721],{"class":720},[102,5118,876],{"class":115},[102,5120,727],{"class":720},[102,5122,881],{"class":562},[102,5124,5125],{"class":104,"line":204},[102,5126,868],{"emptyLinePlaceholder":377},[102,5128,5129,5131,5133,5135,5137,5139],{"class":104,"line":764},[102,5130,3026],{"class":720},[102,5132,3029],{"class":720},[102,5134,724],{"class":115},[102,5136,727],{"class":720},[102,5138,3036],{"class":694},[102,5140,1158],{"class":108},[102,5142,5143],{"class":104,"line":772},[102,5144,746],{"class":108},[102,5146,5147,5149],{"class":104,"line":778},[102,5148,751],{"class":562},[102,5150,754],{"class":720},[102,5152,5153,5155],{"class":104,"line":789},[102,5154,759],{"class":562},[102,5156,754],{"class":720},[102,5158,5159,5162],{"class":104,"line":795},[102,5160,5161],{"class":562},"    'Returns structured records. Use whenever the user asks about specific '",[102,5163,754],{"class":720},[102,5165,5166,5169],{"class":104,"line":801},[102,5167,5168],{"class":562},"    'listings, availability, or current data.'",[102,5170,741],{"class":108},[102,5172,5173,5176,5178],{"class":104,"line":812},[102,5174,5175],{"class":108},"  inputSchema: z.",[102,5177,3199],{"class":694},[102,5179,1158],{"class":108},[102,5181,5182],{"class":104,"line":823},[102,5183,5184],{"class":108},"    query: z\n",[102,5186,5187,5190,5192],{"class":104,"line":829},[102,5188,5189],{"class":108},"      .",[102,5191,1580],{"class":694},[102,5193,1011],{"class":108},[102,5195,5196,5198,5200,5202,5205],{"class":104,"line":835},[102,5197,5189],{"class":108},[102,5199,3214],{"class":694},[102,5201,901],{"class":108},[102,5203,5204],{"class":562},"'A natural language description of what to find, e.g. \"3 bed houses under £500k with a garden\"'",[102,5206,3221],{"class":108},[102,5208,5209],{"class":104,"line":847},[102,5210,5211],{"class":108},"  }),\n",[102,5213,5214,5217,5219,5221,5223,5225,5227,5229],{"class":104,"line":853},[102,5215,5216],{"class":694},"  execute",[102,5218,141],{"class":108},[102,5220,892],{"class":720},[102,5222,3046],{"class":108},[102,5224,905],{"class":904},[102,5226,3051],{"class":108},[102,5228,1245],{"class":720},[102,5230,730],{"class":108},[102,5232,5233,5235,5237,5239,5241,5243,5245,5247],{"class":104,"line":865},[102,5234,1289],{"class":720},[102,5236,923],{"class":115},[102,5238,727],{"class":720},[102,5240,928],{"class":720},[102,5242,931],{"class":694},[102,5244,934],{"class":108},[102,5246,937],{"class":562},[102,5248,940],{"class":108},[102,5250,5251,5253,5255,5257,5259,5261],{"class":104,"line":871},[102,5252,1289],{"class":720},[102,5254,948],{"class":115},[102,5256,727],{"class":720},[102,5258,953],{"class":720},[102,5260,956],{"class":694},[102,5262,959],{"class":108},[102,5264,5265,5267,5269,5271,5273,5275],{"class":104,"line":884},[102,5266,3092],{"class":562},[102,5268,968],{"class":115},[102,5270,971],{"class":562},[102,5272,974],{"class":108},[102,5274,977],{"class":562},[102,5276,741],{"class":108},[102,5278,5279],{"class":104,"line":889},[102,5280,3107],{"class":108},[102,5282,5283,5286,5288,5290],{"class":104,"line":917},[102,5284,5285],{"class":720},"    if",[102,5287,1133],{"class":108},[102,5289,2005],{"class":720},[102,5291,2008],{"class":108},[102,5293,5294,5297,5300,5303,5305,5307,5309,5311],{"class":104,"line":943},[102,5295,5296],{"class":720},"      return",[102,5298,5299],{"class":108}," { error: ",[102,5301,5302],{"class":562},"`Search failed with status ${",[102,5304,2046],{"class":108},[102,5306,1089],{"class":562},[102,5308,2051],{"class":108},[102,5310,977],{"class":562},[102,5312,201],{"class":108},[102,5314,5315],{"class":104,"line":962},[102,5316,2689],{"class":108},[102,5318,5319,5321,5323,5325,5327,5329,5331,5333,5335],{"class":104,"line":982},[102,5320,1289],{"class":720},[102,5322,993],{"class":108},[102,5324,84],{"class":115},[102,5326,998],{"class":108},[102,5328,1001],{"class":720},[102,5330,953],{"class":720},[102,5332,1006],{"class":108},[102,5334,98],{"class":694},[102,5336,1011],{"class":108},[102,5338,5339,5341],{"class":104,"line":988},[102,5340,3137],{"class":720},[102,5342,5343],{"class":108}," { results: data }\n",[102,5345,5346],{"class":104,"line":1014},[102,5347,850],{"class":108},[102,5349,5350],{"class":104,"line":1023},[102,5351,2504],{"class":108},[213,5353,5354],{"type":1463},[12,5355,5356,5357,5360,5361,5364,5365,5368],{},"The AI SDK uses ",[28,5358,5359],{},"inputSchema"," (not ",[28,5362,5363],{},"parameters",") to describe a tool's input.\nThe ",[28,5366,5367],{},"describe()"," text on each field is sent to the model, so spend a sentence\nmaking it clear.",[16,5370,5372],{"id":5371},"give-it-to-the-model","Give it to the model",[12,5374,5375,5376,5379,5380,5383],{},"Pass the tool to ",[28,5377,5378],{},"generateText"," and let the model run. ",[28,5381,5382],{},"stopWhen: stepCountIs(5)","\nlets the model call the tool and then continue to a final answer in the same\ncall.",[21,5385,5387],{"className":711,"code":5386,"language":713,"meta":30,"style":30},"import { generateText, stepCountIs } from 'ai'\nimport { openai } from '@ai-sdk\u002Fopenai'\nimport { searchListings } from '.\u002Fsearch-listings'\n\nconst { text } = await generateText({\n  model: openai('gpt-4.1'),\n  tools: { searchListings },\n  stopWhen: stepCountIs(5),\n  prompt: 'Find me a 3 bedroom house near Kendal with a garden under £500k.',\n})\n\nconsole.log(text)\n",[28,5388,5389,5400,5412,5422,5426,5445,5459,5464,5478,5488,5492,5496],{"__ignoreMap":30},[102,5390,5391,5393,5396,5398],{"class":104,"line":105},[102,5392,1042],{"class":720},[102,5394,5395],{"class":108}," { generateText, stepCountIs } ",[102,5397,1048],{"class":720},[102,5399,5098],{"class":562},[102,5401,5402,5404,5407,5409],{"class":104,"line":112},[102,5403,1042],{"class":720},[102,5405,5406],{"class":108}," { openai } ",[102,5408,1048],{"class":720},[102,5410,5411],{"class":562}," '@ai-sdk\u002Fopenai'\n",[102,5413,5414,5416,5418,5420],{"class":104,"line":129},[102,5415,1042],{"class":720},[102,5417,3274],{"class":108},[102,5419,1048],{"class":720},[102,5421,3279],{"class":562},[102,5423,5424],{"class":104,"line":190},[102,5425,868],{"emptyLinePlaceholder":377},[102,5427,5428,5430,5432,5434,5436,5438,5440,5443],{"class":104,"line":204},[102,5429,721],{"class":720},[102,5431,993],{"class":108},[102,5433,26],{"class":115},[102,5435,998],{"class":108},[102,5437,1001],{"class":720},[102,5439,953],{"class":720},[102,5441,5442],{"class":694}," generateText",[102,5444,1158],{"class":108},[102,5446,5447,5450,5453,5455,5457],{"class":104,"line":764},[102,5448,5449],{"class":108},"  model: ",[102,5451,5452],{"class":694},"openai",[102,5454,901],{"class":108},[102,5456,3303],{"class":562},[102,5458,3221],{"class":108},[102,5460,5461],{"class":104,"line":772},[102,5462,5463],{"class":108},"  tools: { searchListings },\n",[102,5465,5466,5469,5472,5474,5476],{"class":104,"line":778},[102,5467,5468],{"class":108},"  stopWhen: ",[102,5470,5471],{"class":694},"stepCountIs",[102,5473,901],{"class":108},[102,5475,4820],{"class":115},[102,5477,3221],{"class":108},[102,5479,5480,5483,5486],{"class":104,"line":789},[102,5481,5482],{"class":108},"  prompt: ",[102,5484,5485],{"class":562},"'Find me a 3 bedroom house near Kendal with a garden under £500k.'",[102,5487,741],{"class":108},[102,5489,5490],{"class":104,"line":795},[102,5491,2504],{"class":108},[102,5493,5494],{"class":104,"line":801},[102,5495,868],{"emptyLinePlaceholder":377},[102,5497,5498,5500,5502],{"class":104,"line":812},[102,5499,3395],{"class":108},[102,5501,1325],{"class":694},[102,5503,5504],{"class":108},"(text)\n",[16,5506,5508],{"id":5507},"what-happens","What happens",[4117,5510,5511,5520,5536,5544],{},[4122,5512,5514],{"title":5513},"The model reads the request",[12,5515,5516,5517,5519],{},"It sees the ",[28,5518,4919],{}," tool and decides the question needs live data.",[4122,5521,5523],{"title":5522},"It calls the tool",[12,5524,5525,5526,5528,5529,5532,5533,5535],{},"The model generates a ",[28,5527,905],{}," argument such as ",[28,5530,5531],{},"\"3 bedroom house Kendal garden under 500000\"",". Your ",[28,5534,5082],{}," function calls hybrid search.",[4122,5537,5539],{"title":5538},"Trawley returns structured records",[12,5540,431,5541,5543],{},[28,5542,84],{}," array comes back as the tool result and is handed to the model.",[4122,5545,5547],{"title":5546},"The model answers",[12,5548,5549],{},"It uses the records to write a grounded reply, citing real prices and locations.",[16,5551,5553],{"id":5552},"streaming-to-a-ui","Streaming to a UI",[12,5555,5556,5557,5559,5560,5563],{},"For a chat interface, swap ",[28,5558,5378],{}," for ",[28,5561,5562],{},"streamText"," and return a UI\nmessage stream. The tool definition is identical.",[21,5565,5567],{"className":711,"code":5566,"language":713,"meta":30,"style":30},"import { streamText, stepCountIs } from 'ai'\nimport { openai } from '@ai-sdk\u002Fopenai'\nimport { searchListings } from '.\u002Fsearch-listings'\n\nconst result = streamText({\n  model: openai('gpt-4.1'),\n  tools: { searchListings },\n  stopWhen: stepCountIs(5),\n  messages,\n})\n\nreturn result.toUIMessageStreamResponse()\n",[28,5568,5569,5580,5590,5600,5604,5617,5629,5633,5645,5650,5654,5658],{"__ignoreMap":30},[102,5570,5571,5573,5576,5578],{"class":104,"line":105},[102,5572,1042],{"class":720},[102,5574,5575],{"class":108}," { streamText, stepCountIs } ",[102,5577,1048],{"class":720},[102,5579,5098],{"class":562},[102,5581,5582,5584,5586,5588],{"class":104,"line":112},[102,5583,1042],{"class":720},[102,5585,5406],{"class":108},[102,5587,1048],{"class":720},[102,5589,5411],{"class":562},[102,5591,5592,5594,5596,5598],{"class":104,"line":129},[102,5593,1042],{"class":720},[102,5595,3274],{"class":108},[102,5597,1048],{"class":720},[102,5599,3279],{"class":562},[102,5601,5602],{"class":104,"line":190},[102,5603,868],{"emptyLinePlaceholder":377},[102,5605,5606,5608,5610,5612,5615],{"class":104,"line":204},[102,5607,721],{"class":720},[102,5609,3348],{"class":115},[102,5611,727],{"class":720},[102,5613,5614],{"class":694}," streamText",[102,5616,1158],{"class":108},[102,5618,5619,5621,5623,5625,5627],{"class":104,"line":764},[102,5620,5449],{"class":108},[102,5622,5452],{"class":694},[102,5624,901],{"class":108},[102,5626,3303],{"class":562},[102,5628,3221],{"class":108},[102,5630,5631],{"class":104,"line":772},[102,5632,5463],{"class":108},[102,5634,5635,5637,5639,5641,5643],{"class":104,"line":778},[102,5636,5468],{"class":108},[102,5638,5471],{"class":694},[102,5640,901],{"class":108},[102,5642,4820],{"class":115},[102,5644,3221],{"class":108},[102,5646,5647],{"class":104,"line":789},[102,5648,5649],{"class":108},"  messages,\n",[102,5651,5652],{"class":104,"line":795},[102,5653,2504],{"class":108},[102,5655,5656],{"class":104,"line":801},[102,5657,868],{"emptyLinePlaceholder":377},[102,5659,5660,5663,5666,5669],{"class":104,"line":812},[102,5661,5662],{"class":720},"return",[102,5664,5665],{"class":108}," result.",[102,5667,5668],{"class":694},"toUIMessageStreamResponse",[102,5670,1011],{"class":108},[16,5672,1482],{"id":1481},[56,5674,5675,5681,5693],{},[59,5676,5677,5680],{},[62,5678,5679],{},"Return less, not more."," Trim each record to the fields the model needs.\nSmaller tool results mean cheaper, faster, more focused answers.",[59,5682,5683,5686,5687,5689,5690,1089],{},[62,5684,5685],{},"Let hybrid search do the filtering."," Do not add a tool input per filter.\nOne ",[28,5688,905],{}," string covers price, bedrooms, dates, and location because the\nendpoint interprets them. See ",[255,5691,5692],{"href":354},"tools overview",[59,5694,5695,5698,5699,5701,5702,5705],{},[62,5696,5697],{},"Handle the empty case."," If a scraper has no completed run, ",[28,5700,84],{}," is empty.\nReturning ",[28,5703,5704],{},"{ results: [] }"," lets the model tell the user nothing was found.",[16,5707,340],{"id":339},[342,5709,5710,5718],{"cols":112},[345,5711,5712],{"href":290,"icon":347,"title":4413},[12,5713,5714,5715,5717],{},"Every parameter, the response shape, and ",[28,5716,2848],{}," debugging.",[345,5719,5721],{"href":354,"icon":355,"title":5720},"The integration pattern",[12,5722,5723],{},"The shape every framework guide follows.",[361,5725,5726],{},"html pre.shiki code .s7eDp, html code.shiki .s7eDp{--shiki-default:#6F42C1}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}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 pre.shiki code .sD7c4, html code.shiki .sD7c4{--shiki-default:#D73A49}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html pre.shiki code .sqxcx, html code.shiki .sqxcx{--shiki-default:#E36209}",{"title":30,"searchDepth":129,"depth":129,"links":5728},[5729,5730,5731,5732,5733,5734,5735],{"id":5039,"depth":112,"text":5040},{"id":704,"depth":112,"text":705},{"id":5371,"depth":112,"text":5372},{"id":5507,"depth":112,"text":5508},{"id":5552,"depth":112,"text":5553},{"id":1481,"depth":112,"text":1482},{"id":339,"depth":112,"text":340},"Expose a Trawley scraper as a tool your LLM can call, using the Vercel AI SDK.",{},{"title":4993,"description":5736},"docs\u002Fdevelopers\u002Fvercel-ai-sdk","jEjb9QCaEkcRhQ4jb4F_Y-PsZe-ma4IYQ4oyQ7xsKb0",{"id":2328,"title":348,"badge":7,"body":5742,"description":2927,"extension":373,"group":662,"icon":347,"lastUpdated":7,"meta":6246,"navigation":377,"order":105,"path":290,"popular":377,"publishedAt":7,"seo":6247,"sidebarTitle":7,"stem":2930,"tree":382,"__hash__":2931},{"type":9,"value":5743,"toc":6237},[5744,5746,5760,5762,5764,5769,5771,5827,5979,5981,6135,6191,6195,6199,6207,6209,6211,6221,6223,6235],[12,5745,2333],{},[2335,5747,5748,5752,5756],{},[59,5749,5750,2342],{},[62,5751,2341],{},[59,5753,5754,2348],{},[62,5755,2347],{},[59,5757,5758,2354],{},[62,5759,2353],{},[12,5761,2357],{},[16,5763,521],{"id":520},[21,5765,5767],{"className":5766,"code":2363,"language":26},[24],[28,5768,2363],{"__ignoreMap":30},[529,5770,1553],{"id":1552},[265,5772,5773,5785],{},[268,5774,5775],{},[271,5776,5777,5779,5781,5783],{},[274,5778,1562],{},[274,5780,1565],{},[274,5782,2150],{},[274,5784,1568],{},[281,5786,5787,5799,5813],{},[271,5788,5789,5793,5795,5797],{},[286,5790,5791],{},[28,5792,347],{},[286,5794,1580],{},[286,5796,2394],{},[286,5798,2397],{},[271,5800,5801,5805,5807,5811],{},[286,5802,5803],{},[28,5804,2404],{},[286,5806,2407],{},[286,5808,5809],{},[28,5810,155],{},[286,5812,2414],{},[271,5814,5815,5819,5821,5825],{},[286,5816,5817],{},[28,5818,2421],{},[286,5820,2407],{},[286,5822,5823],{},[28,5824,165],{},[286,5826,2430],{},[1600,5828,5829,5845,5947],{},[21,5830,5831],{"className":685,"code":2435,"filename":1605,"language":687,"meta":30,"style":30},[28,5832,5833,5841],{"__ignoreMap":30},[102,5834,5835,5837,5839],{"class":104,"line":105},[102,5836,1612],{"class":694},[102,5838,2444],{"class":562},[102,5840,1618],{"class":115},[102,5842,5843],{"class":104,"line":112},[102,5844,2451],{"class":562},[21,5846,5847],{"className":1626,"code":2454,"filename":1628,"language":1629,"meta":30,"style":30},[28,5848,5849,5863,5871,5879,5887,5891,5905,5915,5919],{"__ignoreMap":30},[102,5850,5851,5853,5855,5857,5859,5861],{"class":104,"line":105},[102,5852,721],{"class":720},[102,5854,923],{"class":115},[102,5856,727],{"class":720},[102,5858,928],{"class":720},[102,5860,931],{"class":694},[102,5862,1158],{"class":108},[102,5864,5865,5867,5869],{"class":104,"line":112},[102,5866,2475],{"class":108},[102,5868,2478],{"class":562},[102,5870,741],{"class":108},[102,5872,5873,5875,5877],{"class":104,"line":129},[102,5874,2485],{"class":108},[102,5876,2488],{"class":562},[102,5878,741],{"class":108},[102,5880,5881,5883,5885],{"class":104,"line":190},[102,5882,2495],{"class":108},[102,5884,937],{"class":562},[102,5886,741],{"class":108},[102,5888,5889],{"class":104,"line":204},[102,5890,2504],{"class":108},[102,5892,5893,5895,5897,5899,5901,5903],{"class":104,"line":764},[102,5894,721],{"class":720},[102,5896,948],{"class":115},[102,5898,727],{"class":720},[102,5900,953],{"class":720},[102,5902,956],{"class":694},[102,5904,959],{"class":108},[102,5906,5907,5909,5911,5913],{"class":104,"line":772},[102,5908,2523],{"class":562},[102,5910,974],{"class":108},[102,5912,977],{"class":562},[102,5914,741],{"class":108},[102,5916,5917],{"class":104,"line":778},[102,5918,1257],{"class":108},[102,5920,5921,5923,5925,5927,5929,5931,5933,5935,5937,5939,5941,5943,5945],{"class":104,"line":789},[102,5922,721],{"class":720},[102,5924,993],{"class":108},[102,5926,84],{"class":115},[102,5928,147],{"class":108},[102,5930,88],{"class":115},[102,5932,147],{"class":108},[102,5934,92],{"class":115},[102,5936,998],{"class":108},[102,5938,1001],{"class":720},[102,5940,953],{"class":720},[102,5942,1006],{"class":108},[102,5944,98],{"class":694},[102,5946,1011],{"class":108},[21,5948,5949],{"className":2564,"code":2565,"filename":2566,"language":2567,"meta":30,"style":30},[28,5950,5951,5955,5959,5963,5967,5971,5975],{"__ignoreMap":30},[102,5952,5953],{"class":104,"line":105},[102,5954,2574],{},[102,5956,5957],{"class":104,"line":112},[102,5958,868],{"emptyLinePlaceholder":377},[102,5960,5961],{"class":104,"line":129},[102,5962,2583],{},[102,5964,5965],{"class":104,"line":190},[102,5966,2588],{},[102,5968,5969],{"class":104,"line":204},[102,5970,2593],{},[102,5972,5973],{"class":104,"line":764},[102,5974,1257],{},[102,5976,5977],{"class":104,"line":772},[102,5978,2602],{},[16,5980,2606],{"id":2605},[21,5982,5983],{"className":96,"code":2609,"language":98,"meta":30,"style":30},[28,5984,5985,5989,5995,5999,6009,6019,6029,6039,6047,6051,6055,6061,6071,6081,6091,6101,6109,6113,6119,6127,6131],{"__ignoreMap":30},[102,5986,5987],{"class":104,"line":105},[102,5988,109],{"class":108},[102,5990,5991,5993],{"class":104,"line":112},[102,5992,116],{"class":115},[102,5994,549],{"class":108},[102,5996,5997],{"class":104,"line":129},[102,5998,2626],{"class":108},[102,6000,6001,6003,6005,6007],{"class":104,"line":190},[102,6002,2631],{"class":115},[102,6004,141],{"class":108},[102,6006,2636],{"class":562},[102,6008,741],{"class":108},[102,6010,6011,6013,6015,6017],{"class":104,"line":204},[102,6012,2643],{"class":115},[102,6014,141],{"class":108},[102,6016,2648],{"class":115},[102,6018,741],{"class":108},[102,6020,6021,6023,6025,6027],{"class":104,"line":764},[102,6022,2655],{"class":115},[102,6024,141],{"class":108},[102,6026,2660],{"class":115},[102,6028,741],{"class":108},[102,6030,6031,6033,6035,6037],{"class":104,"line":772},[102,6032,2667],{"class":115},[102,6034,141],{"class":108},[102,6036,2672],{"class":562},[102,6038,741],{"class":108},[102,6040,6041,6043,6045],{"class":104,"line":778},[102,6042,2679],{"class":115},[102,6044,141],{"class":108},[102,6046,2684],{"class":562},[102,6048,6049],{"class":104,"line":789},[102,6050,2689],{"class":108},[102,6052,6053],{"class":104,"line":795},[102,6054,2694],{"class":108},[102,6056,6057,6059],{"class":104,"line":801},[102,6058,132],{"class":115},[102,6060,2701],{"class":108},[102,6062,6063,6065,6067,6069],{"class":104,"line":812},[102,6064,2706],{"class":115},[102,6066,141],{"class":108},[102,6068,2711],{"class":115},[102,6070,741],{"class":108},[102,6072,6073,6075,6077,6079],{"class":104,"line":823},[102,6074,2718],{"class":115},[102,6076,141],{"class":108},[102,6078,155],{"class":115},[102,6080,741],{"class":108},[102,6082,6083,6085,6087,6089],{"class":104,"line":829},[102,6084,2729],{"class":115},[102,6086,141],{"class":108},[102,6088,165],{"class":115},[102,6090,741],{"class":108},[102,6092,6093,6095,6097,6099],{"class":104,"line":835},[102,6094,2740],{"class":115},[102,6096,141],{"class":108},[102,6098,2745],{"class":115},[102,6100,741],{"class":108},[102,6102,6103,6105,6107],{"class":104,"line":847},[102,6104,2752],{"class":115},[102,6106,141],{"class":108},[102,6108,2757],{"class":115},[102,6110,6111],{"class":104,"line":853},[102,6112,850],{"class":108},[102,6114,6115,6117],{"class":104,"line":865},[102,6116,193],{"class":115},[102,6118,2701],{"class":108},[102,6120,6121,6123,6125],{"class":104,"line":871},[102,6122,2772],{"class":115},[102,6124,141],{"class":108},[102,6126,2777],{"class":562},[102,6128,6129],{"class":104,"line":884},[102,6130,1338],{"class":108},[102,6132,6133],{"class":104,"line":889},[102,6134,207],{"class":108},[265,6136,6137,6145],{},[268,6138,6139],{},[271,6140,6141,6143],{},[274,6142,2794],{},[274,6144,1568],{},[281,6146,6147,6155,6163,6173,6183],{},[271,6148,6149,6153],{},[286,6150,6151],{},[28,6152,84],{},[286,6154,2807],{},[271,6156,6157,6161],{},[286,6158,6159],{},[28,6160,2814],{},[286,6162,2817],{},[271,6164,6165,6169],{},[286,6166,6167],{},[28,6168,2824],{},[286,6170,2827,6171,1089],{},[28,6172,2421],{},[271,6174,6175,6179],{},[286,6176,6177],{},[28,6178,2836],{},[286,6180,6181,2841],{},[28,6182,1136],{},[271,6184,6185,6189],{},[286,6186,6187],{},[28,6188,2848],{},[286,6190,2851],{},[16,6192,2855,6193],{"id":2854},[28,6194,2848],{},[12,6196,6197,2862],{},[28,6198,2848],{},[213,6200,6201],{"type":622},[12,6202,2867,6203,2870,6205,2874],{},[28,6204,2848],{},[28,6206,2873],{},[12,6208,2877],{},[16,6210,2881],{"id":2880},[56,6212,6213,6215,6217],{},[59,6214,2886],{},[59,6216,2889],{},[59,6218,2892,6219,2895],{},[28,6220,84],{},[16,6222,340],{"id":339},[342,6224,6225,6231],{"cols":112},[345,6226,6227],{"href":378,"icon":480,"title":2902},[12,6228,2905,6229,2908],{},[28,6230,1851],{},[345,6232,6233],{"href":631,"icon":640,"title":2911},[12,6234,2914],{},[361,6236,1749],{},{"title":30,"searchDepth":129,"depth":129,"links":6238},[6239,6242,6243,6244,6245],{"id":520,"depth":112,"text":521,"children":6240},[6241],{"id":1552,"depth":129,"text":1553},{"id":2605,"depth":112,"text":2606},{"id":2854,"depth":112,"text":2924},{"id":2880,"depth":112,"text":2881},{"id":339,"depth":112,"text":340},{},{"title":348,"description":2927},{"id":6249,"extension":6250,"groups":6251,"meta":6274,"stem":6287,"__hash__":6288},"navigation\u002Fdocs\u002Fdevelopers\u002F_nav.yml","yml",[6252,6256,6263,6270],{"group":374,"items":6253},[6254,6255],"quickstart","api-overview",{"group":662,"items":6257},[6258,6259,6260,6261,6262],"hybrid-search","results-endpoint","export-endpoint","diff-endpoint","chat-endpoint",{"group":356,"items":6264},[6265,6266,6267,6268,6269],"tools-overview","vercel-ai-sdk","claude-agent-sdk","openai-function-calling","langchain",{"group":490,"items":6271},[6272,6273,210],"rate-limits-and-quotas","error-responses",{"path":6275,"body":6276,"title":6286},"\u002Fdocs\u002Fdevelopers\u002F_nav",{"groups":6277},[6278,6280,6282,6284],{"group":374,"items":6279},[6254,6255],{"group":662,"items":6281},[6258,6259,6260,6261,6262],{"group":356,"items":6283},[6265,6266,6267,6268,6269],{"group":490,"items":6285},[6272,6273,210],"Nav","docs\u002Fdevelopers\u002F_nav","mUwW0ftpZKIZHDHLKS7aLskt03iraqqCnyVStgPph0Y",1780914808885]