Exit to Site

Developer Integration Hub

Seamlessly integrate Algerian address data into any platform with our pre-built plugins and snippets.

Pro Tip

Optimize for Arabic Users

Use the /api/ar/wilayas.json endpoint to reduce your payload size by 50% for Arabic-only applications.

Check API Status

WooCommerce / WordPress

Native plugin for checkout fields synchronization.

Status

Ready for Integration

Setup Steps

  • 1Download the latest plugin version (v1.0.4 recommended).
  • 2Go to WordPress Admin > Plugins > Add New.
  • 3Upload the downloaded ZIP file and Activate.
  • 4Configure your shipping zones in WooCommerce settings.

Integration Snippet

<script src="https://dz-address-select.vercel.app/widget.js"></script>

Click button to copy snippet

Shopify

Custom script for Shopify Liquid themes.

Status

Ready for Integration

Setup Steps

  • 1Open your Shopify Admin > Online Store > Themes.
  • 2Click Edit Code and find "theme.liquid".
  • 3Paste the widget script before the closing </body> tag.
  • 4Add data attributes to your address inputs to sync.

Integration Snippet

<script src="https://dz-address-select.vercel.app/widget.js" defer></script>

Click button to copy snippet

Laravel / PHP

Composer package for backend validation.

Status

Ready for Integration

Setup Steps

  • 1Install via composer: composer require saddexrnx/dz-address-picker
  • 2Publish the configuration file.
  • 3Use the validation rules in your Request classes.
  • 4Fetch Wilayas via the provided Facade.

Integration Snippet

use SaddexRnx\DzAddress\Rules\WilayaRule;

$request->validate([
  'wilaya' => ['required', new WilayaRule]
]);

Click button to copy snippet

Node.js / React

NPM package with full TypeScript support.

Status

Ready for Integration

Setup Steps

  • 1Install via npm: npm install @dz-address/react
  • 2Import the AlgeriaAddressPicker component.
  • 3Pass props to customize behavior and language.
  • 4Listen to onChange events for state updates.

Integration Snippet

import { AlgeriaAddressPicker } from '@dz-address/react';

<AlgeriaAddressPicker 
  lang="en" 
  onChange={(data) => console.log(data)} 
/>

Click button to copy snippet

Developer Hub

Ready-to-use snippets.

Live Widget Configuration

Customize the widget to match your needs.

<!-- 1. Add this container where you want the dropdowns -->
<div class="dz-address-picker" data-target=".dz-address-picker" data-format="arabic" data-input-name="shipping_address"></div>

<!-- 2. Add this script before the closing </body> tag -->
<script src="https://dz-address-select.vercel.app/widget.js"></script>

Official WordPress Plugin

One-click install for WooCommerce checkouts.

API Sandbox

Interactive environment to test endpoints in real-time.

Quick Presets:
Run a request to see the response…

API Documentation

Comprehensive endpoints for every use case.

Admin Divisions

GET/api/index.json

Dynamic list of all active endpoints.

Example
fetch("https://dz-address-select.vercel.app/api/index.json")
Response
{"v": "2.0.0", "endpoints": ["/api/wilayas.json", ...]}
GET/api/wilayas.json

List all 69 wilayas.

Example
fetch("https://dz-address-select.vercel.app/api/wilayas.json")
Response
[{"code": 16, "arabic": "الجزائر", "ascii": "Alger"}]
GET/api/full-data.json

Complete hierarchical dataset.

Example
fetch("https://dz-address-select.vercel.app/api/full-data.json")
Response
[{"code": 16, "name": "Alger", "dairas": [...]}]

Language-Specific

GET/api/ar/wilayas.json

List all 69 wilayas.

Example
fetch("https://dz-address-select.vercel.app/api/ar/wilayas.json")
Response
[{"code": 16, "name": "الجزائر"}]
GET/api/latin/wilayas.json

List all 69 wilayas.

Example
fetch("https://dz-address-select.vercel.app/api/latin/wilayas.json")
Response
[{"code": 16, "name": "Alger"}]

ZIP Lookup

GET/api/zip/{zipcode}.json

Lookup address by ZIP code.

Example
fetch("https://dz-address-select.vercel.app/api/zip/16000.json")

Parameters

`zipcode`(string)— 5-digit postal code
Response
{"zip": "16000", "wilaya": "Alger", "commune": "Alger Centre"}

Geographic

GET/api/coordinates/wilayas.json

Wilaya geographic coordinates.

