Discover/Divar API
live

Divar APIdivar.ir

Search Divar.ir classified ads by city, category, and keyword. Retrieve full listing details including price, location, images, and properties via two endpoints.

This API takes change requests — .
Endpoint health
verified 3d ago
search_posts
get_post_details
2/2 passing latest checkself-healing
Endpoints
2
Updated
9d ago

What is the Divar API?

The Divar.ir API provides access to Iran's largest classifieds marketplace through 2 endpoints. Use search_posts to query listings across 8 major Iranian cities filtered by category and free-text query, then call get_post_details with the returned token to retrieve a full listing record including price, description, geo-coordinates, item properties, and image URLs.

This call costs1 credit / call— charged only on success
Try it
City slug for filtering posts. Accepted values: tehran, mashhad, karaj, shiraz, isfahan, ahvaz, tabriz, kermanshah, qom, rasht. Alternatively, pass a numeric city ID directly.
Maximum number of posts to return from the search results.
Free-text search query to match against post titles and descriptions. Empty string returns all recent posts.
Category slug to filter results. Use ROOT for all categories. Examples of category slugs: personal, clothing-and-shoes, clothing, vehicles, real-estate, digital-goods, home-kitchen, services, entertainment, industrial, jobs.
api.parse.bot/scraper/e66fc77c-35ea-444e-9f3a-be2eb642d380/<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 POST 'https://api.parse.bot/scraper/e66fc77c-35ea-444e-9f3a-be2eb642d380/search_posts' \
  -H 'X-API-Key: $PARSE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "city": "tehran",
  "limit": "10",
  "query": "موبایل",
  "category": "ROOT"
}'
All endpoints · 2 totalmissing one? ·

Search and list classified ad posts on Divar. Accepts a city slug, optional free-text query, and category filter. Returns a list of post summaries including title, price text, location, and image info. Results are sorted by newest first. Each post carries a token usable with get_post_details for the full listing.

Input
ParamTypeDescription
citystringCity slug for filtering posts. Accepted values: tehran, mashhad, karaj, shiraz, isfahan, ahvaz, tabriz, kermanshah, qom, rasht. Alternatively, pass a numeric city ID directly.
limitintegerMaximum number of posts to return from the search results.
querystringFree-text search query to match against post titles and descriptions. Empty string returns all recent posts.
categorystringCategory slug to filter results. Use ROOT for all categories. Examples of category slugs: personal, clothing-and-shoes, clothing, vehicles, real-estate, digital-goods, home-kitchen, services, entertainment, industrial, jobs.
Response
{
  "type": "object",
  "fields": {
    "posts": "array of post summary objects",
    "total_returned": "integer"
  },
  "sample": {
    "posts": [
      {
        "city": "تهران",
        "title": "سامسونگa07بنفش پک چین",
        "token": "Qa0ndl5h",
        "district": "آذری",
        "has_chat": true,
        "red_text": "پله شده",
        "image_url": "https://s100.divarcdn.com/static/photo/neda/webp_thumbnail/mwCrBQIeHkxQrSBiR7_qLw/8d89d358-f70d-4e31-96a9-96d5d6a6f75b.webp",
        "image_count": 2,
        "top_description": "نو",
        "bottom_description": "در آذری",
        "middle_description": "۲۲,۰۰۰,۰۰۰ تومان"
      }
    ],
    "total_returned": 5
  }
}

About the Divar API

Search and Browse Listings

search_posts accepts three optional filters: a city slug (e.g. tehran, mashhad, tabriz), a category slug (e.g. personal, clothing-a, or ROOT for all categories), and a free-text query string matched against post titles and descriptions. Results are sorted newest-first and include a summary object per post with title, price text, location label, and image info. A limit parameter controls how many posts are returned. Each summary object carries a token field required by the detail endpoint.

Retrieve Full Listing Details

get_post_details takes a single required token string (obtained from search_posts results) and returns a structured record for that listing. Response fields include title, description, price (integer or null), city, district, status, a properties object of key-value attribute pairs (condition, item type, and other category-specific attributes), an images array with both url and thumbnail_url per image, and a location object with latitude and longitude when available.

Coverage and Scope

