Skip to main content

Search subjects

POST /api/search
Content-Type: application/json

{
  "query": "ηλεκτρικά πατίνια",
  "cityIds": ["athens", "chania"],
  "page": 1,
  "pageSize": 10,
  "detailed": false
}
Search for subjects using a hybrid search approach that combines traditional text search with semantic search. Supports filtering by city, person, party, topic, date range, and geographic location.

Request body

query
string
required
The search query text
cityIds
array
Array of city IDs to filter by
personIds
array
Array of person IDs to filter by
partyIds
array
Array of party IDs to filter by
topicIds
array
Array of topic IDs to filter by
dateRange
object
Date range for filtering results
location
object
Geographic location filter
page
integer
default:"1"
Page number (minimum: 1)
pageSize
integer
default:"10"
Results per page (minimum: 1, maximum: 100)
detailed
boolean
default:"false"
Whether to return detailed results with speaker segment text. When true, includes full speakerSegments array in results.

Response

results
array
Array of search results
pagination
object
Pagination metadata

Error responses

400
Error
Invalid request parameters
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid request parameters",
    "details": [
      {
        "code": "invalid_type",
        "message": "Expected string, received number",
        "path": ["query"]
      }
    ]
  }
}
500
Error
Internal server error
{
  "error": {
    "code": "SEARCH_ERROR",
    "message": "An error occurred while performing the search",
    "details": "Connection timeout"
  }
}

Search configuration

The search API uses the following configuration:
  • Semantic search: Enabled by default, combining text and vector similarity
  • Rank window size: 100 results are considered for ranking
  • Rank constant: 60 (controls the balance between text and semantic scores)
  • Maximum page size: 100 results per page

Use cases

{
  "query": "πάρκα",
  "page": 1,
  "pageSize": 20
}

Filter by city and date range

{
  "query": "οικονομικά",
  "cityIds": ["athens"],
  "dateRange": {
    "start": "2024-01-01T00:00:00Z",
    "end": "2024-12-31T23:59:59Z"
  }
}
{
  "query": "ανακαίνιση",
  "location": {
    "point": {
      "lat": 37.9838,
      "lon": 23.7275
    },
    "radius": 10
  }
}

Detailed results with speaker segments

{
  "query": "κυκλοφορία",
  "cityIds": ["athens"],
  "detailed": true,
  "pageSize": 5
}

Build docs developers (and LLMs) love