검색 API가 작동하지 않습니다

디스코드 봇에 Discourse API를 사용하려고 합니다. 봇을 통해 검색 쿼리를 전달하고, Discourse API를 활용해 결과를 디스코드로 반환하는 것이 목표입니다.

문제는 API가 작동하지 않는다는 것입니다. HTML 스니펫만 반환됩니다. 아래는 CURL 요청입니다 -

curl --location --request GET 'https://forum.andronix.app/search/query?term=Modded%20OS' \
--header 'Api-Key: xxxx2901589946b34f0e81bfc39xxx633deef202b6f004af878fa62xxxxxxxxx' \
--header 'Api-Username: xxxx' 

[API 키와 사용자 이름은 다른 작업에서는 정상적으로 작동하므로 정확합니다].

다음과 같은 응답을 받습니다

<!DOCTYPE html>
<html lang="en-US" class="desktop-view not-mobile-device text-size-normal">

<head>
    <meta charset="utf-8">
    <title>Andronix Community</title>
    <meta name="description" content="A place for everything Linux and Andronix">
    <meta name="discourse_theme_ids" content="3">
    <meta name="discourse_current_homepage" content="categories">
    <meta name="generator" content="Discourse 2.5.0.beta3 - https://github.com/discourse/discourse version 5285cbee62ad7b0cee5b3bf0b6449174fb4f4491">
    <link rel="icon" type="image/png" href="https://forum.andronix.app/uploads/default/optimized/1X/3f26e0ac92e114364358d8cfce8c5734ddacf980_2_32x32.png">
    <link rel="apple-touch-icon" type="image/png" href="https://forum.andronix.app/uploads/default/optimized/1X/3f26e0ac92e114364358d8cfce8c5734ddacf980_2_180x180.png">
    <meta name="theme-color" content="#36393e">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">

    <script type="application/ld+json">
        {
            "@context": "http://schema.org",
            "@type": "WebSite",
            "url": "https://forum.andronix.app",
            "potentialAction": {
                "@type": "SearchAction",
                "target": "https://forum.andronix.app/search?q={search_term_string}",
                "query-input": "required name=search_term_string"
            }
        }
    </script>
    <link rel="search" type="application/opensearchdescription+xml" href="https://forum.andronix.app/opensearch.xml" title="Andronix Community Search">

    <meta name="csrf-param" content="authenticity_token" />
    <meta name="csrf-token" content="3uVup/2b5g9JbWa3bJN0KA8RxeGi64VUXPBO6I58jsvja3QBTtPDeJtvyjlqnL4bSVQ77VuGmc665ukh7ir6aQ==" />

    <meta name="fragment" content="!">


    <link rel="preload" href="/assets/browser-update-331af91e0f999788d03c2128d366d5d0df480718b9e80914bfb0505cbb97af13.js" as="script">
    <script src="/assets/browser-update-331af91e0f999788d03c2128d366d5d0df480718b9e80914bfb0505cbb97af13.js"></script>




</body>

</html>

스팸처럼 보이지 않도록 응답을 짧게 줄였습니다

제가 어디서 잘못하고 있는지 알려주시면 감사하겠습니다. 감사합니다!

끝에 .json을 추가해 보세요:

GET 'https://forum.andronix.app/search/query.json?term=Modded

(또는 Accept 헤더를 사용하여 JSON 형식을 요청할 수 있습니다)