OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
19 stars 1 forks source link

Nominatim API returns HTTP 404 #887

Closed 1ec5 closed 3 weeks ago

1ec5 commented 2 months ago

Nominatim is supposed to come with an public API, but the API doesn’t seem to be accessible on our instance. For example, the following request returns an HTTP 404 error:

https://nominatim.openhistoricalmap.org/search?X-Requested-With=high-expectations&format=json&q=Northwest%20Territory

nominatim.openhistoricalmap.org itself is up and running, but the /search endpoint is missing for some reason.

This causes Overpass turbo to return an error when the query includes a searchArea: shortcut, as generated by the in: operator in the wizard syntax. For example, if you enter historic=monument and type:node in "Northwest Territory" into the wizard, it generates the following query:

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“historic=monument and type:node in "Northwest Territory"”
*/
[out:json][timeout:25];
// fetch area “Northwest Territory” to search in
{{geocodeArea:Northwest Territory}}->.searchArea;
// gather results
node["historic"="monument"](area.searchArea);
// print results
out geom;

But if you run it, you get an error that “Northwest Territory” can’t be found, even though searching for the same string in the osm.org search box (which uses a different endpoint internal to ohm-website) returns this boundary relation.

Could not find anything with the following name: Northwest Territory

The geocodeArea: shortcut and in: operator would be very useful for creating quick, one-off queries without having to find the boundary relation first. More broadly, many command line tools, applications, and libraries rely on the Nominatim API.

Rub21 commented 3 weeks ago

Seems here it is missing the .html. eg:

https://nominatim.openhistoricalmap.org/search.html?X-Requested-With=high-expectations&format=json&q=Northwest%20Territory

The static files are stored in S3, and we are serving the site through CloudFront.

1ec5 commented 3 weeks ago

The static files are stored in S3, and we are serving the site through CloudFront.

Overpass turbo is attempting to connect to an API endpoint that serves JSON responses, not the HTML GUI. If the Nominatim frontend is only being statically published, then I guess this would be a request for dynamic publishing.

Rub21 commented 3 weeks ago

I see , if that is the case, this is the right endpoint: https://nominatim-api.openhistoricalmap.org/search?X-Requested-With=high-expectations&format=json&q=Northwest%20Territory I am going update it in nominatim.

Rub21 commented 3 weeks ago

https://overpass-turbo.openhistoricalmap.org/

image

This is working in production now, good to close this ticker here :)