[{"data":1,"prerenderedAt":1637},["ShallowReactive",2],{"docs-cloud/connect-any-app":3},{"id":4,"title":5,"body":6,"description":1627,"extension":1628,"meta":1629,"navigation":237,"path":1630,"seo":1631,"seoDescription":1632,"seoTitle":1633,"sitemap":1634,"stem":1635,"__hash__":1636},"docs/docs/cloud/connect-any-app.md","Connect Any App",{"type":7,"value":8,"toc":1611},"minimark",[9,13,34,39,52,72,75,113,125,129,168,179,183,190,195,211,458,462,484,748,752,766,954,958,967,971,974,1213,1273,1284,1299,1303,1355,1359,1378,1440,1448,1452,1463,1562,1566,1607],[10,11,5],"h1",{"id":12},"connect-any-app",[14,15,16,17,24,25,29,30,33],"p",{},"Every CelerSearch instance runs ",[18,19,23],"a",{"href":20,"rel":21},"https://www.meilisearch.com/",[22],"nofollow","Meilisearch"," and\nspeaks its standard API, so the official SDKs and any HTTP client work as they\nare. You need two values: the ",[26,27,28],"strong",{},"endpoint URL"," and the ",[26,31,32],{},"API key",".",[35,36,38],"h2",{"id":37},"_1-get-your-connection-details","1. Get your connection details",[14,40,41,42,47,48,51],{},"In ",[18,43,46],{"href":44,"rel":45},"https://app.celersearch.com",[22],"app.celersearch.com",", open your instance. The\n",[26,49,50],{},"Connection details"," card shows:",[53,54,55,67],"ul",{},[56,57,58,61,62,66],"li",{},[26,59,60],{},"Endpoint URL",": your instance's ",[63,64,65],"code",{},"https://"," address",[56,68,69,71],{},[26,70,32],{},": click the eye icon to reveal it, or copy it directly",[14,73,74],{},"Store both as environment variables on your server:",[76,77,83],"pre",{"className":78,"code":79,"filename":80,"language":81,"meta":82,"style":82},"language-bash shiki shiki-themes github-light github-dark","CELERSEARCH_URL=https://your-endpoint-url\nCELERSEARCH_API_KEY=your-api-key\n",".env","bash","",[63,84,85,102],{"__ignoreMap":82},[86,87,90,94,98],"span",{"class":88,"line":89},"line",1,[86,91,93],{"class":92},"sVt8B","CELERSEARCH_URL",[86,95,97],{"class":96},"szBVR","=",[86,99,101],{"class":100},"sZZnC","https://your-endpoint-url\n",[86,103,105,108,110],{"class":88,"line":104},2,[86,106,107],{"class":92},"CELERSEARCH_API_KEY",[86,109,97],{"class":96},[86,111,112],{"class":100},"your-api-key\n",[114,115,117],"warning",{"title":116},"The API key has full access",[14,118,119,120,124],{},"The instance API key is the instance's master key: it can read, change and\ndelete everything. Keep it on your server, in environment variables or a\nsecrets manager, and never ship it in browser or mobile app code. If it leaks,\n",[18,121,123],{"href":122},"/contact","contact us"," and we'll rotate it.",[35,126,128],{"id":127},"_2-check-the-connection","2. Check the connection",[76,130,132],{"className":78,"code":131,"language":81,"meta":82,"style":82},"curl -H \"Authorization: Bearer $CELERSEARCH_API_KEY\" \"$CELERSEARCH_URL/health\"\n# {\"status\":\"available\"}\n",[63,133,134,162],{"__ignoreMap":82},[86,135,136,140,144,147,150,153,156,159],{"class":88,"line":89},[86,137,139],{"class":138},"sScJk","curl",[86,141,143],{"class":142},"sj4cs"," -H",[86,145,146],{"class":100}," \"Authorization: Bearer ",[86,148,149],{"class":92},"$CELERSEARCH_API_KEY",[86,151,152],{"class":100},"\"",[86,154,155],{"class":100}," \"",[86,157,158],{"class":92},"$CELERSEARCH_URL",[86,160,161],{"class":100},"/health\"\n",[86,163,164],{"class":88,"line":104},[86,165,167],{"class":166},"sJ8bj","# {\"status\":\"available\"}\n",[14,169,170,171,174,175,178],{},"Every request needs the ",[63,172,173],{},"Authorization: Bearer"," header, including ",[63,176,177],{},"/health",",\nwhich is public on a self-hosted Meilisearch.",[35,180,182],{"id":181},"_3-index-and-search","3. Index and search",[14,184,185,186,189],{},"The examples below add two documents to a ",[63,187,188],{},"movies"," index (created\nautomatically on the first write) and run a search with a typo in it.",[191,192,194],"h3",{"id":193},"javascript-typescript","JavaScript / TypeScript",[76,196,198],{"className":78,"code":197,"language":81,"meta":82,"style":82},"npm install meilisearch\n",[63,199,200],{"__ignoreMap":82},[86,201,202,205,208],{"class":88,"line":89},[86,203,204],{"class":138},"npm",[86,206,207],{"class":100}," install",[86,209,210],{"class":100}," meilisearch\n",[76,212,217],{"className":213,"code":214,"filename":215,"language":216,"meta":82,"style":82},"language-js shiki shiki-themes github-light github-dark","import { Meilisearch } from 'meilisearch'\n\nconst client = new Meilisearch({\n  host: process.env.CELERSEARCH_URL,\n  apiKey: process.env.CELERSEARCH_API_KEY,\n})\n\nconst movies = client.index('movies')\n\n// Writes are asynchronous tasks; waitTask() resolves once it's processed.\nawait movies.addDocuments([\n  { id: 1, title: 'Carol', genres: ['Romance', 'Drama'] },\n  { id: 2, title: 'Wonder Woman', genres: ['Action', 'Adventure'] },\n]).waitTask()\n\nconst { hits } = await movies.search('wondr woman')\nconsole.log(hits)\n","search.mjs","js",[63,218,219,233,239,260,271,281,287,292,317,322,328,343,373,398,410,415,446],{"__ignoreMap":82},[86,220,221,224,227,230],{"class":88,"line":89},[86,222,223],{"class":96},"import",[86,225,226],{"class":92}," { Meilisearch } ",[86,228,229],{"class":96},"from",[86,231,232],{"class":100}," 'meilisearch'\n",[86,234,235],{"class":88,"line":104},[86,236,238],{"emptyLinePlaceholder":237},true,"\n",[86,240,242,245,248,251,254,257],{"class":88,"line":241},3,[86,243,244],{"class":96},"const",[86,246,247],{"class":142}," client",[86,249,250],{"class":96}," =",[86,252,253],{"class":96}," new",[86,255,256],{"class":138}," Meilisearch",[86,258,259],{"class":92},"({\n",[86,261,263,266,268],{"class":88,"line":262},4,[86,264,265],{"class":92},"  host: process.env.",[86,267,93],{"class":142},[86,269,270],{"class":92},",\n",[86,272,274,277,279],{"class":88,"line":273},5,[86,275,276],{"class":92},"  apiKey: process.env.",[86,278,107],{"class":142},[86,280,270],{"class":92},[86,282,284],{"class":88,"line":283},6,[86,285,286],{"class":92},"})\n",[86,288,290],{"class":88,"line":289},7,[86,291,238],{"emptyLinePlaceholder":237},[86,293,295,297,300,302,305,308,311,314],{"class":88,"line":294},8,[86,296,244],{"class":96},[86,298,299],{"class":142}," movies",[86,301,250],{"class":96},[86,303,304],{"class":92}," client.",[86,306,307],{"class":138},"index",[86,309,310],{"class":92},"(",[86,312,313],{"class":100},"'movies'",[86,315,316],{"class":92},")\n",[86,318,320],{"class":88,"line":319},9,[86,321,238],{"emptyLinePlaceholder":237},[86,323,325],{"class":88,"line":324},10,[86,326,327],{"class":166},"// Writes are asynchronous tasks; waitTask() resolves once it's processed.\n",[86,329,331,334,337,340],{"class":88,"line":330},11,[86,332,333],{"class":96},"await",[86,335,336],{"class":92}," movies.",[86,338,339],{"class":138},"addDocuments",[86,341,342],{"class":92},"([\n",[86,344,346,349,352,355,358,361,364,367,370],{"class":88,"line":345},12,[86,347,348],{"class":92},"  { id: ",[86,350,351],{"class":142},"1",[86,353,354],{"class":92},", title: ",[86,356,357],{"class":100},"'Carol'",[86,359,360],{"class":92},", genres: [",[86,362,363],{"class":100},"'Romance'",[86,365,366],{"class":92},", ",[86,368,369],{"class":100},"'Drama'",[86,371,372],{"class":92},"] },\n",[86,374,376,378,381,383,386,388,391,393,396],{"class":88,"line":375},13,[86,377,348],{"class":92},[86,379,380],{"class":142},"2",[86,382,354],{"class":92},[86,384,385],{"class":100},"'Wonder Woman'",[86,387,360],{"class":92},[86,389,390],{"class":100},"'Action'",[86,392,366],{"class":92},[86,394,395],{"class":100},"'Adventure'",[86,397,372],{"class":92},[86,399,401,404,407],{"class":88,"line":400},14,[86,402,403],{"class":92},"]).",[86,405,406],{"class":138},"waitTask",[86,408,409],{"class":92},"()\n",[86,411,413],{"class":88,"line":412},15,[86,414,238],{"emptyLinePlaceholder":237},[86,416,418,420,423,426,429,431,434,436,439,441,444],{"class":88,"line":417},16,[86,419,244],{"class":96},[86,421,422],{"class":92}," { ",[86,424,425],{"class":142},"hits",[86,427,428],{"class":92}," } ",[86,430,97],{"class":96},[86,432,433],{"class":96}," await",[86,435,336],{"class":92},[86,437,438],{"class":138},"search",[86,440,310],{"class":92},[86,442,443],{"class":100},"'wondr woman'",[86,445,316],{"class":92},[86,447,449,452,455],{"class":88,"line":448},17,[86,450,451],{"class":92},"console.",[86,453,454],{"class":138},"log",[86,456,457],{"class":92},"(hits)\n",[191,459,461],{"id":460},"php","PHP",[76,463,465],{"className":78,"code":464,"language":81,"meta":82,"style":82},"composer require meilisearch/meilisearch-php guzzlehttp/guzzle http-interop/http-factory-guzzle:^1.0\n",[63,466,467],{"__ignoreMap":82},[86,468,469,472,475,478,481],{"class":88,"line":89},[86,470,471],{"class":138},"composer",[86,473,474],{"class":100}," require",[86,476,477],{"class":100}," meilisearch/meilisearch-php",[86,479,480],{"class":100}," guzzlehttp/guzzle",[86,482,483],{"class":100}," http-interop/http-factory-guzzle:^1.0\n",[76,485,489],{"className":486,"code":487,"filename":488,"language":460,"meta":82,"style":82},"language-php shiki shiki-themes github-light github-dark","\u003C?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse Meilisearch\\Client;\n\n$client = new Client(getenv('CELERSEARCH_URL'), getenv('CELERSEARCH_API_KEY'));\n$movies = $client->index('movies');\n\n$task = $movies->addDocuments([\n    ['id' => 1, 'title' => 'Carol', 'genres' => ['Romance', 'Drama']],\n    ['id' => 2, 'title' => 'Wonder Woman', 'genres' => ['Action', 'Adventure']],\n]);\n$client->waitForTask($task['taskUid']);\n\nprint_r($movies->search('wondr woman')->getHits());\n","search.php",[63,490,491,499,503,520,524,534,538,573,595,599,615,658,694,699,717,721],{"__ignoreMap":82},[86,492,493,496],{"class":88,"line":89},[86,494,495],{"class":96},"\u003C?",[86,497,498],{"class":142},"php\n",[86,500,501],{"class":88,"line":104},[86,502,238],{"emptyLinePlaceholder":237},[86,504,505,508,511,514,517],{"class":88,"line":241},[86,506,507],{"class":96},"require_once",[86,509,510],{"class":142}," __DIR__",[86,512,513],{"class":96}," .",[86,515,516],{"class":100}," '/vendor/autoload.php'",[86,518,519],{"class":92},";\n",[86,521,522],{"class":88,"line":262},[86,523,238],{"emptyLinePlaceholder":237},[86,525,526,529,532],{"class":88,"line":273},[86,527,528],{"class":96},"use",[86,530,531],{"class":142}," Meilisearch\\Client",[86,533,519],{"class":92},[86,535,536],{"class":88,"line":283},[86,537,238],{"emptyLinePlaceholder":237},[86,539,540,543,545,547,550,552,555,557,560,563,565,567,570],{"class":88,"line":289},[86,541,542],{"class":92},"$client ",[86,544,97],{"class":96},[86,546,253],{"class":96},[86,548,549],{"class":142}," Client",[86,551,310],{"class":92},[86,553,554],{"class":142},"getenv",[86,556,310],{"class":92},[86,558,559],{"class":100},"'CELERSEARCH_URL'",[86,561,562],{"class":92},"), ",[86,564,554],{"class":142},[86,566,310],{"class":92},[86,568,569],{"class":100},"'CELERSEARCH_API_KEY'",[86,571,572],{"class":92},"));\n",[86,574,575,578,580,583,586,588,590,592],{"class":88,"line":294},[86,576,577],{"class":92},"$movies ",[86,579,97],{"class":96},[86,581,582],{"class":92}," $client",[86,584,585],{"class":96},"->",[86,587,307],{"class":138},[86,589,310],{"class":92},[86,591,313],{"class":100},[86,593,594],{"class":92},");\n",[86,596,597],{"class":88,"line":319},[86,598,238],{"emptyLinePlaceholder":237},[86,600,601,604,606,609,611,613],{"class":88,"line":324},[86,602,603],{"class":92},"$task ",[86,605,97],{"class":96},[86,607,608],{"class":92}," $movies",[86,610,585],{"class":96},[86,612,339],{"class":138},[86,614,342],{"class":92},[86,616,617,620,623,626,629,631,634,636,639,641,644,646,649,651,653,655],{"class":88,"line":330},[86,618,619],{"class":92},"    [",[86,621,622],{"class":100},"'id'",[86,624,625],{"class":96}," =>",[86,627,628],{"class":142}," 1",[86,630,366],{"class":92},[86,632,633],{"class":100},"'title'",[86,635,625],{"class":96},[86,637,638],{"class":100}," 'Carol'",[86,640,366],{"class":92},[86,642,643],{"class":100},"'genres'",[86,645,625],{"class":96},[86,647,648],{"class":92}," [",[86,650,363],{"class":100},[86,652,366],{"class":92},[86,654,369],{"class":100},[86,656,657],{"class":92},"]],\n",[86,659,660,662,664,666,669,671,673,675,678,680,682,684,686,688,690,692],{"class":88,"line":345},[86,661,619],{"class":92},[86,663,622],{"class":100},[86,665,625],{"class":96},[86,667,668],{"class":142}," 2",[86,670,366],{"class":92},[86,672,633],{"class":100},[86,674,625],{"class":96},[86,676,677],{"class":100}," 'Wonder Woman'",[86,679,366],{"class":92},[86,681,643],{"class":100},[86,683,625],{"class":96},[86,685,648],{"class":92},[86,687,390],{"class":100},[86,689,366],{"class":92},[86,691,395],{"class":100},[86,693,657],{"class":92},[86,695,696],{"class":88,"line":375},[86,697,698],{"class":92},"]);\n",[86,700,701,704,706,709,712,715],{"class":88,"line":400},[86,702,703],{"class":92},"$client",[86,705,585],{"class":96},[86,707,708],{"class":138},"waitForTask",[86,710,711],{"class":92},"($task[",[86,713,714],{"class":100},"'taskUid'",[86,716,698],{"class":92},[86,718,719],{"class":88,"line":412},[86,720,238],{"emptyLinePlaceholder":237},[86,722,723,726,729,731,733,735,737,740,742,745],{"class":88,"line":417},[86,724,725],{"class":142},"print_r",[86,727,728],{"class":92},"($movies",[86,730,585],{"class":96},[86,732,438],{"class":138},[86,734,310],{"class":92},[86,736,443],{"class":100},[86,738,739],{"class":92},")",[86,741,585],{"class":96},[86,743,744],{"class":138},"getHits",[86,746,747],{"class":92},"());\n",[191,749,751],{"id":750},"python","Python",[76,753,755],{"className":78,"code":754,"language":81,"meta":82,"style":82},"pip install meilisearch\n",[63,756,757],{"__ignoreMap":82},[86,758,759,762,764],{"class":88,"line":89},[86,760,761],{"class":138},"pip",[86,763,207],{"class":100},[86,765,210],{"class":100},[76,767,771],{"className":768,"code":769,"filename":770,"language":750,"meta":82,"style":82},"language-python shiki shiki-themes github-light github-dark","import os\n\nimport meilisearch\n\nclient = meilisearch.Client(os.environ[\"CELERSEARCH_URL\"], os.environ[\"CELERSEARCH_API_KEY\"])\nmovies = client.index(\"movies\")\n\ntask = movies.add_documents([\n    {\"id\": 1, \"title\": \"Carol\", \"genres\": [\"Romance\", \"Drama\"]},\n    {\"id\": 2, \"title\": \"Wonder Woman\", \"genres\": [\"Action\", \"Adventure\"]},\n])\nclient.wait_for_task(task.task_uid)\n\nprint(movies.search(\"wondr woman\")[\"hits\"])\n","search.py",[63,772,773,780,784,790,794,816,831,835,845,887,922,926,931,935],{"__ignoreMap":82},[86,774,775,777],{"class":88,"line":89},[86,776,223],{"class":96},[86,778,779],{"class":92}," os\n",[86,781,782],{"class":88,"line":104},[86,783,238],{"emptyLinePlaceholder":237},[86,785,786,788],{"class":88,"line":241},[86,787,223],{"class":96},[86,789,210],{"class":92},[86,791,792],{"class":88,"line":262},[86,793,238],{"emptyLinePlaceholder":237},[86,795,796,799,801,804,807,810,813],{"class":88,"line":273},[86,797,798],{"class":92},"client ",[86,800,97],{"class":96},[86,802,803],{"class":92}," meilisearch.Client(os.environ[",[86,805,806],{"class":100},"\"CELERSEARCH_URL\"",[86,808,809],{"class":92},"], os.environ[",[86,811,812],{"class":100},"\"CELERSEARCH_API_KEY\"",[86,814,815],{"class":92},"])\n",[86,817,818,821,823,826,829],{"class":88,"line":283},[86,819,820],{"class":92},"movies ",[86,822,97],{"class":96},[86,824,825],{"class":92}," client.index(",[86,827,828],{"class":100},"\"movies\"",[86,830,316],{"class":92},[86,832,833],{"class":88,"line":289},[86,834,238],{"emptyLinePlaceholder":237},[86,836,837,840,842],{"class":88,"line":294},[86,838,839],{"class":92},"task ",[86,841,97],{"class":96},[86,843,844],{"class":92}," movies.add_documents([\n",[86,846,847,850,853,856,858,860,863,865,868,870,873,876,879,881,884],{"class":88,"line":319},[86,848,849],{"class":92},"    {",[86,851,852],{"class":100},"\"id\"",[86,854,855],{"class":92},": ",[86,857,351],{"class":142},[86,859,366],{"class":92},[86,861,862],{"class":100},"\"title\"",[86,864,855],{"class":92},[86,866,867],{"class":100},"\"Carol\"",[86,869,366],{"class":92},[86,871,872],{"class":100},"\"genres\"",[86,874,875],{"class":92},": [",[86,877,878],{"class":100},"\"Romance\"",[86,880,366],{"class":92},[86,882,883],{"class":100},"\"Drama\"",[86,885,886],{"class":92},"]},\n",[86,888,889,891,893,895,897,899,901,903,906,908,910,912,915,917,920],{"class":88,"line":324},[86,890,849],{"class":92},[86,892,852],{"class":100},[86,894,855],{"class":92},[86,896,380],{"class":142},[86,898,366],{"class":92},[86,900,862],{"class":100},[86,902,855],{"class":92},[86,904,905],{"class":100},"\"Wonder Woman\"",[86,907,366],{"class":92},[86,909,872],{"class":100},[86,911,875],{"class":92},[86,913,914],{"class":100},"\"Action\"",[86,916,366],{"class":92},[86,918,919],{"class":100},"\"Adventure\"",[86,921,886],{"class":92},[86,923,924],{"class":88,"line":330},[86,925,815],{"class":92},[86,927,928],{"class":88,"line":345},[86,929,930],{"class":92},"client.wait_for_task(task.task_uid)\n",[86,932,933],{"class":88,"line":375},[86,934,238],{"emptyLinePlaceholder":237},[86,936,937,940,943,946,949,952],{"class":88,"line":400},[86,938,939],{"class":142},"print",[86,941,942],{"class":92},"(movies.search(",[86,944,945],{"class":100},"\"wondr woman\"",[86,947,948],{"class":92},")[",[86,950,951],{"class":100},"\"hits\"",[86,953,815],{"class":92},[191,955,957],{"id":956},"other-languages","Other languages",[14,959,960,961,966],{},"Official Meilisearch SDKs also exist for Go, Ruby, Rust, Java, .NET, Swift and\nDart. Configure them the same way: the endpoint URL is the host and the API key\nis the key. Plain HTTP works too; the\n",[18,962,965],{"href":963,"rel":964},"https://www.meilisearch.com/docs/reference/api/overview",[22],"Meilisearch API reference","\napplies as written.",[35,968,970],{"id":969},"search-from-the-browser","Search from the browser",[14,972,973],{},"Because the API key has full access, browser search goes through your backend.\nA small endpoint receives the visitor's query, searches with the key on the\nserver, and returns only what you choose to expose:",[76,975,978],{"className":213,"code":976,"filename":977,"language":216,"meta":82,"style":82},"import express from 'express'\nimport { Meilisearch } from 'meilisearch'\n\nconst client = new Meilisearch({\n  host: process.env.CELERSEARCH_URL,\n  apiKey: process.env.CELERSEARCH_API_KEY,\n})\n\nconst app = express()\n\napp.get('/api/search', async (req, res) => {\n  const { hits } = await client.index('movies').search(String(req.query.q ?? ''), {\n    limit: 20,\n    attributesToRetrieve: ['id', 'title', 'genres'],\n  })\n  res.json(hits)\n})\n\napp.listen(3000)\n","server.mjs",[63,979,980,992,1002,1006,1020,1028,1036,1040,1044,1058,1062,1101,1146,1156,1174,1179,1189,1193,1198],{"__ignoreMap":82},[86,981,982,984,987,989],{"class":88,"line":89},[86,983,223],{"class":96},[86,985,986],{"class":92}," express ",[86,988,229],{"class":96},[86,990,991],{"class":100}," 'express'\n",[86,993,994,996,998,1000],{"class":88,"line":104},[86,995,223],{"class":96},[86,997,226],{"class":92},[86,999,229],{"class":96},[86,1001,232],{"class":100},[86,1003,1004],{"class":88,"line":241},[86,1005,238],{"emptyLinePlaceholder":237},[86,1007,1008,1010,1012,1014,1016,1018],{"class":88,"line":262},[86,1009,244],{"class":96},[86,1011,247],{"class":142},[86,1013,250],{"class":96},[86,1015,253],{"class":96},[86,1017,256],{"class":138},[86,1019,259],{"class":92},[86,1021,1022,1024,1026],{"class":88,"line":273},[86,1023,265],{"class":92},[86,1025,93],{"class":142},[86,1027,270],{"class":92},[86,1029,1030,1032,1034],{"class":88,"line":283},[86,1031,276],{"class":92},[86,1033,107],{"class":142},[86,1035,270],{"class":92},[86,1037,1038],{"class":88,"line":289},[86,1039,286],{"class":92},[86,1041,1042],{"class":88,"line":294},[86,1043,238],{"emptyLinePlaceholder":237},[86,1045,1046,1048,1051,1053,1056],{"class":88,"line":319},[86,1047,244],{"class":96},[86,1049,1050],{"class":142}," app",[86,1052,250],{"class":96},[86,1054,1055],{"class":138}," express",[86,1057,409],{"class":92},[86,1059,1060],{"class":88,"line":324},[86,1061,238],{"emptyLinePlaceholder":237},[86,1063,1064,1067,1070,1072,1075,1077,1080,1083,1087,1089,1092,1095,1098],{"class":88,"line":330},[86,1065,1066],{"class":92},"app.",[86,1068,1069],{"class":138},"get",[86,1071,310],{"class":92},[86,1073,1074],{"class":100},"'/api/search'",[86,1076,366],{"class":92},[86,1078,1079],{"class":96},"async",[86,1081,1082],{"class":92}," (",[86,1084,1086],{"class":1085},"s4XuR","req",[86,1088,366],{"class":92},[86,1090,1091],{"class":1085},"res",[86,1093,1094],{"class":92},") ",[86,1096,1097],{"class":96},"=>",[86,1099,1100],{"class":92}," {\n",[86,1102,1103,1106,1108,1110,1112,1114,1116,1118,1120,1122,1124,1127,1129,1131,1134,1137,1140,1143],{"class":88,"line":345},[86,1104,1105],{"class":96},"  const",[86,1107,422],{"class":92},[86,1109,425],{"class":142},[86,1111,428],{"class":92},[86,1113,97],{"class":96},[86,1115,433],{"class":96},[86,1117,304],{"class":92},[86,1119,307],{"class":138},[86,1121,310],{"class":92},[86,1123,313],{"class":100},[86,1125,1126],{"class":92},").",[86,1128,438],{"class":138},[86,1130,310],{"class":92},[86,1132,1133],{"class":138},"String",[86,1135,1136],{"class":92},"(req.query.q ",[86,1138,1139],{"class":96},"??",[86,1141,1142],{"class":100}," ''",[86,1144,1145],{"class":92},"), {\n",[86,1147,1148,1151,1154],{"class":88,"line":375},[86,1149,1150],{"class":92},"    limit: ",[86,1152,1153],{"class":142},"20",[86,1155,270],{"class":92},[86,1157,1158,1161,1163,1165,1167,1169,1171],{"class":88,"line":400},[86,1159,1160],{"class":92},"    attributesToRetrieve: [",[86,1162,622],{"class":100},[86,1164,366],{"class":92},[86,1166,633],{"class":100},[86,1168,366],{"class":92},[86,1170,643],{"class":100},[86,1172,1173],{"class":92},"],\n",[86,1175,1176],{"class":88,"line":412},[86,1177,1178],{"class":92},"  })\n",[86,1180,1181,1184,1187],{"class":88,"line":417},[86,1182,1183],{"class":92},"  res.",[86,1185,1186],{"class":138},"json",[86,1188,457],{"class":92},[86,1190,1191],{"class":88,"line":448},[86,1192,286],{"class":92},[86,1194,1196],{"class":88,"line":1195},18,[86,1197,238],{"emptyLinePlaceholder":237},[86,1199,1201,1203,1206,1208,1211],{"class":88,"line":1200},19,[86,1202,1066],{"class":92},[86,1204,1205],{"class":138},"listen",[86,1207,310],{"class":92},[86,1209,1210],{"class":142},"3000",[86,1212,316],{"class":92},[76,1214,1216],{"className":213,"code":1215,"language":216,"meta":82,"style":82},"const hits = await fetch(`/api/search?q=${encodeURIComponent(query)}`).then((r) => r.json())\n",[63,1217,1218],{"__ignoreMap":82},[86,1219,1220,1222,1225,1227,1229,1232,1234,1237,1240,1242,1245,1247,1250,1252,1255,1258,1261,1263,1265,1268,1270],{"class":88,"line":89},[86,1221,244],{"class":96},[86,1223,1224],{"class":142}," hits",[86,1226,250],{"class":96},[86,1228,433],{"class":96},[86,1230,1231],{"class":138}," fetch",[86,1233,310],{"class":92},[86,1235,1236],{"class":100},"`/api/search?q=${",[86,1238,1239],{"class":138},"encodeURIComponent",[86,1241,310],{"class":100},[86,1243,1244],{"class":92},"query",[86,1246,739],{"class":100},[86,1248,1249],{"class":100},"}`",[86,1251,1126],{"class":92},[86,1253,1254],{"class":138},"then",[86,1256,1257],{"class":92},"((",[86,1259,1260],{"class":1085},"r",[86,1262,1094],{"class":92},[86,1264,1097],{"class":96},[86,1266,1267],{"class":92}," r.",[86,1269,1186],{"class":138},[86,1271,1272],{"class":92},"())\n",[14,1274,1275,1276,1280,1281,33],{},"Your endpoint decides which index and fields visitors can reach, the same\njob a search-only key does elsewhere. Building with InstantSearch? The\n",[18,1277,1279],{"href":1278},"/docs/cloud/frameworks/nextjs","Next.js guide"," shows a proxy that works with\n",[63,1282,1283],{},"instant-meilisearch",[1285,1286,1288],"info",{"title":1287},"Custom API keys and tenant tokens",[14,1289,1290,1291,1294,1295,1298],{},"Keys you create with the ",[63,1292,1293],{},"/keys"," endpoint, and tenant tokens, can't be used to\nconnect to a CelerSearch instance yet: requests that use them are rejected with\n",[63,1296,1297],{},"401",". Use the instance API key from your backend, as shown above.",[35,1300,1302],{"id":1301},"how-it-differs-from-self-hosted-meilisearch","How it differs from self-hosted Meilisearch",[53,1304,1305,1315,1333,1344],{},[56,1306,1307,1310,1311,1314],{},[26,1308,1309],{},"Authentication",": send the instance API key as ",[63,1312,1313],{},"Authorization: Bearer \u003Ckey>","\non every request.",[56,1316,1317,855,1320,1323,1324,1327,1328,1332],{},[26,1318,1319],{},"Dumps and snapshots",[63,1321,1322],{},"POST /dumps"," and ",[63,1325,1326],{},"POST /snapshots"," are disabled.\nYour data is protected by encrypted ",[18,1329,1331],{"href":1330},"/docs/cloud/backups","backups"," you\nmanage from the portal.",[56,1334,1335,1338,1339,1343],{},[26,1336,1337],{},"Engine version",": you choose it and apply ",[18,1340,1342],{"href":1341},"/docs/cloud/upgrades","upgrades","\nfrom the portal when you're ready.",[56,1345,1346,1349,1350,1354],{},[26,1347,1348],{},"Document limit",": your ",[18,1351,1353],{"href":1352},"/docs/cloud/plans","plan"," sets how many documents the\ninstance holds across all indexes. Searches are always unlimited.",[191,1356,1358],{"id":1357},"when-you-reach-the-document-limit","When you reach the document limit",[14,1360,1361,1362,1365,1366,1369,1370,1373,1374,1377],{},"Requests that add or update documents (",[63,1363,1364],{},"POST"," or ",[63,1367,1368],{},"PUT"," on\n",[63,1371,1372],{},"/indexes/{uid}/documents",") are refused with ",[63,1375,1376],{},"429",":",[76,1379,1382],{"className":1380,"code":1381,"language":1186,"meta":82,"style":82},"language-json shiki shiki-themes github-light github-dark","{\n  \"error\": \"document_quota_exceeded\",\n  \"message\": \"Document quota exceeded for this instance\",\n  \"current_documents\": 100000,\n  \"max_documents\": 100000\n}\n",[63,1383,1384,1389,1401,1413,1425,1435],{"__ignoreMap":82},[86,1385,1386],{"class":88,"line":89},[86,1387,1388],{"class":92},"{\n",[86,1390,1391,1394,1396,1399],{"class":88,"line":104},[86,1392,1393],{"class":142},"  \"error\"",[86,1395,855],{"class":92},[86,1397,1398],{"class":100},"\"document_quota_exceeded\"",[86,1400,270],{"class":92},[86,1402,1403,1406,1408,1411],{"class":88,"line":241},[86,1404,1405],{"class":142},"  \"message\"",[86,1407,855],{"class":92},[86,1409,1410],{"class":100},"\"Document quota exceeded for this instance\"",[86,1412,270],{"class":92},[86,1414,1415,1418,1420,1423],{"class":88,"line":262},[86,1416,1417],{"class":142},"  \"current_documents\"",[86,1419,855],{"class":92},[86,1421,1422],{"class":142},"100000",[86,1424,270],{"class":92},[86,1426,1427,1430,1432],{"class":88,"line":273},[86,1428,1429],{"class":142},"  \"max_documents\"",[86,1431,855],{"class":92},[86,1433,1434],{"class":142},"100000\n",[86,1436,1437],{"class":88,"line":283},[86,1438,1439],{"class":92},"}\n",[14,1441,1442,1443,1447],{},"Searches, reads and deletions keep working. Delete documents or\n",[18,1444,1446],{"href":1445},"/pricing","move to a larger plan"," to write again. The document count refreshes\nperiodically, so after deleting documents it can take a few minutes before\nwrites are accepted again.",[191,1449,1451],{"id":1450},"responses-from-the-platform","Responses from the platform",[14,1453,1454,1455,1458,1459,1462],{},"These come from CelerSearch rather than from Meilisearch, so they use ",[63,1456,1457],{},"error","\nand ",[63,1460,1461],{},"message"," fields instead of Meilisearch's usual error object. The SDKs raise\nthem as API errors with the HTTP status.",[1464,1465,1466,1483],"table",{},[1467,1468,1469],"thead",{},[1470,1471,1472,1476,1480],"tr",{},[1473,1474,1475],"th",{},"Status",[1473,1477,1478],{},[63,1479,1457],{},[1473,1481,1482],{},"Meaning",[1484,1485,1486,1504,1518,1533,1547],"tbody",{},[1470,1487,1488,1493,1498],{},[1489,1490,1491],"td",{},[63,1492,1297],{},[1489,1494,1495],{},[63,1496,1497],{},"missing_api_key",[1489,1499,1500,1501,1503],{},"No ",[63,1502,173],{}," header",[1470,1505,1506,1510,1515],{},[1489,1507,1508],{},[63,1509,1297],{},[1489,1511,1512],{},[63,1513,1514],{},"invalid_api_key",[1489,1516,1517],{},"The key isn't an instance API key",[1470,1519,1520,1525,1530],{},[1489,1521,1522],{},[63,1523,1524],{},"403",[1489,1526,1527],{},[63,1528,1529],{},"endpoint_disabled",[1489,1531,1532],{},"Dumps and snapshots are managed for you",[1470,1534,1535,1539,1544],{},[1489,1536,1537],{},[63,1538,1376],{},[1489,1540,1541],{},[63,1542,1543],{},"document_quota_exceeded",[1489,1545,1546],{},"The plan's document limit is reached",[1470,1548,1549,1554,1559],{},[1489,1550,1551],{},[63,1552,1553],{},"503",[1489,1555,1556],{},[63,1557,1558],{},"instance_stopped",[1489,1560,1561],{},"The instance isn't running",[35,1563,1565],{"id":1564},"next-steps","Next steps",[53,1567,1568,1588,1598],{},[56,1569,1570,855,1573,270,1577,366,1580,270,1584],{},[26,1571,1572],{},"Framework guides",[18,1574,1576],{"href":1575},"/docs/cloud/frameworks/laravel-scout","Laravel Scout",[18,1578,1579],{"href":1278},"Next.js",[18,1581,1583],{"href":1582},"/docs/cloud/frameworks/rails","Ruby on Rails",[18,1585,1587],{"href":1586},"/docs/cloud/frameworks/strapi","Strapi",[56,1589,1590,1593,1594],{},[26,1591,1592],{},"Moving an existing index?"," See ",[18,1595,1597],{"href":1596},"/docs/cloud/migrate","Migrate to CelerSearch",[56,1599,1600,1603,1604],{},[26,1601,1602],{},"Choosing a plan?"," Compare document limits on ",[18,1605,1606],{"href":1445},"Pricing",[1608,1609,1610],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":82,"searchDepth":104,"depth":104,"links":1612},[1613,1614,1615,1621,1622,1626],{"id":37,"depth":104,"text":38},{"id":127,"depth":104,"text":128},{"id":181,"depth":104,"text":182,"children":1616},[1617,1618,1619,1620],{"id":193,"depth":241,"text":194},{"id":460,"depth":241,"text":461},{"id":750,"depth":241,"text":751},{"id":956,"depth":241,"text":957},{"id":969,"depth":104,"text":970},{"id":1301,"depth":104,"text":1302,"children":1623},[1624,1625],{"id":1357,"depth":241,"text":1358},{"id":1450,"depth":241,"text":1451},{"id":1564,"depth":104,"text":1565},"Every CelerSearch instance speaks the standard Meilisearch API. Point any official SDK or HTTP client at your endpoint URL with your API key, and you're indexing and searching in a few lines of code.","md",{},"/docs/cloud/connect-any-app",{"title":5,"description":1627},"Use your managed Meilisearch instance from JavaScript, PHP, Python or any stack with the official SDKs. Endpoint URL, API key, and working code.","Connect Any App to Managed Meilisearch",{"loc":1630},"docs/cloud/connect-any-app","QrMDCVjPjIeD2-78N6lhF4_eSYYIEITspU_uRLs_8qU",1792316273413]