Provide JSON API for search
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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