Missing osm_id in search result?

Hello,

I’m new using open street maps and have a simple question:

When I query for my zipcode using nominatim with search.php?postalcode=31832 or search.php?query=31832 I got two results.

One of these results has an osm_id, the other result not.

Why does some results have an osm_id and others not?

You can find the json below:

[
    {
        "place_id": 27091328,
        "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
        "osm_type": "relation",
        "osm_id": 2955256,
        "boundingbox": [
            "52.1283627",
            "52.2654148",
            "9.4640257",
            "9.7535753"
        ],
        "lat": "52.196894799999995",
        "lon": "9.60123361715679",
        "display_name": "31832, Deutschland",
        "place_rank": 21,
        "category": "boundary",
        "type": "postal_code",
        "importance": 0.33499999999999996
    },
    {
        "place_id": 27142150,
        "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
        "boundingbox": [
            "52.041068246543",
            "52.361068246543",
            "9.4415189935511",
            "9.7615189935511"
        ],
        "lat": "52.201068246542825",
        "lon": "9.601518993551084",
        "display_name": "Springe, Region Hannover, 31832, Deutschland",
        "place_rank": 21,
        "category": "place",
        "type": "postcode",
        "importance": 0.33499999999999996
    }
]

And another question: Is there a way to get a single place by it’s place_id? I think the lookup works with osm_id but not with place_id. So it’s kind of confusing that there is data without a osm_id.

Thanks for some help!

Best regards,

Timo