User Registration API Documentation

Step 2: Search Address Information

Search Address Information

The /searchAddress endpoint allows you to search for address details in our database based on a search term, country, or filter.

Request Details

  • URL: POST https://ex.pankek.io/searchAddress
  • Headers:
    • Content-Type: application/json
    • api-key: <YOUR_API_KEY>
  • Body:
  • {
      "value": "zittau",
      "country": "de",
      "filter": true
    }
    • value: Search term (string, optional; can be a postal code or place name).
    • country: Country code (e.g., "de" for Germany; optional).
    • filter: Prevent duplicate place names (boolean, optional).

Response

Successful Response:

{
  "result": [
    {
      "country": "de",
      "place": "zittau",
      "zip": "02763",
      "city": "sachsen",
      "coordinates": { "latitude": 50.896, "longitude": 14.807 }
    }
  ]
}

Error Response:

{
  "error": { "message": "Internal Server Error" }
}

Example Code

const axios = require('axios');

axios.post('https://ex.pankek.io/searchAddress', {
  value: 'zittau',
  country: 'de',
  filter: true
}, {
  headers: {
    'Content-Type': 'application/json',
    'api-key': '3959798b-38d8-4d02-915d-a79825bc3a7b'
  }
})
.then(response => {
  const results = response.data.result;
  console.log('Addresses:', results);
})
.catch(error => console.error('API Error:', error));

Navigation