nextcloud / nextcloud/maps

Provide JSON API for search

Open
#10 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature: 🔍 search
Dominant language
JavaScript
Stars
598
Forks
113
PR merge metrics
No merged PRs in 30d

Description

(Reopening your issue here because we moved development @stefan-niedermann :)

There should be an API for searching for addresses.
Otherwise every client would have to implement searching in contacts etc. itself. Providing an API would save every client much work.

This should be read as "WiP", just brainstorming.

Request

GET /search?q=<string>

Response

Nextcloud Maps should search all reachable information in the Nextcloud (especially from Nextcloud Contacts, but maybe from Nextcloud Calendar - Meetings in the near future?). And it should search osm via nominatim to get PoIs.
Mimetype: application/json

{
  /* Contacts from contacts app */
  contacts : [
	  {
		firstname : <string>,
		lastname : <string>,
		address : {
		  nr : <int>,
		  street : <string>,
		  plz : <int>,
		  city : <string>
		},
		lat : <int>,
		long : <int>
	  },
	  ...
  ],
  /* Points of Interest (bars, clubs, toilets, buildings, ...) */
  poi : [
      {
        title : <string>,
        type : <string>, /* Enum? */
		address : {
		  nr : <int>,
		  street : <string>,
		  plz : <int>,
		  city : <string>
		},
        lat : <int>,
        long : <int>
      },
      ...
  ],
  /* Addresses from OSM search */
  addresses : [
    {
      /* Whatever the OSM JSON-API delivers ;-) */
    },
    ...
  ]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository files, tests, or entry points are named. Start by locating the existing API and search integrations, then review how Nextcloud Contacts and OSM Nominatim could be queried. Done would require an agreed scope and response contract for contacts, points of interest, and addresses, followed by an implemented and tested GET /search endpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.