Discover/Bawabatic API
live

Bawabatic APIbawabatic.dz

Access Algerian government public services, themes, sectors, and procedures via the bawabatic.dz API. Supports Arabic, French, and English.

Endpoints
9
Updated
2mo ago

What is the Bawabatic API?

The bawabatic.dz API exposes 9 endpoints covering the Algerian Government Portal of Public Services, returning structured data on service themes, ministries, individual procedures, and official government links. Using get_service_detail, you can retrieve a specific procedure's name, description, metadata object, and target audience array. The API supports Arabic, French, and English via a lang parameter on every endpoint.

Try it
Language (ar/fr/en)
api.parse.bot/scraper/24ffe10c-26ba-422b-8e0a-db30dcd221f3/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/24ffe10c-26ba-422b-8e0a-db30dcd221f3/get_homepage' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace bawabatic-dz-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""
Algeria Public Services Portal API Client
Get your API key from: https://parse.bot/settings
"""

import os
import json
import requests
from typing import Optional, Dict, Any, List


class ParseClient:
    """Client for accessing the Algeria Public Services Portal API via Parse."""

    def __init__(self, api_key: Optional[str] = None):
        """Initialize the Parse API client.

        Args:
            api_key: API key for authentication. If not provided, reads from PARSE_API_KEY env var.
        """
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "50ee29a0-6c16-4377-8e7b-f4bf622c511f"
        self.api_key = api_key or os.getenv("PARSE_API_KEY")

        if not self.api_key:
            raise ValueError(
                "API key not provided. Set PARSE_API_KEY environment variable or pass api_key parameter."
            )

    def _call(self, endpoint: str, method: str = "POST", **params) -> Dict[str, Any]:
        """Make a call to the Parse API.

        Args:
            endpoint: The endpoint name to call
            method: HTTP method (GET or POST)
            **params: Query parameters or request body parameters

        Returns:
            The API response as a dictionary
        """
        url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
        headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}

        if method.upper() == "GET":
            response = requests.get(url, headers=headers, params=params)
        elif method.upper() == "POST":
            response = requests.post(url, headers=headers, json=params)
        else:
            raise ValueError(f"Unsupported HTTP method: {method}")

        response.raise_for_status()
        return response.json()

    def get_homepage(self, lang: str = "en") -> Dict[str, Any]:
        """Fetch the main homepage of the Government Portal of Public Services.

        Args:
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            Portal description and basic metadata
        """
        return self._call("get_homepage", method="GET", lang=lang)

    def list_themes(self, lang: str = "en") -> Dict[str, Any]:
        """Retrieve all available service themes/categories.

        Args:
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            List of theme objects with ID, name, and service count
        """
        return self._call("list_themes", method="GET", lang=lang)

    def get_services_by_theme(self, theme_id: str, lang: str = "en") -> Dict[str, Any]:
        """Retrieve all public services listed under a specific theme.

        Args:
            theme_id: The theme ID
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            Services under the specified theme
        """
        return self._call(
            "get_services_by_theme", method="GET", theme_id=theme_id, lang=lang
        )

    def list_sectors(self, lang: str = "en") -> Dict[str, Any]:
        """Retrieve all ministries/sectors listed on the portal.

        Args:
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            List of sectors with ID and name
        """
        return self._call("list_sectors", method="GET", lang=lang)

    def get_services_by_sector(self, sector_id: str, lang: str = "en") -> Dict[str, Any]:
        """Retrieve all public services listed under a specific ministry/sector.

        Args:
            sector_id: The sector ID
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            Services under the specified sector
        """
        return self._call(
            "get_services_by_sector", method="GET", sector_id=sector_id, lang=lang
        )

    def get_service_detail(self, service_id: str, lang: str = "en") -> Dict[str, Any]:
        """Retrieve full details of a specific public service or procedure.

        Args:
            service_id: The service ID
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            Full details of the service including description, target audience, and metadata
        """
        return self._call(
            "get_service_detail", method="GET", service_id=service_id, lang=lang
        )

    def search_services(self, query: str, lang: str = "en") -> Dict[str, Any]:
        """Search for public services by keyword across all themes and sectors.

        Args:
            query: Search keyword
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            List of services matching the search query
        """
        return self._call("search_services", method="GET", query=query, lang=lang)

    def get_country_info(self, lang: str = "en") -> Dict[str, Any]:
        """Retrieve general country information about Algeria.

        Args:
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            Country information including government type, contact details, and metadata
        """
        return self._call("get_country_info", method="GET", lang=lang)

    def get_important_links(self, lang: str = "en") -> Dict[str, Any]:
        """Retrieve the list of important external government links featured on the portal.

        Args:
            lang: Language code (ar/fr/en). Defaults to 'en'.

        Returns:
            List of important government links
        """
        return self._call("get_important_links", method="GET", lang=lang)


def main():
    """Practical workflow demonstrating the Parse API client."""
    client = ParseClient()

    print("=" * 70)
    print("ALGERIA PUBLIC SERVICES PORTAL - API DEMONSTRATION")
    print("=" * 70)

    print("\n1. FETCHING PORTAL HOMEPAGE")
    print("-" * 70)
    homepage = client.get_homepage(lang="en")
    print(f"Portal: {homepage.get('title', 'N/A')}")
    print(f"Description: {homepage.get('description', 'N/A')}")
    print(f"URL: {homepage.get('url', 'N/A')}")

    print("\n2. FETCHING COUNTRY INFORMATION")
    print("-" * 70)
    country_info = client.get_country_info(lang="en")
    print(f"Official Name: {country_info.get('official_name', 'N/A')}")
    print(f"Government Type: {country_info.get('government', 'N/A')}")
    print(f"Location: {country_info.get('location', 'N/A')}")
    print(f"Operator: {country_info.get('operator', 'N/A')}")
    if "contact" in country_info:
        contact = country_info["contact"]
        print(f"Contact Address: {contact.get('address', 'N/A')}")
        print(f"Contact Email: {contact.get('email', 'N/A')}")

    print("\n3. BROWSING THEMES AND THEIR SERVICES")
    print("-" * 70)
    themes_response = client.list_themes(lang="en")
    total_themes = themes_response.get("total_themes", 0)
    print(f"Total themes available: {total_themes}")

    if themes_response.get("themes"):
        for idx, theme in enumerate(themes_response["themes"][:3], 1):
            theme_id = theme.get("id")
            theme_name = theme.get("name")
            service_count = theme.get("service_count", 0)

            print(f"\n  Theme {idx}: {theme_name} (ID: {theme_id})")
            print(f"  Services in this theme: {service_count}")

            services_response = client.get_services_by_theme(theme_id, lang="en")
            services = services_response.get("services", [])

            if services:
                print(f"  Sample services (first 3):")
                for service in services[:3]:
                    service_name = service.get("name", "N/A")
                    print(f"    - {service_name}")

    print("\n4. SEARCHING FOR SPECIFIC SERVICES")
    print("-" * 70)
    search_keywords = ["passport", "health", "education"]

    for keyword in search_keywords:
        search_results = client.search_services(query=keyword, lang="en")
        results = search_results.get("results", [])
        print(
            f"\nSearch results for '{keyword}': {len(results)} services found"
        )

        if results:
            for service in results[:2]:
                service_name = service.get("name", "N/A")
                print(f"  - {service_name}")

    print("\n5. BROWSING SECTORS (MINISTRIES)")
    print("-" * 70)
    sectors_response = client.list_sectors(lang="en")
    total_sectors = sectors_response.get("total_sectors", 0)
    print(f"Total sectors available: {total_sectors}")

    if sectors_response.get("sectors"):
        for idx, sector in enumerate(sectors_response["sectors"][:3], 1):
            sector_id = sector.get("id")
            sector_name = sector.get("name")

            print(f"\n  Sector {idx}: {sector_name} (ID: {sector_id})")

            sector_services = client.get_services_by_sector(sector_id, lang="en")
            services = sector_services.get("services", [])

            if services:
                print(f"  Services in this sector (first 3):")
                for service in services[:3]:
                    service_id = service.get("id")
                    service_name = service.get("name", "N/A")
                    print(f"    - {service_name} (ID: {service_id})")

                    if service_id and idx == 1:
                        detail = client.get_service_detail(service_id, lang="en")
                        description = detail.get("description", "No description")
                        target_audience = detail.get("target_audience", [])

                        print(f"      Description: {description[:100]}...")
                        if target_audience:
                            print(f"      Target Audience: {', '.join(target_audience)}")

    print("\n6. IMPORTANT GOVERNMENT LINKS")
    print("-" * 70)
    links_response = client.get_important_links(lang="en")
    links = links_response.get("links", [])

    if links:
        print(f"Featured government links ({len(links)} total):")
        for link in links[:5]:
            link_name = link.get("name", "N/A")
            link_url = link.get("url", "N/A")
            print(f"  - {link_name}: {link_url}")

    print("\n" + "=" * 70)
    print("API DEMONSTRATION COMPLETED SUCCESSFULLY")
    print("=" * 70)


if __name__ == "__main__":
    main()
All endpoints · 9 totalmissing one? ·

Fetch the main homepage of the Government Portal of Public Services, returning the portal description and basic metadata. Supports lang parameter (ar/fr/en).

Input
ParamTypeDescription
langstringLanguage (ar/fr/en)
Response
{
  "type": "object",
  "fields": {
    "url": "string",
    "lang": "string",
    "title": "string",
    "description": "string"
  },
  "sample": {
    "url": "http://bawaba.mna.gov.dz/index.php",
    "lang": "en",
    "title": "Government Portal of Public Services",
    "description": "Algerian Portal for Public Services and Administrative Procedures"
  }
}

About the Bawabatic API

What the API Covers

The bawabatic.dz API surfaces data from Algeria's official public services portal. It covers the portal's full taxonomy of services: list_themes returns every theme/category with a total_themes count and per-theme service count, while list_sectors returns all ministries and government sectors with a total_sectors count. Every endpoint accepts an optional lang parameter accepting ar, fr, or en, so responses can be retrieved in the language most useful for your application.

Browsing and Searching Services

get_services_by_theme and get_services_by_sector both require an ID (theme_id or sector_id respectively) and return an array of services plus a count. To drill into a specific procedure, get_service_detail accepts a service_id and returns id, name, description, a metadata object, and a target_audience array — the most field-rich response in the API. search_services accepts a free-text query and returns a results array spanning all themes and sectors, making it the fastest way to locate a service without knowing its theme or sector in advance.

Supporting Endpoints

get_homepage returns the portal's title and description plus the resolved url and active lang — useful for confirming portal availability or surfacing localized portal copy. get_country_info returns structured fields including official_name, government, operator, location, and a contact object with Algeria's national contact details as listed on the portal. get_important_links returns an array of curated external government links featured on the portal homepage.

IDs and Navigation

Theme and sector IDs used by get_services_by_theme and get_services_by_sector are obtained from the themes array returned by list_themes and the sectors array returned by list_sectors respectively. Service IDs for get_service_detail are found within those service arrays. There is no separate ID-lookup endpoint, so the intended flow is: list → browse by theme or sector → detail.

Reliability & maintenance

The Bawabatic API is a managed, monitored endpoint for bawabatic.dz — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when bawabatic.dz changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official bawabatic.dz API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a multilingual directory of Algerian administrative procedures using list_themes and get_service_detail fields like target_audience and description.
  • Power a government chatbot that resolves citizen queries by calling search_services with a keyword and returning matching procedure names.
  • Map ministries to their services by pairing list_sectors with get_services_by_sector for a sector-level service inventory.
  • Integrate Algerian public service data into an expat or immigration guide using the fr or en lang parameter.
  • Aggregate official government portal links from get_important_links to build a curated resource hub for public administration.
  • Surface Algeria country metadata (official_name, government, contact) in civic-tech or open-data dashboards via get_country_info.
  • Monitor which themes have the most services by comparing total_themes counts from list_themes over time.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does bawabatic.dz have an official developer API?+
Bawabatic.dz does not publish a documented public developer API. This Parse API provides structured programmatic access to the data available on the portal.
What does `get_service_detail` return beyond a service name?+
get_service_detail returns id, name, description, a metadata object (which may include procedure-specific fields such as required documents or deadlines as presented on the portal), and a target_audience array identifying who the service applies to. All fields are returned in the language specified by the lang parameter.
Does the API return downloadable forms or attached documents for procedures?+
Not currently. The API covers service descriptions, metadata, and target audience as structured text fields. It does not expose downloadable file attachments or form links. You can fork this API on Parse and revise it to add an endpoint that surfaces any document URLs associated with a given service.
Is there pagination for large result sets from `list_themes` or `list_sectors`?+
The endpoints return the full set of themes or sectors in a single response — total_themes and total_sectors reflect the complete count. There are no offset or page parameters currently. If the portal adds significantly more entries and pagination becomes necessary, you can fork the API on Parse and revise it to add pagination support.
Can I filter services by both theme and sector simultaneously?+
get_services_by_theme filters by theme_id and get_services_by_sector filters by sector_id — each filter operates independently. Cross-filtering by both dimensions in a single call is not currently supported. You can fork this API on Parse and revise it to add a combined filter endpoint.
Page content last updated . Spec covers 9 endpoints from bawabatic.dz.
Related APIs in Government PublicSee all →
service-public.fr API
Search the official French public service portal (service-public.fr) for practical guides, legal information, administrative procedures, and support resources. Retrieve structured content from any guide or category page, explore autocomplete suggestions, and access legal references — all through a single unified API.
emploitic.com API
Search and browse job listings and company profiles from Emploitic, with the ability to filter by wilayas, sectors, job functions, and experience levels. Access detailed job information and company hiring data to explore career opportunities and research potential employers.
alabamabids.com API
Search and monitor bid opportunities from Alabama Bid Network by date or month, view detailed bid information and results, and browse classified listings all in one place. Stay updated on the latest bids and their outcomes to never miss contracting opportunities in Alabama.
bdtender.com API
Search and browse tender listings from Bangladesh's largest tender portal, discovering opportunities by category, organization, and location while accessing real-time tender data and site statistics. Get detailed information on individual tenders, view live postings, and see what was published today to stay updated on the latest bidding opportunities.
telecontact.ma API
Find businesses, phone numbers, and reviews across Morocco using Telecontact.ma's comprehensive directory—search by business name, location, phone number, brand, or ICE registration, and access detailed contact information, ratings, and top-rated companies in any category. Discover local services, browse by activity type, and identify leading brands all in one place.
biddingo.com API
Search and filter government procurement bids and RFPs across different regions and categories to find relevant opportunities. Access detailed project descriptions and bid information to help you discover and evaluate contracting opportunities that match your business needs.
emploi.ma API
Search and browse job listings from Emploi.ma with detailed information about positions, companies, and available categories across the Moroccan job market. Access company profiles, featured job opportunities, and full job details including requirements, salary, and employment type.
jobz.pk API
Access real-time job listings from jobz.pk and filter by category, city, organization, newspaper, province, and sector to find positions that match your needs. Get detailed job information, browse government and overseas opportunities, and explore company profiles all in one place.