# Jo Opensooq — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse classified listings on OpenSooq Jordan, discover product categories, and view detailed information about specific items for sale. Access real-time marketplace data to find exactly what you're looking for across multiple categories.

**Category:** Marketplaces | **Website:** [jo.opensooq.com/](https://jo.opensooq.com/) | **Docs:** [parse.bot/marketplace/c25d1faa-6e04-48a5-9267-767ba57e1d00/jo-opensooq-com-api](https://parse.bot/marketplace/c25d1faa-6e04-48a5-9267-767ba57e1d00/jo-opensooq-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-jo-opensooq-com-api-c25d1faa/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieves all top-level listing categories from the OpenSooq Jordan homepage. Each category has a name, full URL, and a slug usable with get_listings_by_category. The category set is relatively stable (Motors, Property, Jobs, Services, Electronics, etc.) but may shift as OpenSooq reorganizes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-jo-opensooq-com-api-c25d1faa/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_listing_detail

Fetches full details of a single listing by its numeric ID. Returns structured data extracted from the listing page's JSON-LD: title, price, currency, description, publish date, image URLs, location, and seller name. The listing_id comes from search_listings or get_listings_by_category results. A 404/410 indicates the listing was removed or expired.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | Numeric listing ID from search_listings or get_listings_by_category results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-jo-opensooq-com-api-c25d1faa/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"<string>"}'
```

### get_listings_by_category

Fetches listings for a given category slug. Returns listing IDs and URLs for the requested page. Category slugs come from get_categories (e.g. 'cars', 'electronics', 'mobile-phones-tablets'). Paginated by page number; page 1 is the default. A 404/410 means the slug is invalid or retired.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category slug from get_categories results (e.g. 'cars', 'electronics', 'mobile-phones-tablets', 'real-estate', 'home-garden') |
| `page` | integer | No | Page number for pagination |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-jo-opensooq-com-api-c25d1faa/get_listings_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","page":"<integer>"}'
```

### search_listings

Full-text search across all OpenSooq Jordan listings. Returns listing IDs and URLs matching the query. Paginated by page number. Server-side filtering is limited to the query term; results are ordered by relevance/recency as determined by the site.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |
| `query` | string | Yes | Search term (e.g. 'iPhone', 'Toyota', 'apartment') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-jo-opensooq-com-api-c25d1faa/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
