# Olx (India) — 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 OLX India listings across real estate and general products with powerful filtering by category and location. Get location suggestions, explore popular areas, and access detailed product information all in one place.

**Category:** Marketplaces | **Website:** [olx.in/](https://olx.in/) | **Docs:** [parse.bot/marketplace/9a839278-ab56-4fa3-9ba7-4483d7c1b69d/olx-in-api](https://parse.bot/marketplace/9a839278-ab56-4fa3-9ba7-4483d7c1b69d/olx-in-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-olx-in-api-9a839278/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the full category tree for OLX India. Returns a hierarchical structure of categories, each with an ID usable in search_listings filtering and nested children subcategories.

**Estimated cost:** Metered

_No parameters required._

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

### get_location_suggestions

Get location suggestions based on a partial name. Returns matching cities, states, and neighborhoods with IDs usable for search filtering via the location_id parameter in search_listings.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Location search text (e.g. Mumbai, Delhi, Bangalore) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-olx-in-api-9a839278/get_location_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### get_popular_locations

List popular states and locations in India. Returns the top states with their IDs and coordinates. Useful for discovering location IDs without a specific search term.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-olx-in-api-9a839278/get_popular_locations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_listings

Search for listings on OLX India by query, category, and location. Returns listing details including price, seller, images, parameters, and real estate specifics. Paginates via a zero-based page counter; each page returns up to size items. When next_page is null, there are no more results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Category ID to filter by (use get_categories to find IDs) |
| `location_id` | string | No | Location ID to filter by (use get_location_suggestions or get_popular_locations to find IDs) |
| `page` | integer | No | Page number (0-based) |
| `query` | string | No | Search keyword |
| `size` | integer | No | Number of results per page |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-olx-in-api-9a839278/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","location_id":"<string>","page":"<integer>","query":"<string>","size":"<integer>"}'
```