Example
fetch("https://dz-address-select.vercel.app/api/coordinates/wilayas.json")
Response
[{"code": 16, "lat": 36.75, "lng": 3.05}]

Logistics

GET/api/shipping/rates.json

Logistics rates and zones.

Example
fetch("https://dz-address-select.vercel.app/api/shipping/rates.json")
Response
[{"wilaya_code": 16, "delivery_home": {"min": 400, "max": 600}}]
GET/api/shipping/coverage/{wilaya_code}.json

Logistics rates and zones.

Example
fetch("https://dz-address-select.vercel.app/api/shipping/coverage/16.json")

Parameters

`wilaya_code`(number)— Wilaya code
Response
{"covered": true, "estimated_days": {"min": 1, "max": 2}}
GET/api/logistics/pickup-points/{wilaya_code}.json

Logistics rates and zones.

Example
fetch("https://dz-address-select.vercel.app/api/logistics/pickup-points/16.json")

Parameters

`wilaya_code`(number)— Wilaya code
Response
[{"name": "Yalidine Alger", "address": "Rue 1"}]

Demographics

GET/api/geo/wilayas.json

Demographic and density data.

Example
fetch("https://dz-address-select.vercel.app/api/population/wilayas.json")
Response
[{"code": 16, "population": 2988145, "density": 2511}]
GET/api/geo/wilayas/{code}.json

Demographic and density data.

Example
fetch("https://dz-address-select.vercel.app/api/population/wilayas/16.json")

Parameters

`code`(number)— Wilaya code
Response
{"code": 16, "population": 2988145}

Services

GET/api/postoffices/{wilaya_code}.json

Locate banks, ATMs, and post offices.

Example
fetch("https://dz-address-select.vercel.app/api/postoffices/16.json")

Parameters

`wilaya_code`(number)— Wilaya code
Response
[{"name": "Alger RP", "address": "1 rue Didouche Mourad"}]
GET/api/banks/{wilaya_code}.json

Locate banks, ATMs, and post offices.

Example
fetch("https://dz-address-select.vercel.app/api/banks/16.json")

Parameters

`wilaya_code`(number)— Wilaya code
Response
[{"name": "BNA Branch 1"}]
GET/api/government/passport-offices/{wilaya_code}.json

Locate banks, ATMs, and post offices.

Example
fetch("https://dz-address-select.vercel.app/api/government/passport-offices/16.json")

Parameters

`wilaya_code`(number)— Wilaya code
Response
[{"name": "Daira Alger Office"}]

Travel

GET/api/travel/visa-requirements.json

Visa requirements and travel info.

Example
fetch("https://dz-address-select.vercel.app/api/travel/visa-requirements.json")
Response
{"france": "Required", "tunisia": "Visa-free"}
GET/api/travel/visa-requirements?destination=france

Visa requirements and travel info.

Example
fetch("https://dz-address-select.vercel.app/api/travel/visa-requirements?destination=france")

Parameters

`destination`(string)— Target country
Response
{"country": "France", "requirement": "Visa Required"}

Smart Utilities

GET/api/search?q={query}

Fuzzy search across all names.

Example
fetch("https://dz-address-select.vercel.app/api/search?q=bou")

Parameters

`q`(string)— Search query (e.g. 'bou')
Response
[{"name": "Bouandas", "type": "commune"}]
GET/api/distance?from={code1}&to={code2}

Wilaya geographic coordinates.

Example
fetch("https://dz-address-select.vercel.app/api/distance?from=16&to=31")

Parameters

`from`(number)— Start wilaya code
`to`(number)— End wilaya code
Response
{"distance_km": 435, "status": "Beta"}
GET/api/geofence/check?lat={lat}&lng={lng}

Wilaya geographic coordinates.

Example
fetch("https://dz-address-select.vercel.app/api/geofence/check?lat=36.77&lng=3.05")

Parameters

`lat`(number)— Latitude
`lng`(number)— Longitude
Response
{"inside": true, "wilaya": 16}

Export

GET/api/export/wilayas-communes.csv

Download full data in CSV or SQL.

Example
fetch("https://dz-address-select.vercel.app/api/export/wilayas-communes.csv")
Response
code,name_ar,name_en
1,أدرار,Adrar
...
GET/api/export/full-data.sql

Download full data in CSV or SQL.

Example
fetch("https://dz-address-select.vercel.app/api/export/full-data.sql")
Response
CREATE TABLE wilayas (...);
INSERT INTO wilayas ...

Support & Community

Built for the Algerian developer community.

More updates are coming!