# Network Lookup API Documentation

Use Network Lookup to find which mobile network serves a South African number. It’s useful before an airtime or data recharge, especially if the recipient has moved their number to a different network.

## Base URL

```text
https://simcloud.co.za/api/network.php
```

## Authentication

All requests require a Bearer token in the Authorization header:

```http
Authorization: Bearer YOUR_API_TOKEN
```

See the [API conventions](https://simcloud.co.za/api/index.html#conventions) for IPv4, request timeouts, and retries.

## Endpoints

GET

Returns the detected network for the supplied South African mobile number.

Each lookup is logged against the authenticated account.

## Query Parameters

| Parameter | Type   | Required | Description                           |
|-----------|--------|----------|---------------------------------------|
| msisdn    | string | Yes      | South African mobile number to check. |

Network lookup query parameters

## Example Request

```bash
curl -4 -sS -i 'https://simcloud.co.za/api/network.php?msisdn=0821234567' \
  -H "Authorization: Bearer $SIMCLOUD_API_TOKEN"
```

## Success Response

```json
{
    "status": "success",
    "msisdn": "+27821234567",
    "network": "mtn"
}
```

## Error Responses

| HTTP Status | Description |
|----|----|
| 400 | Bad Request (missing or invalid msisdn) |
| 401 | Unauthorized (invalid or missing token) |
| 404 | The number does not match any network |
| 405 | Method not allowed |
| 500 | Network lookup failed. |
| 503 | API temporarily unavailable. Honour `Retry-After` when present. |

Network lookup error responses
