API Documentation

Overview

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.

Base URL

https://postalcode.apply.org.za

Data Source

UniApplyForMe

Response Format

JSON

Endpoints

GET
Get Areas
Get a list of all unique areas

Endpoint

/api/areas

Parameters

NameTypeRequiredDescription
api_keystringNoYour API key (can also be sent via x-api-key header)

Example Request

https://postalcode.apply.org.za/api/areas

Example Response

{
  "areas": [
    "ABERDEEN",
    "ACORNHOEK",
    "ADDO",
    "ADELAIDE",
    "ADENDORP",
    "AGGENEYS",
    "ALBERTINIA",
    "ALBERTON",
    "ALEXANDER BAY",
    "ALEXANDRA"
  ]
}

API Keys & Rate Limits

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.

Rate Limit Tiers

Loading tiers...

Using API Keys

You can include your API key in requests using one of these methods:

  1. Header (recommended): Include the x-api-key header in your request
  2. Query parameter: Add api_key=YOUR_API_KEY to the URL query string

Requesting an API Key

To request an API key, please contact us at apps@apply.org.za with the following information:

  • Your name and email address
  • Organization name (if applicable)
  • Brief description of how you plan to use the API
  • Expected request volume (requests per day)
  • Preferred tier (if you have a specific tier in mind)

Code Examples

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));

Usage Guidelines

Attribution

When using our API in public applications, please include attribution to UniApplyForMe Postal Code Finder.

Error Handling

The API uses standard HTTP status codes to indicate success or failure:

  • 200 - Success
  • 400 - Bad request (missing or invalid parameters)
  • 401 - Unauthorized (invalid API key)
  • 429 - Too many requests (rate limit exceeded)
  • 500 - Server error

Support

If you have any questions or need assistance with the API, please contact us at apps@apply.org.za.