---
title: "Semantic Search Endpoint"
method: GET
path: "/api/occupations/semantic_search"
tags: ["occupations"]
---

# Semantic Search Endpoint

`GET /api/occupations/semantic_search`

## Request

- Base URL: `https://api.mit-llm-survey.academy` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mit-llm-survey.academy/api/occupations/semantic_search`
- Auth: none declared

Perform semantic search over available occupations using embeddings.

This endpoint uses a machine learning model to find occupations that are semantically
similar to the provided query, then filters to only return available occupations.

Args:
    query: Search query string (e.g., "financial data engineering", "software development")
    top_k: Number of top results to return (default: 10, max: 100)

Returns:
    - query: The original search query
    - results: List of matching occupations with similarity scores
    - total: Total number of results returned

## Query parameters

- `query` string, required: Search query string for semantic search
- `top_k` integer, nullable: Number of top results to return

## Response `200`

Successful Response

- SemanticSearchResponse: Response model for semantic search endpoint
  - `query` string, required
  - `results` SemanticSearchResult[], required
    - `occupation_id` string, nullable
    - `occupation` string, required
    - `similarity` number, required
    - `normalized_score` number, required
  - `total` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mit-llm-survey/apis/llm-survey-backend.md) - [All operations](https://skmtc.dev/mit-llm-survey/apis/llm-survey-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/mit-llm-survey/apis/llm-survey-backend/revisions/6a5ef49cfcc4?raw)
