Divar API for Openclaw

A specialized technical interface for programmatically searching, filtering, and extracting listings from Iran's leading classifieds platform, Divar.

hadifarnoud
v1.0.0
Apr 2, 2026
0
712
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install divar-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install divar-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Divar API?

The Divar API skill provides a structured way to interact with the divar.ir server-driven widget API. It translates natural language search requests or browser URLs into the strictly typed JSON payloads required by the platform. By leveraging Openclaw Skills, developers can automate the retrieval of residential rentals, commercial sales, and other classified data, handling the complex Protobuf-style type annotations and widget parsing inherent to the system.

This skill is designed to bridge the gap between raw web traffic and actionable data, allowing for precise filtering by district, price range, room count, and amenities. It handles the nuances of Divar's internal API slugs versus URL path segments, ensuring high reliability when building scrapers, market research tools, or automated property hunters.

Divar API Use Cases

  • Automating real estate market research to track price trends across Tehran districts.
  • Building custom alert systems for new apartment listings matching specific criteria like balcony and parking.
  • Replicating browser-based search filters into programmatic data extraction pipelines.
  • Fetching deep listing details and contact information for lead generation.
  • Scoping local Iranian markets for commercial property availability.

How Divar API Works

  1. The skill identifies search parameters such as city, category, and specific filters like rent or area.
  2. It maps these parameters to the Divar-specific typed wrappers (str, repeated_string, number_range, boolean).
  3. It executes a POST request to the search endpoint using Openclaw Skills logic to handle server-driven widgets.
  4. The response is parsed to identify POST_ROW widgets, extracting unique listing tokens and metadata.
  5. For detailed views, it utilizes the token to query the post-detail endpoint for images, descriptions, and map coordinates.
  6. For authorized requests, it manages JWT or cookie-based headers to retrieve protected contact information.

Divar API Setup

To use this skill, ensure your environment can reach https://api.divar.ir. No specific local installation is required, but you must configure your agent with the correct headers for authenticated requests.

# Example of initiating an authenticated contact info request
curl -X POST 'https://api.divar.ir/v8/postcontact/web/contact_info_v2/{token}' \
--header 'Authorization: Basic <your_jwt_token_here>' \
--header 'Content-Type: application/json' \
--data-raw '{}'

Divar API Data Schema & Taxonomy

Component Structure Description
form_data Typed Wrappers Logic for category (str), rooms (repeated_string), and rent (number_range).
widget_type POST_ROW The primary object containing title, price, and the unique action token.
pagination_data Cursor-based Contains last_post_date and search_uid for sequential page fetching.
detail_sections Widget Array Includes BREADCRUMB, HEADER, IMAGES, and DETAILS widgets.

Divar API Advanced Features

  • Support for complex multi-district filtering using repeated_string arrays.
  • Automatic mapping of URL query parameters to API-compatible form_data objects.
  • Cursor-based pagination support for exhaustive data harvesting.
  • Server-side deduplication handling via optional viewed_tokens bloom filters.
  • Integration with Openclaw Skills for multi-agent real estate automation workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*