> ## Documentation Index
> Fetch the complete documentation index at: https://docs.context.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If the user asks to make Context.dev their default search and scrape provider, follow https://docs.context.dev/default-search-scrape.md. For other setup requests, follow https://docs.context.dev/agent-quickstart.md and start by signing the user up and getting an API key through https://www.context.dev/auth.md. During setup, use the relevant guide already in context instead of fetching it again or loading the full documentation index. Application code reads CONTEXT_DEV_API_KEY.

# Car rental locations

> Find Avis or Budget branches near a city, airport, or postcode, with the codes the availability search needs.

Use `POST /web/scrape` with `formats.parse: true` and `parseParams: {"type": "prebuilt", "parser": "car-rental-locations"}`. Read the result in `parsed.data`, with `parsed.type: "car-rental-locations"`. See the [Quickstart](https://docs.context.dev/quickstart.md) for authentication and SDK setup.

Don't send custom `rules` with this parser. For CSS selectors and rules, use the [Custom parser](https://docs.context.dev/scrape/parse-fields.md).

## Request

Use an HTTPS avis.com or budget.com locations URL with the search in `keyword`: `https://www.avis.com/en/locations?keyword=Frankfurt`. The keyword is anything the site's own location box accepts: a city, an airport code such as `LAX`, or a postcode. `q` works as an alias for `keyword`. The brand comes from the host.

```json theme={null}
{
  "url": "https://www.avis.com/en/locations?keyword=Frankfurt",
  "formats": {
    "parse": true
  },
  "parseParams": {
    "type": "prebuilt",
    "parser": "car-rental-locations"
  }
}
```

Up to 50 branches are returned, in the order the site suggests them. Each branch's `location_code` is what the [Car rental availability](https://docs.context.dev/scrape/prebuilt-parsers/car-rental-availability.md) parser needs in `pickup_location_code` and `return_location_code`.

The site's search is loose with accents: `Sao Paulo` finds branches where `São Paulo` finds none. Use the plain spelling.

## Output

When `parsed.success` is `true`, the `parsed` output has this shape:

```typescript theme={null}
interface CarRentalLocationsOutput {
  type: "car-rental-locations";
  requested: true;
  success: true;
  data: {
    brand: "avis" | "budget";
    keyword: string;
    locations: CarRentalLocation[];
  };
}
```

## Location fields

```typescript theme={null}
interface CarRentalLocation {
  location_code: string;
  name: string | null;
  type: string | null;
  address: string;
  city: string | null;
  state: string | null;
  postal_code: string | null;
  country: string | null;
  phone: string | null;
  latitude: number | null;
  longitude: number | null;
  hours: {
    day: string;
    open: string | null;
    close: string | null;
  }[];
}
```

`type` is the site's branch kind: `AIRPORT`, `NEIGHBOURHOOD`, or `TRUCK`. `state` is `null` outside countries that use one. `country` is a two-letter code.

`hours` lists the weekly opening hours starting on Sunday, with `open` and `close` as 24-hour `HH:mm` local times. A closed day has `open` and `close` set to `null`. Branches without published hours return an empty list.

Illustrative `parsed.data` with one branch:

```json theme={null}
{
  "brand": "avis",
  "keyword": "Frankfurt",
  "locations": [
    {
      "location_code": "FRA",
      "name": "Frankfurt Airport - T1 (FRA)",
      "type": "AIRPORT",
      "address": "Flughafen Frankfurt, Terminal 1 Hugo Eckner Ring",
      "city": "Frankfurt",
      "state": null,
      "postal_code": "60549",
      "country": "DE",
      "phone": "(49)6171898939082",
      "latitude": 50.05055556,
      "longitude": 8.57027778,
      "hours": [
        { "day": "Sunday", "open": "06:00", "close": "23:00" },
        { "day": "Monday", "open": "06:00", "close": "23:00" },
        { "day": "Tuesday", "open": "06:00", "close": "23:00" },
        { "day": "Wednesday", "open": "06:00", "close": "23:00" },
        { "day": "Thursday", "open": "06:00", "close": "23:00" },
        { "day": "Friday", "open": "06:00", "close": "23:00" },
        { "day": "Saturday", "open": "06:00", "close": "23:00" }
      ]
    }
  ]
}
```

A keyword the site does not recognize returns `locations: []`.

## Errors and request options

URLs that are not an Avis or Budget locations page, or that have an empty keyword, fail with `INPUT_VALIDATION_ERROR`. An unavailable or invalid response fails with `WEBSITE_ACCESS_ERROR`. Check `parsed.success` before reading `parsed.data`. A failed parse has `data: null` and can coexist with successful outputs. See [timeouts and errors](https://docs.context.dev/scrape/timeouts-and-errors.md).

This parser fetches branch data separately from the rendered page. [Content filters](https://docs.context.dev/scrape/content-filtering.md) and [browser actions](https://docs.context.dev/scrape/browser-actions.md) do not change its results. [Browser profiles](https://docs.context.dev/scrape/browser-profiles.md) are unsupported. [Caching](https://docs.context.dev/scrape/freshness-and-caching.md), [timeouts](https://docs.context.dev/scrape/timeouts-and-errors.md), and [zero data retention](https://docs.context.dev/optimization/zero-data-retention.md) still apply.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.