# Facebook Marketplace Vehicle Listings | $3/1,000 (`cmfapps/facebook-vehicle-listings`) Actor

Search Facebook Marketplace vehicle listings by keyword, location, price, and listing age. Export prices, photos, listing links, and optional vehicle and seller details. Pay $3 per 1,000 returned listings.

- **URL**: https://apify.com/cmfapps/facebook-vehicle-listings.md
- **Developed by:** [Cody F](https://apify.com/cmfapps) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 vehicle listing results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Marketplace Vehicle Listings

Search Facebook Marketplace's Vehicles category and export listing data for car
research, inventory monitoring, and vehicle price comparisons. Customers do not
need a Facebook login or Find & Flip API key.

### Quick start

Enter a search such as `Toyota Camry`, choose the maximum number of listings,
and start the Actor. Download the results as JSON, CSV, or Excel from the dataset.

```json
{"query":"Toyota Camry","searchZip":"49002","maxRadius":100,"maxResults":20,"collectAdditionalDetails":false}
```

### Search options

- **Query:** vehicle keywords, such as a make and model.
- **Location and radius:** optionally enter a US ZIP code and search radius.
- **Price, listing age, and sort:** narrow the search using the available filters.
- **Maximum results:** return up to 50 listings per run. Fewer may be available.
- **Additional details:** collect available descriptions, vehicle attributes, and
  seller information from listing pages. This takes longer; missing fields stay null.

### Results

Results include available titles, prices, locations, listing URLs, images, and
collection timestamps. Optional detail collection adds available descriptions,
vehicle attributes, and seller information. The dataset schema describes the
individual fields. The `OUTPUT` record summarizes the result count and whether
the run returned partial results.

Cards explicitly marked sold, pending, or unavailable are excluded. Results are
a snapshot: a seller can change availability after collection. Listings and
fields may be missing because of Facebook restrictions, limited search results,
or the run's time budget. Private messages and account credentials are excluded.
This Actor returns listing data; it does not calculate valuations or AI analyses.

### Pricing

**$3 per 1,000 returned listings ($0.003 per listing).** Billing uses the
`apify-default-dataset-item` event. There is no Actor start fee, and platform
usage is included in the listed customer price. Returned partial results are
charged at the same rate; a run returning no listings has no listing-result fee.

### Operator setup

The Actor dispatches through the existing Find & Flip internal queue with
`marketplace=facebook` and `searchType=vehicles`. Configure encrypted
`BACKEND_ACTOR_SECRET` and `BACKEND_BASE_URL`, deploy the corresponding backend,
and restart VEHICLE workers before offering the Actor to customers. Standard
SCRAPE workers do not claim these jobs. No database migration is required.

The publisher pays Apify platform usage and existing worker/proxy costs from
the revenue. No paid AI, OCR, valuation, or external data-provider API is used.

# Actor input Schema

## `query` (type: `string`):

Vehicle keyword, make, or model to search in the Vehicles category.

## `searchZip` (type: `string`):

Optional Marketplace location. If omitted, the worker account's current location is used.

## `maxRadius` (type: `integer`):

Search radius in miles when searchZip is supplied.

## `maxPrice` (type: `integer`):

Optional maximum listing price.

## `maxListingAgeHours` (type: `integer`):

Optional listing age filter.

## `sortBy` (type: `string`):

Facebook Marketplace sort order.

## `maxResults` (type: `integer`):

Maximum number of raw cards to return.

## `maxScrollSeconds` (type: `integer`):

Maximum seconds spent loading search cards.

## `collectAdditionalDetails` (type: `boolean`):

Open each result just like the normal listing-detail flow to collect its description, listed time, structured item or vehicle details, and seller profile, rating, and review data. This makes the run slower.

## `onlyNewListings` (type: `boolean`):

Return only listing IDs that this Apify user has not received in earlier completed runs of the same search. The first run returns all matching listings.

## `maxWaitSeconds` (type: `integer`):

Maximum backend wait in seconds. The quick-start input uses 240 seconds to leave time for result export within the five-minute automated test. Select a longer wait for larger searches.

## Actor input object example

```json
{
  "query": "Toyota Camry",
  "searchZip": "49002",
  "maxRadius": 50,
  "sortBy": "best_match",
  "maxResults": 5,
  "maxScrollSeconds": 15,
  "collectAdditionalDetails": false,
  "onlyNewListings": false,
  "maxWaitSeconds": 240
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "Toyota Camry",
    "searchZip": "49002",
    "maxRadius": 50,
    "sortBy": "best_match",
    "maxResults": 5,
    "maxScrollSeconds": 15,
    "collectAdditionalDetails": false,
    "onlyNewListings": false,
    "maxWaitSeconds": 240
};

// Run the Actor and wait for it to finish
const run = await client.actor("cmfapps/facebook-vehicle-listings").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "Toyota Camry",
    "searchZip": "49002",
    "maxRadius": 50,
    "sortBy": "best_match",
    "maxResults": 5,
    "maxScrollSeconds": 15,
    "collectAdditionalDetails": False,
    "onlyNewListings": False,
    "maxWaitSeconds": 240,
}

# Run the Actor and wait for it to finish
run = client.actor("cmfapps/facebook-vehicle-listings").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "Toyota Camry",
  "searchZip": "49002",
  "maxRadius": 50,
  "sortBy": "best_match",
  "maxResults": 5,
  "maxScrollSeconds": 15,
  "collectAdditionalDetails": false,
  "onlyNewListings": false,
  "maxWaitSeconds": 240
}' |
apify call cmfapps/facebook-vehicle-listings --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cmfapps/facebook-vehicle-listings"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/e9ueq7ob2seLF9sAk/builds/9Du1NzEjNmR6cDhab/openapi.json
