{"openapi":"3.1.0","info":{"title":"Freudly Tests API","description":"Read-only catalogue of Freudly psychological self-assessment tests for AI assistants and other clients. No authentication. The same two operations are available as MCP tools at https://freudly.ai/mcp (Streamable HTTP). Results support self-reflection and screening; they are not a diagnosis.","version":"1.0.0"},"servers":[{"url":"https://freudly.ai/api/public"}],"paths":{"/v1/tests":{"get":{"tags":["Tests"],"summary":"Search psychological tests","description":"Finds published Freudly tests by keywords, topic, language, maximum duration and maximum number of questions. Every result carries the URL of the page where the test is taken.","operationId":"searchTests","parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Keywords to match in test names and descriptions, written in the same language as `language` (e.g. \"anxiety\", \"burnout\", \"ansiedad\", \"тревога\"). Short keywords work better than sentences.","title":"Query"},"description":"Keywords to match in test names and descriptions, written in the same language as `language` (e.g. \"anxiety\", \"burnout\", \"ansiedad\", \"тревога\"). Short keywords work better than sentences."},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Topic or theme in the same language as `language` (e.g. \"depression\", \"relationships\", \"personality\"). Matched against the catalogue topics; falls back to keyword search.","title":"Topic"},"description":"Topic or theme in the same language as `language` (e.g. \"depression\", \"relationships\", \"personality\"). Matched against the catalogue topics; falls back to keyword search."},{"name":"language","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PublicLocale","description":"Language of the test and its page: en, es, or ru (ru has a small catalogue).","default":"en"},"description":"Language of the test and its page: en, es, or ru (ru has a small catalogue)."},{"name":"max_minutes","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":300,"minimum":1},{"type":"null"}],"description":"Maximum estimated duration, minutes.","title":"Max Minutes"},"description":"Maximum estimated duration, minutes."},{"name":"max_questions","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"description":"Maximum number of questions.","title":"Max Questions"},"description":"Maximum number of questions."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of tests to return (1-20).","default":10,"title":"Limit"},"description":"Number of tests to return (1-20)."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Results page, starting at 1.","default":1,"title":"Page"},"description":"Results page, starting at 1."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestSearchResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tests/{test_id}":{"get":{"tags":["Tests"],"summary":"Get test details","description":"Description, scales, limitations, what is needed to get the result, and the URL of the page where the test is taken.","operationId":"getTestInfo","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"Test id from searchTests.","title":"Test Id"},"description":"Test id from searchTests."},{"name":"language","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PublicLocale","description":"Language of the description: en, es, or ru.","default":"en"},"description":"Language of the description: en, es, or ru."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTestInfo"}}}},"404":{"description":"No published test with this id in this language."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PublicLocale":{"type":"string","enum":["en","es","ru"]},"PublicResultAccess":{"properties":{"free_to_take":{"type":"boolean","title":"Free To Take"},"account_required_to_start":{"type":"boolean","title":"Account Required To Start"},"email_required_for_result":{"type":"boolean","title":"Email Required For Result"},"details":{"type":"string","title":"Details"}},"type":"object","required":["free_to_take","account_required_to_start","email_required_for_result","details"],"title":"PublicResultAccess","description":"Что нужно человеку, чтобы получить результат."},"PublicTestInfo":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"language":{"type":"string","title":"Language"},"url":{"type":"string","title":"Url","description":"Page where the test is taken. Give this link to the user."},"estimated_minutes":{"type":"integer","title":"Estimated Minutes"},"questions_count":{"type":"integer","title":"Questions Count"},"description":{"type":"string","title":"Description","description":"Markdown."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics"},"authors":{"items":{"type":"string"},"type":"array","title":"Authors"},"adaptation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adaptation","description":"Who adapted or translated the instrument."},"separate_forms_by_gender":{"type":"boolean","title":"Separate Forms By Gender"},"scales":{"items":{"$ref":"#/components/schemas/PublicTestScale"},"type":"array","title":"Scales"},"result_access":{"$ref":"#/components/schemas/PublicResultAccess"},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"},"sources":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sources","description":"Literature behind the instrument, markdown."}},"type":"object","required":["id","name","language","url","estimated_minutes","questions_count","description","topics","authors","separate_forms_by_gender","scales","result_access","limitations"],"title":"PublicTestInfo","description":"Результат get_test_info."},"PublicTestScale":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"min_score":{"type":"integer","title":"Min Score"},"max_score":{"type":"integer","title":"Max Score"}},"type":"object","required":["name","description","min_score","max_score"],"title":"PublicTestScale","description":"Шкала, по которой тест даёт результат."},"PublicTestSearchResult":{"properties":{"tests":{"items":{"$ref":"#/components/schemas/PublicTestSummary"},"type":"array","title":"Tests"},"total":{"type":"integer","title":"Total","description":"Number of matching tests across all pages."},"page":{"type":"integer","title":"Page"},"matched_topics":{"items":{"type":"string"},"type":"array","title":"Matched Topics","description":"Catalogue topics the `topic` argument matched."}},"type":"object","required":["tests","total","page","matched_topics"],"title":"PublicTestSearchResult","description":"Результат search_tests."},"PublicTestSummary":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"language":{"type":"string","title":"Language"},"summary":{"type":"string","title":"Summary","description":"Beginning of the description, plain text."},"estimated_minutes":{"type":"integer","title":"Estimated Minutes"},"questions_count":{"type":"integer","title":"Questions Count"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics"},"url":{"type":"string","title":"Url","description":"Page where the test is taken. Give this link to the user."}},"type":"object","required":["id","name","language","summary","estimated_minutes","questions_count","topics","url"],"title":"PublicTestSummary","description":"Тест в выдаче поиска."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}