Haraj API & Scraper
Haraj API returns live Haraj data as clean JSON for haraj The primary endpoint, search, returns matching records including listing id, title, url path, price and null when the listing publishes none or when the rows two price witnesses disagree.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
Developers reach for it when they need to read second-hand listings, asking prices, seller inventory and country-specific listing ids without maintaining one-off scraping code or separate API contracts. If you were about to build or fix a Haraj scraper, this API is the maintained alternative — it returns the same data as clean JSON, with the proxies, rotation and anti-bot handling already solved. This page covers the live example, request shape, response shape and available actions: search, detail, user_listings, browse. Every request uses the same ReefAPI envelope, one API key and one shared credit pool, so it fits alongside the rest of your data stack.
Real request and response JSON
Captured from the indexed primary action, search, on .
{
"method": "POST",
"url": "https://api.reefapi.com/haraj/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"query": "كامري",
"per_page": 20
}
}{
"ok": true,
"meta": {
"api": "haraj",
"endpoint": "search",
"mode": "live",
"latency_ms": 947.6,
"record_count": 21,
"bytes": 52973,
"cache_hit": false,
"upstream_requests": 1,
"charged_credits": 1,
"version": "0.1.1",
"request_id": "221179b8467948b3",
"queue_ms": 3.4,
"fetched_at": "2026-11-03T17:32:04.763Z"
},
"data": {
"results": [
{
"listing_id": "191922799",
"title": "مسجل كامري وجيب لانكروزر",
"url": "https://haraj.com.sa/11191922799/مسجل_كامري_وجيب_لانكروزر/",
"url_path": "11191922799/مسجل_كامري_وجيب_لانكروزر/",
"price": null,
"price_display": null,
"currency": null,
"description": "مسجل كامري 2011 شغال\nمسجل جيب VXR1995 شغال\nتواصل \n( رقم الجوال يظهر عند الضغط على زر تواصل )",
"description_html": null,
"seller_username": "راكان 9944",
"seller_id": 3922066,
"seller_url": "https://haraj.com.sa/users/%D8%B1%D8%A7%D9%83%D8%A7%D9%86%209944/",
"city": "حفر الباطن",
"geo_city": "حفر الباطن",
"neighborhood": "الربوة",
"geohash": "tj09tm",
"tags": [
"حراج السيارات",
"قطع غيار وملحقات",
"مسجل"
],
"tag_filters": [],
"post_type": "AD",
"is_promoted": false,
"is_active": true,
"has_image": true,
"has_video": false,
"image": "https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/832x1800_1595D683-59BD-4E81-89BD-AA0F02BF39FA.jpg",
"images": [
"https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/832x1800_1595D683-59BD-4E81-89BD-AA0F02BF39FA.jpg",
"https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/832x1800_2D6925C6-A0E3-4DB5-9D34-8F1C184EBDF1.jpg"
],
"image_count": 2,
"comment_count": 0,
"comments_enabled": true,
"comment_status": 0,
"up_rank": 1,
"down_rank": 0,
"posted_at": "2026-11-03T16:58:19Z",
"updated_at": "2026-11-03T16:58:19Z",
"posted_at_epoch": 1793725099,
"updated_at_epoch": 1793725099,
"car_info": null,
"real_estate_info": null,
"jobs_info": null,
"attributes": [],
"badges": [],
"store": null
},
{
"listing_id": "191922705",
"title": "كامري موديل 1998",
"url": "https://haraj.com.sa/11191922705/كامري_موديل_1998/",
"url_path": "11191922705/كامري_موديل_1998/",
"price": 2500,
"price_display": "2,500",
"currency": "SAR",
"description": "كامري أمريكي موديل 1998 مكينه شغاله البيع تشليح",
"description_html": null,
"seller_username": "عضو 6185726",
"seller_id": 16414611,
"seller_url": "https://haraj.com.sa/users/%D8%B9%D8%B6%D9%88%206185726/",
"city": "مكه",
"geo_city": "خليص",
"neighborhood": null,
"geohash": "sgujq9",
"tags": [
"حراج السيارات",
"تويوتا",
"كامري"
],
"tag_filters": [],
"post_type": "AD",
"is_promoted": false,
"is_active": true,
"has_image": true,
"has_video": false,
"image": "https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/1170x1563_2EC7BEB5-EB0A-4CA6-9938-59AC03894576.jpg",
"images": [
"https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/1170x1563_2EC7BEB5-EB0A-4CA6-9938-59AC03894576.jpg",
"https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/1170x1543_801E859F-2054-42A2-ABEF-2007F0993147.jpg"
],
"image_count": 2,
"comment_count": 0,
"comments_enabled": true,
"comment_status": 0,
"up_rank": 0,
"down_rank": 0,
"posted_at": "2026-11-03T16:56:58Z",
"updated_at": "2026-11-03T16:56:58Z",
"posted_at_epoch": 1793725018,
"updated_at_epoch": 1793725018,
"car_info": null,
"real_estate_info": null,
"jobs_info": null,
"attributes": [],
"badges": [],
"store": null
},
{
"listing_id": "191924239",
"title": "مسجل كامري 2017 وكاله مع الديكور نضيف",
"url": "https://haraj.com.sa/11191924239/مسجل_كامري_2017_وكاله_مع_الديكور_نضيف/",
"url_path": "11191924239/مسجل_كامري_2017_وكاله_مع_الديكور_نضيف/",
"price": null,
"price_display": null,
"currency": null,
"description": "المسجل نضيف وشرط شغال به بلتوث وايو اكس وصوت صافي شرط والديكور وكاله بعد",
"description_html": null,
"seller_username": "محمد ـ العنزي",
"seller_id": 12909497,
"seller_url": "https://haraj.com.sa/users/%D9%85%D8%AD%D9%85%D8%AF%20%D9%80%20%D8%A7%D9%84%D8%B9%D9%86%D8%B2%D9%8A/",
"city": "عرعر",
"geo_city": "عرعر",
"neighborhood": "المطار",
"geohash": "svt0k8",
"tags": [
"حراج السيارات",
"قطع غيار وملحقات",
"مسجل"
],
"tag_filters": [],
"post_type": "AD",
"is_promoted": false,
"is_active": true,
"has_image": true,
"has_video": false,
"image": "https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/1008x1792_ECEC817C-5613-4AA1-9E85-31C462578EB4.jpg",
"images": [
"https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/1008x1792_ECEC817C-5613-4AA1-9E85-31C462578EB4.jpg",
"https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/1008x1792_30995A6C-EF38-4667-8195-CA6566ACAC12.jpg",
"https://mimg6cdn.haraj.com.sa/userfiles30/2026-11-03/1008x1792_8DF5E273-1878-4C2F-9EFC-4F8711C86F3A.jpg"
],
"image_count": 4,
"comment_count": 0,
"comments_enabled": true,
"comment_status": 0,
"up_rank": 0,
"down_rank": 0,
"posted_at": "2026-11-03T17:17:52Z",
"updated_at": "2026-11-03T17:17:52Z",
"posted_at_epoch": 1793726272,
"updated_at_epoch": 1793726272,
"car_info": null,
"real_estate_info": null,
"jobs_info": null,
"attributes": [],
"badges": [],
"store": null
}
],
"count": 21,
"page": 1,
"per_page": 20,
"page_overlaps_previous": false,
"has_next_page": true,
"price_disagreements": 0,
"query": "كامري",
"lang": "ar"
}
}What the Haraj API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| search | Search Haraj listings by Arabic keyword and/or tag, up to 60 per page: listing id, title, URL, price in riyal with the source's own formatted string beside it, the ad body, city / neighbourhood / geohash, tags, photos, comment counts, posting and update times, the public seller handle, and the category blocks Haraj publishes (car details, REGA real-estate licence numbers, job offer details, free-form attributes). Filter by city, tag, excluded tag, photos-only, video-only and private-sellers-only, and order strictly by newest listing id. Give at least `query` or `tag`. Listings are written in Arabic — an Arabic keyword matches far more than its Latin spelling. | Price-intelligence teams call search to search Haraj listings by Arabic keyword and/or tag, up to 60 per page. | query, tag, tags, not_tag, city, ... |
| detail | One Haraj listing (or up to 20 at once) by listing number or listing URL, with every field the search rows carry: the full ad body, price, city and neighbourhood, all photos, tags, comment counts, posting and update times, the public seller handle, and the car / real-estate / jobs blocks where Haraj publishes them. A listing that was removed or never existed answers NOT_FOUND. | Classifieds aggregators call detail to get one Haraj listing (or up to 20 at once) by listing number or listing URL, with every field th…. | listing_id, lang |
| user_listings | Every currently live ad posted by one Haraj seller, newest first, by the seller's public handle: the same listing shape as search, with city, tag and photo filters and paging. Useful for watching a dealer's inventory or a shop's price moves. The seller is identified by the handle and numeric id Haraj publishes on each ad. | Resale and arbitrage tools call user_listings to get every currently live ad posted by one Haraj seller, newest first, by the seller's public handle. | username, city, cities, tag, not_tag, ... |
| browse | Browse the newest Haraj listings without a keyword — the whole site, one tag, one city, or a tag and city together — in the site's own newest-first order. Same listing shape as search. Use this to poll a section for new ads; use `search` when you have a keyword. | Lead-generation teams call browse to get browse the newest Haraj listings without a keyword. | tag, not_tag, city, cities, only_with_image, ... |
| comments | Every public comment on one Haraj listing, by listing number or URL, oldest first: comment id, the commenter's public Haraj handle, numeric id and profile link, the comment text exactly as posted (prices, offers and phone numbers included), the date, and the id of the comment it replies to. Also the de-duplicated list of people who commented, the listing's own comment count and its title. Comments Haraj hides from the public (private replies, deleted ones) are kept, flagged `is_hidden`, with Haraj's own placeholder text. A listing with no comments is an empty list; a removed listing answers NOT_FOUND. | Price-intelligence teams call comments to get every public comment on one Haraj listing, by listing number or URL, oldest first. | listing_id, sort |
| trending_keywords | Haraj's own trending search keywords over the last N days, in Arabic, with the site's own score for each — what Saudi buyers are actually searching for right now. | Classifieds aggregators call trending_keywords to get haraj's own trending search keywords over the last N days, in Arabic, with the site's own sco…. | days, lang |
Call search from your stack
curl -X POST https://api.reefapi.com/haraj/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"query":"كامري","per_page":20}'import os
import requests
REEF_KEY = os.environ["REEF_KEY"]
r = requests.post(
"https://api.reefapi.com/haraj/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"query": "كامري",
"per_page": 20
},
timeout=90,
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/haraj/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"query": "كامري",
"per_page": 20
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.haraj.search with {"query":"كامري","per_page":20}.Who uses this API and why
- Price-intelligence teams use Haraj to search Haraj listings by Arabic keyword and/or tag, up to 60 per page.
- Classifieds aggregators use Haraj to get one Haraj listing (or up to 20 at once) by listing number or listing URL, with every field th….
- Resale and arbitrage tools use Haraj to get every currently live ad posted by one Haraj seller, newest first, by the seller's public handle.
- Lead-generation teams use Haraj to get browse the newest Haraj listings without a keyword.
- Price-intelligence teams use Haraj to get every public comment on one Haraj listing, by listing number or URL, oldest first.
Questions developers ask before integrating
What is the Haraj API?
Haraj API is a ReefAPI endpoint group for haraj It returns live JSON through POST requests under /haraj/v1.
Is the Haraj API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. Haraj calls use the same shared credit balance as every other ReefAPI engine.
Do I need a Haraj login or account?
No login to Haraj is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Haraj data?
The page example is captured from a live search call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Haraj API use?
Haraj actions currently cost 1 credit per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.
Can I call Haraj from an AI assistant or MCP client?
Yes. Connect ReefAPI once through MCP and your assistant can call haraj actions with the same key, credit pool and JSON envelope used by normal REST requests.
Is the Haraj API a Haraj scraper?
It is the managed alternative to a DIY Haraj scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same haraj back as clean JSON.
Why does my Haraj scraper keep getting blocked?
Most Haraj scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked calls are free.