City coverage includes the eight slugs explicitly supported: tehran, mashhad, karaj, shiraz, isfahan, ahvaz, tabriz, and kerman. Category filtering uses Divar's own slug system; passing ROOT returns listings across all categories. Posts that have been removed or expired may return a non-active status. The properties object varies by listing category — a vehicle listing will carry different attributes than a real-estate or clothing listing.

Reliability & maintenanceVerified

The Divar API is a managed, monitored endpoint for divar.ir — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when divar.ir 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 divar.ir 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.

Last verified
3d ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
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
  • Monitor price trends for a specific product category in Tehran or Mashhad by periodically calling search_posts
  • Build a cross-city price comparison tool using the price field returned by get_post_details
  • Aggregate geo-tagged listings using the latitude and longitude in the location object for a map-based classifieds browser
  • Track new listings in a category by querying search_posts sorted by newest-first and diffing tokens
  • Extract structured item attributes from the properties object to populate a product database
  • Collect thumbnail and full-resolution image URLs from the images array for visual listing previews
  • Feed listing titles and descriptions into a search index for a localized Iranian classifieds aggregator
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 Divar.ir have an official developer API?+
Divar does not publish a general-purpose public developer API. Access to listing data for third-party developers is not officially documented or available through a supported developer program.
What does get_post_details return beyond what search_posts provides?+
search_posts returns a summary per listing: title, price text, location label, and image info. get_post_details returns the full record for a single token: the integer price field, full description text, district, city, status, a properties object with category-specific key-value attributes, full-resolution and thumbnail image URLs, and a location object with latitude and longitude where available.
Which cities are supported, and can I search nationwide?+
The city parameter accepts eight slugs: tehran, mashhad, karaj, shiraz, isfahan, ahvaz, tabriz, and kerman. There is no current nationwide or all-cities parameter. You can fork the API on Parse and revise it to add support for additional city slugs if your use case requires other regions.
Does the API return seller contact information such as phone numbers?+
No seller contact details (phone numbers, usernames, or profile links) appear in the current response fields for either endpoint. The API covers listing content, attributes, images, and location. You can fork it on Parse and revise to add a contact-info endpoint if that data is accessible on individual listing pages.
How does pagination work for search_posts?+
search_posts exposes a limit parameter to control how many posts are returned in a single call. There is no cursor or page offset parameter currently exposed. If your use case requires paginated access to large result sets, you can fork the API on Parse and revise it to add offset-based or cursor-based pagination.
Page content last updated . Spec covers 2 endpoints from divar.ir.
Related APIs in MarketplaceSee all →
ebay.com API
Search and monitor eBay listings across any category, with support for active and completed/sold listings. Retrieve item details, pricing history, seller profiles and feedback, and category data. Filter by keyword, category, condition, seller, and sort order to support price research, market analysis, and inventory monitoring.
psacard.com API
Look up PSA certification details for graded collectible cards and search comprehensive population reports and price guides across all card categories. Browse collectible categories by set to discover grading data, pricing information, and population statistics.
blocket.se API
Search and browse second-hand items, cars, and housing listings across Blocket.se and Qasa.se, then retrieve detailed information about any listing that interests you. Get instant access to comprehensive product details, pricing, and categorized inventory across multiple marketplaces in one unified interface.
jp.mercari.com API
Search and browse millions of product listings on Mercari Japan with bilingual support, filtering by categories and getting detailed pricing, item specifications, and seller information. Access comprehensive marketplace data including product summaries, category overviews, and individual seller profiles to find exactly what you're looking for.
etsy.com API
Discover what shoppers are searching for on Etsy by accessing real-time trending keywords and popular search terms that can help you identify market demand and optimize your product listings. Get instant access to autocomplete suggestions and "Popular right now" trends to stay ahead of customer interests and improve your shop's visibility.
mercadolibre.com API
Search and retrieve product listings, details, customer reviews, categories, and current deals from MercadoLibre across multiple countries to find the best products and prices. Get comprehensive product information including specifications and user feedback to make informed purchasing decisions.
willhaben.at API
Search and browse listings across Austria's largest classifieds platform. Access marketplace goods, real estate (for sale and rent), cars, jobs, and full listing details — all from a single API.
auctions.yahoo.co.jp API
Search active and completed Yahoo Auctions Japan listings, view detailed item information, and identify bargain deals by comparing current prices against market trends. Analyze seller profiles to make informed bidding decisions on Japanese auction items.