The UniApplyForMe Postal Code Finder API provides programmatic access to South African postal codes. Use this API to integrate postal code lookup functionality into your applications, websites, or services.
https://postalcode.apply.org.za
UniApplyForMe
JSON
/api/postal-codes| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Search query (suburb, area, or postal code) |
| type | string | No | Filter by code type (all, box, street)(Default: all) |
| area | string | No | Filter by specific area |
| api_key | string | No | Your API key (can also be sent via x-api-key header) |
https://postalcode.apply.org.za/api/postal-codes?q=cape%20town&type=street{
"results": [
{
"suburb": "Cape Town CBD",
"area": "Cape Town",
"streetCode": "8001",
"boxCode": "8000"
},
{
"suburb": "Gardens",
"area": "Cape Town",
"streetCode": "8001",
"boxCode": null
}
]
}/api/areas| Name | Type | Required | Description |
|---|---|---|---|
| api_key | string | No | Your API key (can also be sent via x-api-key header) |
https://postalcode.apply.org.za/api/areas{
"areas": [
"ABERDEEN",
"ACORNHOEK",
"ADDO",
"ADELAIDE",
"ADENDORP",
"AGGENEYS",
"ALBERTINIA",
"ALBERTON",
"ALEXANDER BAY",
"ALEXANDRA"
]
}Our API uses API keys to authenticate requests and manage rate limits. While the API can be used without a key, authenticated requests enjoy higher rate limits and additional features.
You can include your API key in requests using one of these methods:
x-api-key header in your requestapi_key=YOUR_API_KEY to the URL query stringTo request an API key, please contact us at apps@apply.org.za with the following information:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Using fetch API with API key
async function searchPostalCodes(apiKey, query, type = 'all', area = null) {
const params = new URLSearchParams({ q: query });
if (type !== 'all') {
params.append('type', type);
}
if (area) {
params.append('area', area);
}
const response = await fetch(
'https://postalcode.apply.org.za/api/postal-codes?' + params.toString(),
{
headers: {
'x-api-key': apiKey
}
}
);
if (!response.ok) {
throw new Error('Failed to fetch postal codes');
}
const data = await response.json();
return data.results;
}
// Example usage
const apiKey = 'your_api_key_here';
searchPostalCodes(apiKey, 'cape town', 'street')
.then(results => console.log(results))
.catch(error => console.error(error));When using our API in public applications, please include attribution to UniApplyForMe Postal Code Finder.
The API uses standard HTTP status codes to indicate success or failure:
If you have any questions or need assistance with the API, please contact us at apps@apply.org.za.