[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-post-web-scraping-expedia-en":3},{"post":4,"faq":33,"faqLdJson":57,"faqLdJsonScript":85,"alternatePaths":86,"recommendations":89,"contentLocale":20},{"authors":5,"custom_excerpt":13,"excerpt":13,"feature_image":14,"featured":15,"id":16,"meta_description":13,"meta_title":17,"og_description":8,"og_image":8,"og_title":8,"primary_author":18,"primary_tag":19,"published_at":22,"reading_time":23,"slug":24,"status":25,"tags":26,"title":17,"twitter_description":8,"twitter_image":8,"twitter_title":31,"updated_at":22,"visibility":21,"lexical":32},[6],{"bio":7,"facebook":8,"instagram":8,"linkedin":8,"location":9,"name":10,"profile_image":11,"slug":12,"tiktok":8,"twitter":8,"website":8,"youtube":8},"At Rola IP, Marcus Bennett writes about proxy use in data collection and automation, covering Scrapy, Playwright, Puppeteer, and HTTP clients, with a focus on reducing blocks and improving workflow stability.",null,"Marcus Bennett在Rola IP负责代理IP在数据采集与自动化访问场景中的应用内容，重点撰写Scrapy、Playwright、Puppeteer及HTTP客户端的代理接入、封禁规避和稳定性优化。","Marcus Bennett","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F07\u002FPixPin_2026-07-21_14-44-14.png","marcus","Learn web scraping Expedia with Python and Rapid API: find hotel IDs, join names and prices, export CSV, and set up proxies for regional website checks.","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002FWeb-Scraping-Expedia-article-cover-image.webp",false,"6ad073f34956c90001bf182f","Web Scraping Expedia with Python: Hotel Data to CSV",{"bio":7,"facebook":8,"instagram":8,"linkedin":8,"location":9,"name":10,"profile_image":11,"slug":12,"tiktok":8,"twitter":8,"website":8,"youtube":8},{"description":8,"feature_image":8,"name":20,"slug":20,"visibility":21},"en","public","2026-10-15T07:03:57.000Z",19,"web-scraping-expedia","published",[27,28],{"description":8,"feature_image":8,"name":20,"slug":20,"visibility":21},{"description":8,"feature_image":8,"name":29,"slug":30,"visibility":21},"教程","guides","Web Scraping Expedia","{\"root\":{\"children\":[{\"type\":\"markdown\",\"version\":1,\"markdown\":\"**Web scraping Expedia** starts with choosing a data source for the hotel listings, availability, and prices you need. This tutorial builds a Python Expedia scraper workflow that gets hotel IDs from a destination, joins hotel names with room rates, and exports JSON and CSV. It uses Expedia Rapid for the data pipeline and shows where Rola IP fits into regional website checks.\\n\\nRun the included sample first to create a hotel-price spreadsheet without credentials. With a Rapid account, the same script can retrieve a region's properties, fetch their hotel details, and request rates for your selected dates.\\n\\n## Key Takeaways\\n\\n- Use Geography to find hotel IDs, Content for hotel details, and Shopping for rates and availability.\\n- Export hotel names with dates, occupancy, currency, refundability, and a consistent price field.\\n- Start with one room and a small property batch; the example selects up to 10 properties by default.\\n- Use a proxy when a regional website check needs a controlled network origin. Rapid's point-of-sale parameters are a separate control.\\n- Keep one session across related steps, verify the exit before collecting, and measure useful records rather than request counts.\\n\\n## What Will Your Expedia Scraper Export?\\n\\nThe local example produces this hotel-rate row:\\n\\n| Hotel | Property ID | Stay | Guests | Inclusive stay total | Currency | Refundability |\\n|---|---|---|---|---:|---|---|\\n| Example City Hotel | 19248 | Nov 10–12, 2026 | 2 adults, 1 room | 342.00 | USD | refundable |\\n\\nThe JSON and CSV also include the room and rate IDs, other available totals, country code, language, processing time, source, and query hash. An error file records unavailable properties or incomplete rates. The sample destination, hotel names, and prices are illustrative.\\n\\nThis structure supports hotel price monitoring, availability research, and comparisons between equivalent offers. A row represents a room rate for a stay, so one hotel can produce several rows. It does not represent a confirmed booking or an average nightly rate.\\n\\n## Expedia Scraping: API or Browser?\\n\\nChoose the method that matches the data you need and the access available to your integration.\\n\\n| Method | Useful when | What you get | Main requirement |\\n|---|---|---|---|\\n| Expedia Rapid APIs | Building a hotel catalog, availability tool, or partner rate workflow | Structured property details and rates | Rapid account and enabled API products |\\n| Licensed data feed | Running recurring analysis over an agreed dataset | Bulk records on a delivery schedule | A feed agreement covering the needed fields |\\n| Browser automation | Checking how a permitted hotel page renders for a region or session | Visible page content and display behavior | Permission to automate the page; maintained selectors |\\n\\nThe walkthrough below uses Rapid because the property IDs, hotel details, and price fields can be joined explicitly. Browser collection needs a different parser and may show different offers from a partner API. The comparison of [API access and browser scraping](https:\u002F\u002Frola-ip.co\u002Fblog\u002Fweb-scraping-vs-api\u002F) explains the maintenance trade-offs.\\n\\nUse the access method and data covered by your partner agreement and Expedia's \u003Ca href=\\\"https:\u002F\u002Fwww.expedia.com\u002Flegal\u002Fterms\\\" rel=\\\"nofollow\\\">Terms of Service\u003C\u002Fa>.\\n\\n## Which Expedia Data Comes from Each API?\\n\\n| Stage | Endpoint | Fields used in this tutorial |\\n|---|---|---|\\n| Destination catalog | `GET \u002Fv3\u002Fregions\u002F{region_id}` | Region's `property_ids` |\\n| Hotel details | `GET \u002Fv3\u002Fproperties\u002Fcontent` | `property_id` and `name` |\\n| Availability and prices | `GET \u002Fv3\u002Fproperties\u002Favailability` | Rooms, rates, refundability, occupancy prices, unavailable reasons |\\n\\nThe \u003Ca href=\\\"https:\u002F\u002Fa.travel-assets.com\u002Fdocumentation-hubs\u002Fprod\u002Frapid\u002Flatest\u002Fen-US\u002Fassets\u002Frapid-3-specs.yaml\\\" rel=\\\"nofollow\\\">Rapid API specification\u003C\u002Fa> documents these endpoints and their response shapes. Content returns an object keyed by Property ID; Shopping returns an array of property results. The script joins them using that ID rather than relying on array order.\\n\\nExpedia's \u003Ca href=\\\"https:\u002F\u002Fdevelopers.expediagroup.com\u002Frapid\u002Flodging\u002Fshopping\u002Fabout-shopping-api?locale=en_US\\\" rel=\\\"nofollow\\\">Shopping documentation\u003C\u002Fa> specifies up to 250 properties and no more than eight rooms per Shopping request. Shopping does not supply static names, star ratings, or geography. This tutorial maps one room; a multi-room integration must also preserve room multiplicity when the same occupancy appears more than once.\\n\\n![Web scraping Expedia workflow from destination and hotel IDs to names, rates, and CSV export](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002F08-hotel-data-workflow.webp)\\n\\n*Follow the destination-to-CSV workflow, or start with the included local sample.*\\n\\n## How to Scrape Expedia with Python\\n\\nTo scrape Expedia data into a hotel-price spreadsheet, follow the steps below: run the local sample, configure Rapid access, select a destination, and export its hotel names and rates. The example uses Python 3.12.10 and HTTPX 0.28.1 on Windows 10, with the same mapping and export functions for local data and API responses.\\n\\n### Step 1: Install HTTPX\\n\\nCreate a project directory and virtual environment:\\n\\n```bash\\nmkdir expedia-hotels\\ncd expedia-hotels\\npython -m venv .venv\\n```\\n\\nActivate it in PowerShell:\\n\\n```powershell\\n.\\\\.venv\\\\Scripts\\\\Activate.ps1\\n```\\n\\nOr in macOS\u002FLinux Bash:\\n\\n```bash\\nsource .venv\u002Fbin\u002Factivate\\n```\\n\\nInstall the dependency:\\n\\n```bash\\npython -m pip install httpx==0.28.1\\n```\\n\\n### Step 2: Save the sample destination, hotels, and rates\\n\\nSave the following as `sample-data.json` in your project directory. It contains two hotel IDs, their names, one available rate, and one unavailable-property result. The three sections model the Geography → Content → Shopping flow. You can leave this sample unchanged for the local exercise; Step 6 shows how to obtain IDs for your own destination.\\n\\n```json\\n{\\n  \\\"region\\\": {\\n    \\\"id\\\": \\\"SAMPLE-REGION\\\",\\n    \\\"name\\\": \\\"Sample destination\\\",\\n    \\\"property_ids\\\": [\\n      \\\"19248\\\",\\n      \\\"824739\\\"\\n    ]\\n  },\\n  \\\"content\\\": {\\n    \\\"19248\\\": {\\n      \\\"property_id\\\": \\\"19248\\\",\\n      \\\"name\\\": \\\"Example City Hotel\\\"\\n    },\\n    \\\"824739\\\": {\\n      \\\"property_id\\\": \\\"824739\\\",\\n      \\\"name\\\": \\\"Example Park Hotel\\\"\\n    }\\n  },\\n  \\\"shopping\\\": [\\n    {\\n      \\\"property_id\\\": \\\"19248\\\",\\n      \\\"status\\\": \\\"available\\\",\\n      \\\"rooms\\\": [\\n        {\\n          \\\"id\\\": \\\"ROOM-QUEEN\\\",\\n          \\\"room_name\\\": \\\"Example Queen Room\\\",\\n          \\\"rates\\\": [\\n            {\\n              \\\"id\\\": \\\"RATE-REFUNDABLE\\\",\\n              \\\"status\\\": \\\"available\\\",\\n              \\\"current_refundability\\\": \\\"refundable\\\",\\n              \\\"occupancy_pricing\\\": {\\n                \\\"2\\\": {\\n                  \\\"totals\\\": {\\n                    \\\"exclusive\\\": {\\n                      \\\"request_currency\\\": {\\n                        \\\"value\\\": \\\"310.00\\\",\\n                        \\\"currency\\\": \\\"USD\\\"\\n                      }\\n                    },\\n                    \\\"inclusive\\\": {\\n                      \\\"request_currency\\\": {\\n                        \\\"value\\\": \\\"342.00\\\",\\n                        \\\"currency\\\": \\\"USD\\\"\\n                      }\\n                    },\\n                    \\\"property_inclusive\\\": {\\n                      \\\"request_currency\\\": {\\n                        \\\"value\\\": \\\"350.00\\\",\\n                        \\\"currency\\\": \\\"USD\\\"\\n                      }\\n                    }\\n                  }\\n                }\\n              }\\n            }\\n          ]\\n        }\\n      ]\\n    },\\n    {\\n      \\\"property_id\\\": \\\"824739\\\",\\n      \\\"score\\\": 12345,\\n      \\\"unavailable_reason\\\": {\\n        \\\"code\\\": \\\"adults_exceed_threshold\\\",\\n        \\\"data\\\": \\\"2\\\"\\n      }\\n    }\\n  ]\\n}\\n```\\n\\n### Step 3: Save the complete hotel scraper\\n\\nSave this code as `expedia_hotels.py` beside the JSON file. Without `--api`, it reads the sample. In API mode, it looks up properties for a Region ID or uses the Property IDs supplied on the command line, retrieves hotel names, and fetches rates.\\n\\n```python\\nimport argparse\\nimport csv\\nimport hashlib\\nimport json\\nimport os\\nimport re\\nimport time\\nfrom datetime import date, datetime, timezone\\nfrom decimal import Decimal, InvalidOperation\\nfrom pathlib import Path\\nfrom uuid import uuid4\\n\\nimport httpx\\n\\nROOT = Path(__file__).resolve().parent\\nSEARCH = {\\n    \\\"checkin\\\": \\\"2026-11-10\\\", \\\"checkout\\\": \\\"2026-11-12\\\",\\n    \\\"currency\\\": \\\"USD\\\", \\\"country_code\\\": \\\"US\\\", \\\"language\\\": \\\"en-US\\\",\\n    \\\"occupancy\\\": [\\\"2\\\"], \\\"rate_plan_count\\\": \\\"1\\\",\\n    \\\"sales_channel\\\": \\\"website\\\", \\\"sales_environment\\\": \\\"hotel_only\\\",\\n    \\\"include\\\": [\\\"rooms.rates.current_refundability\\\", \\\"unavailable_reason\\\"],\\n}\\n\\n\\ndef nonempty(value, field):\\n    if not isinstance(value, str) or not value.strip():\\n        raise ValueError(f\\\"missing or invalid {field}\\\")\\n    return value\\n\\n\\ndef property_ids(values):\\n    if not isinstance(values, list) or not values:\\n        raise ValueError(\\\"property_ids must be a non-empty list\\\")\\n    return list(dict.fromkeys(nonempty(v, \\\"property_id\\\") for v in values))\\n\\n\\ndef get_json(client, base, path, params):\\n    timestamp = int(time.time())\\n    key, secret = os.environ[\\\"RAPID_API_KEY\\\"], os.environ[\\\"RAPID_SHARED_SECRET\\\"]\\n    signature = hashlib.sha512(f\\\"{key}{secret}{timestamp}\\\".encode()).hexdigest()\\n    headers = {\\n        \\\"Authorization\\\": f\\\"EAN APIKey={key},Signature={signature},timestamp={timestamp}\\\",\\n        \\\"Accept\\\": \\\"application\u002Fjson\\\", \\\"Accept-Encoding\\\": \\\"gzip\\\",\\n        \\\"User-Agent\\\": \\\"HotelDataTutorial\u002F2.0\\\",\\n    }\\n    response = client.get(base + path, params=params, headers=headers)\\n    if response.status_code == 429:\\n        raise RuntimeError(f\\\"Rate limited; Retry-After={response.headers.get('Retry-After', 'not supplied')}\\\")\\n    if response.status_code in (401, 403):\\n        raise RuntimeError(f\\\"Rapid access failed: HTTP {response.status_code}\\\")\\n    response.raise_for_status()\\n    return response.json()\\n\\n\\ndef load_data(args):\\n    search = json.loads(json.dumps(SEARCH))\\n    if len(search[\\\"occupancy\\\"]) != 1:\\n        raise ValueError(\\\"this example maps one room per search\\\")\\n    if not args.api:\\n        if args.property_ids or args.region_id:\\n            raise ValueError(\\\"use --api with --property-ids or --region-id\\\")\\n        sample = json.loads((ROOT \u002F \\\"sample-data.json\\\").read_text(encoding=\\\"utf-8\\\"))\\n        ids = property_ids(sample[\\\"region\\\"][\\\"property_ids\\\"])\\n        search[\\\"property_id\\\"] = ids\\n        return sample[\\\"content\\\"], sample[\\\"shopping\\\"], search, \\\"sample\\\", len(ids)\\n\\n    checkin, checkout = date.fromisoformat(search[\\\"checkin\\\"]), date.fromisoformat(search[\\\"checkout\\\"])\\n    if checkin \u003C= date.today() or checkout \u003C= checkin:\\n        raise ValueError(\\\"set future checkin and later checkout dates in SEARCH\\\")\\n    base = os.environ.get(\\\"RAPID_BASE_URL\\\", \\\"https:\u002F\u002Ftest.ean.com\u002Fv3\\\").rstrip(\\\"\u002F\\\")\\n    if base not in {\\\"https:\u002F\u002Ftest.ean.com\u002Fv3\\\", \\\"https:\u002F\u002Fapi.ean.com\u002Fv3\\\"}:\\n        raise ValueError(\\\"unsupported Rapid endpoint\\\")\\n    with httpx.Client(timeout=httpx.Timeout(30, connect=10), trust_env=False) as client:\\n        if args.region_id:\\n            if not re.fullmatch(r\\\"[0-9]+\\\", args.region_id):\\n                raise ValueError(\\\"region-id must be a numeric Expedia Region ID\\\")\\n            region = get_json(client, base, f\\\"\u002Fregions\u002F{args.region_id}\\\", {\\n                \\\"language\\\": search[\\\"language\\\"], \\\"include\\\": \\\"property_ids\\\",\\n            })\\n            ids = property_ids(region[\\\"property_ids\\\"])\\n        elif args.property_ids:\\n            ids = property_ids([v.strip() for v in args.property_ids.split(\\\",\\\")])\\n        else:\\n            raise ValueError(\\\"API mode needs --region-id or --property-ids\\\")\\n        total = len(ids)\\n        search[\\\"property_id\\\"] = ids[:args.limit]\\n        content = get_json(client, base, \\\"\u002Fproperties\u002Fcontent\\\", {\\n            \\\"language\\\": search[\\\"language\\\"], \\\"supply_source\\\": \\\"expedia\\\",\\n            \\\"property_id\\\": search[\\\"property_id\\\"],\\n        })\\n        shopping = get_json(client, base, \\\"\u002Fproperties\u002Favailability\\\", search)\\n    source = \\\"rapid_production\\\" if base == \\\"https:\u002F\u002Fapi.ean.com\u002Fv3\\\" else \\\"rapid_test_endpoint\\\"\\n    return content, shopping, search, source, total\\n\\n\\ndef money(node, currency):\\n    value = Decimal(str(node[\\\"request_currency\\\"][\\\"value\\\"]))\\n    if not value.is_finite() or value \u003C= 0:\\n        raise ValueError(\\\"price must be finite and positive\\\")\\n    if node[\\\"request_currency\\\"][\\\"currency\\\"] != currency:\\n        raise ValueError(\\\"response currency differs from search currency\\\")\\n    return value\\n\\n\\ndef map_hotels(content, shopping, search, source):\\n    if not isinstance(content, dict) or not isinstance(shopping, list):\\n        raise ValueError(\\\"expected Content object and Shopping array\\\")\\n    occupancy, = search[\\\"occupancy\\\"]\\n    context = json.dumps(search, sort_keys=True, separators=(\\\",\\\", \\\":\\\"))\\n    query_hash = hashlib.sha256(context.encode()).hexdigest()\\n    captured = datetime.now(timezone.utc).isoformat()\\n    rows, errors, seen = [], [], set()\\n    expected = set(search[\\\"property_id\\\"])\\n    for prop in shopping:\\n        pid = \\\"unknown\\\"\\n        try:\\n            if not isinstance(prop, dict):\\n                raise ValueError(\\\"property must be an object\\\")\\n            pid = nonempty(prop.get(\\\"property_id\\\"), \\\"property_id\\\")\\n            if pid not in expected:\\n                raise ValueError(\\\"response property was not requested\\\")\\n            if pid in seen:\\n                raise ValueError(\\\"duplicate response property\\\")\\n            seen.add(pid)\\n            if prop.get(\\\"status\\\") != \\\"available\\\":\\n                reason = prop.get(\\\"unavailable_reason\\\") or {}\\n                code = reason.get(\\\"code\\\", \\\"not provided\\\") if isinstance(reason, dict) else \\\"invalid reason\\\"\\n                raise ValueError(f\\\"unavailable: {code}\\\")\\n            hotel = content[pid]\\n            if not isinstance(hotel, dict):\\n                raise ValueError(\\\"hotel content must be an object\\\")\\n            name = nonempty(hotel.get(\\\"name\\\"), \\\"hotel name\\\")\\n            if hotel.get(\\\"property_id\\\") != pid:\\n                raise ValueError(\\\"Content property ID mismatch\\\")\\n            rooms = prop.get(\\\"rooms\\\")\\n            if not isinstance(rooms, list) or not rooms:\\n                raise ValueError(\\\"rooms must be a non-empty array\\\")\\n        except (KeyError, TypeError, ValueError) as exc:\\n            errors.append({\\\"property_id\\\": pid, \\\"error\\\": str(exc)})\\n            continue\\n        for room in rooms:\\n            try:\\n                if not isinstance(room, dict):\\n                    raise ValueError(\\\"room must be an object\\\")\\n                rid = nonempty(room.get(\\\"id\\\"), \\\"room_id\\\")\\n                rates = room.get(\\\"rates\\\")\\n                if not isinstance(rates, list) or not rates:\\n                    raise ValueError(\\\"rates must be a non-empty array\\\")\\n            except ValueError as exc:\\n                errors.append({\\\"property_id\\\": pid, \\\"error\\\": str(exc)})\\n                continue\\n            for rate in rates:\\n                try:\\n                    if not isinstance(rate, dict):\\n                        raise ValueError(\\\"rate must be an object\\\")\\n                    rate_id = nonempty(rate.get(\\\"id\\\"), \\\"rate_id\\\")\\n                    if rate.get(\\\"status\\\") != \\\"available\\\":\\n                        raise ValueError(\\\"rate unavailable\\\")\\n                    totals = rate[\\\"occupancy_pricing\\\"][occupancy][\\\"totals\\\"]\\n                    exclusive = money(totals[\\\"exclusive\\\"], search[\\\"currency\\\"])\\n                    inclusive = money(totals[\\\"inclusive\\\"], search[\\\"currency\\\"])\\n                    broader = money(totals[\\\"property_inclusive\\\"], search[\\\"currency\\\"]) if \\\"property_inclusive\\\" in totals else None\\n                    if inclusive \u003C exclusive or (broader is not None and broader \u003C inclusive):\\n                        raise ValueError(\\\"totals need review: inconsistent price order\\\")\\n                    rows.append({\\n                        \\\"property_id\\\": pid, \\\"hotel_name\\\": name,\\n                        \\\"room_id\\\": rid, \\\"rate_id\\\": rate_id,\\n                        \\\"refundability\\\": rate.get(\\\"current_refundability\\\", \\\"unknown\\\"),\\n                        \\\"checkin\\\": search[\\\"checkin\\\"], \\\"checkout\\\": search[\\\"checkout\\\"],\\n                        \\\"occupancy\\\": occupancy, \\\"currency\\\": search[\\\"currency\\\"],\\n                        \\\"exclusive_total\\\": str(exclusive), \\\"inclusive_total\\\": str(inclusive),\\n                        \\\"property_inclusive_total\\\": str(broader) if broader is not None else None,\\n                        \\\"country_code\\\": search[\\\"country_code\\\"], \\\"language\\\": search[\\\"language\\\"],\\n                        \\\"processed_at_utc\\\": captured, \\\"source\\\": source,\\n                        \\\"mapper_version\\\": \\\"2.0.0\\\", \\\"query_hash\\\": query_hash,\\n                    })\\n                except (KeyError, TypeError, ValueError, InvalidOperation) as exc:\\n                    errors.append({\\\"property_id\\\": pid, \\\"room_id\\\": rid, \\\"error\\\": str(exc)})\\n    for pid in sorted(expected - seen):\\n        errors.append({\\\"property_id\\\": pid, \\\"error\\\": \\\"property absent from Shopping response\\\"})\\n    return rows, errors\\n\\n\\ndef csv_value(value):\\n    # Keep spreadsheet applications from interpreting text fields as formulas.\\n    if isinstance(value, str) and value.lstrip().startswith((\\\"=\\\", \\\"+\\\", \\\"-\\\", \\\"@\\\")):\\n        return \\\"'\\\" + value\\n    return value\\n\\n\\ndef export(rows, errors, search, source, available_ids):\\n    run_id = datetime.now(timezone.utc).strftime(\\\"%Y%m%dT%H%M%S\\\") + \\\"-\\\" + uuid4().hex[:8]\\n    output = ROOT \u002F \\\"output\\\" \u002F run_id\\n    output.mkdir(parents=True, exist_ok=False)\\n    for filename, data in [(\\\"hotels.json\\\", rows), (\\\"errors.json\\\", errors)]:\\n        (output \u002F filename).write_text(json.dumps(data, indent=2), encoding=\\\"utf-8\\\")\\n    fields = list(rows[0]) if rows else [\\\"property_id\\\", \\\"hotel_name\\\", \\\"rate_id\\\", \\\"currency\\\"]\\n    with (output \u002F \\\"hotels.csv\\\").open(\\\"w\\\", newline=\\\"\\\", encoding=\\\"utf-8-sig\\\") as stream:\\n        writer = csv.DictWriter(stream, fieldnames=fields)\\n        writer.writeheader()\\n        writer.writerows({k: csv_value(v) for k, v in row.items()} for row in rows)\\n    manifest = {\\\"status\\\": \\\"complete\\\", \\\"source\\\": source, \\\"query\\\": search,\\n                \\\"catalog_id_count\\\": available_ids, \\\"selected_id_count\\\": len(search[\\\"property_id\\\"]),\\n                \\\"valid_rates\\\": len(rows), \\\"issues\\\": len(errors)}\\n    (output \u002F \\\"run.json\\\").write_text(json.dumps(manifest, indent=2), encoding=\\\"utf-8\\\")\\n    return output\\n\\n\\ndef main():\\n    parser = argparse.ArgumentParser()\\n    parser.add_argument(\\\"--api\\\", action=\\\"store_true\\\")\\n    group = parser.add_mutually_exclusive_group()\\n    group.add_argument(\\\"--property-ids\\\")\\n    group.add_argument(\\\"--region-id\\\")\\n    parser.add_argument(\\\"--limit\\\", type=int, default=10)\\n    args = parser.parse_args()\\n    if not 1 \u003C= args.limit \u003C= 250:\\n        parser.error(\\\"--limit must be between 1 and 250\\\")\\n    content, shopping, search, source, total = load_data(args)\\n    rows, errors = map_hotels(content, shopping, search, source)\\n    output = export(rows, errors, search, source, total)\\n    print(f\\\"Source: {source}\\\")\\n    print(f\\\"Selected properties: {len(search['property_id'])} of {total}\\\")\\n    print(f\\\"Valid hotel rates: {len(rows)}; issues: {len(errors)}\\\")\\n    print(f\\\"Output: {output}\\\")\\n\\n\\nif __name__ == \\\"__main__\\\":\\n    main()\\n```\\n\\nThe mapper accepts only non-empty property, room, and rate IDs. It checks that hotel names match the requested properties and that every price uses the requested currency. For this comparison workflow, inconsistent total ordering is sent to the error file for review. A malformed rate is isolated so other valid rates can still be exported.\\n\\n### Step 4: Run the local example and open the CSV\\n\\n```bash\\npython expedia_hotels.py\\n```\\n\\nThe sample run returns:\\n\\n```text\\nSource: sample\\nSelected properties: 2 of 2\\nValid hotel rates: 1; issues: 1\\n```\\n\\n![CSV preview generated by the local Python example showing a hotel name, dates, stay total, currency, and refundability](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002F09-hotel-csv-output.webp)\\n\\n*Selected columns from the local example's generated CSV.*\\n\\nThe final line prints a new output directory for that run. Open the files inside it:\\n\\n| File | What to inspect |\\n|---|---|\\n| `hotels.csv` | Hotel names, dates, prices, currency, and refundability in a spreadsheet |\\n| `hotels.json` | The same records with their original text values |\\n| `errors.json` | Unavailable properties, missing data, and invalid price records |\\n| `run.json` | Completed-run status, source, full query, selected property count, and record counts |\\n\\nThe sample's error file contains `adults_exceed_threshold` for property `824739`. It is an unavailable-inventory result, not a failure to parse the available hotel.\\n\\nEach export goes to its own directory, so it does not overwrite an earlier run. Use a directory containing `run.json` with `status: complete`; an interrupted export may leave an incomplete directory. The mapper records `processed_at_utc`, which is when it processed the response, rather than claiming that sample data was fetched at that time.\\n\\n### Step 5: Connect your Rapid account\\n\\nRapid Lodging signs the concatenation of your API key, shared secret, and Unix timestamp with SHA-512. The same timestamp goes into the authorization header. The script implements this format using Expedia's \u003Ca href=\\\"https:\u002F\u002Fdevelopers.expediagroup.com\u002Frapid\u002Flodging\u002Freference\u002Fsignature-authentication\\\" rel=\\\"nofollow\\\">signature authentication reference\u003C\u002Fa>.\\n\\nSet your credentials in the terminal. PowerShell:\\n\\n```powershell\\n$env:RAPID_API_KEY = 'your_api_key'\\n$env:RAPID_SHARED_SECRET = 'your_shared_secret'\\n$env:RAPID_BASE_URL = 'https:\u002F\u002Ftest.ean.com\u002Fv3'\\n```\\n\\nmacOS\u002FLinux Bash:\\n\\n```bash\\nexport RAPID_API_KEY='your_api_key'\\nexport RAPID_SHARED_SECRET='your_shared_secret'\\nexport RAPID_BASE_URL='https:\u002F\u002Ftest.ean.com\u002Fv3'\\n```\\n\\nEdit `SEARCH` in the script with future check-in\u002Fcheck-out dates and your desired occupancy, currency, country code, and language. Keep credentials in environment variables. The API client uses `trust_env=False` so unrelated system proxy settings do not silently change the route.\\n\\nIf you already have a Property ID from your integration, replace `YOUR_PROPERTY_ID` below and run a small request. Otherwise, continue to Step 6 to find hotels by destination.\\n\\n```bash\\npython expedia_hotels.py --api --property-ids YOUR_PROPERTY_ID --limit 1\\n```\\n\\nThis command makes Content and Shopping requests against the selected environment; it does not create a booking. The script defaults to Expedia's test host. For an enabled production integration, change `RAPID_BASE_URL` to `https:\u002F\u002Fapi.ean.com\u002Fv3`. Files are labeled `rapid_test_endpoint` or `rapid_production` so they can be kept separate from local samples.\\n\\nThis workflow uses ordinary endpoint responses, rather than Shopping's canned `test` headers. Expedia's \u003Ca href=\\\"https:\u002F\u002Fdevelopers.expediagroup.com\u002Frapid\u002Flodging\u002Fshopping\u002Frapid-shopping-test-request\\\" rel=\\\"nofollow\\\">test-request guide\u003C\u002Fa> explains that canned responses are static and may reference properties unrelated to the request. Such responses are useful for endpoint checks, but should not be joined to an independently fetched hotel catalog as if they were actual query results.\\n\\n### Step 6: Get hotel IDs from a destination\\n\\nA city name is not a Shopping `property_id`. First find the city's Region ID, then let the script retrieve its hotel IDs. You do not need to collect hotel IDs manually or replace the local JSON sample to run API mode.\\n\\n#### Find the Region ID for a city\\n\\nUse Expedia's \u003Ca href=\\\"https:\u002F\u002Fdevelopers.expediagroup.com\u002Frapid\u002Fapi\u002Fexplorer?locale=en_US\\\" rel=\\\"nofollow\\\">Rapid API Explorer\u003C\u002Fa> or your integration's authenticated API client to make a Geography request. Use the same account, endpoint environment, and signature authentication as in Step 5.\\n\\n![Expedia Rapid API Explorer with Geography Regions selected and include and language request parameters](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002F10-expedia-geography-regions.webp)\\n*In the Lodging API Explorer, open Geography → Regions to configure the destination catalog request.*\\n\\n1. Choose `GET \u002Fv3\u002Fregions`. Set `language=en-US`, `include=standard`, and `country_code` to the destination's two-letter country code. Set `limit=100` to start with a manageable page.\\n2. Send the request. For a US destination, the request path is:\\n\\n   ```text\\n   \u002Fv3\u002Fregions?language=en-US&include=standard&country_code=US&limit=100\\n   ```\\n\\n3. Search the returned region objects for the city's `name`. Check `name_full`, `country_code`, and `type` to distinguish cities with the same name and a city from its wider vicinity. Copy the selected object's `id`—this is the Region ID, not a hotel ID.\\n4. If the city is absent from that page, follow the response's `Link` header URL marked `rel=\\\"next\\\"` without changing its query parameters. Authenticate each request and continue until you find the destination or there is no next page. Searching only the first page does not search the whole catalog. For repeated use, save the region catalog and search it locally by city name and country.\\n\\nThe documented endpoint filters regions by geography; it does not provide a free-text `city=Chicago` search parameter. Start with the country filter, then match names in the returned catalog. If your integration already has a destination-to-Region-ID table, use that instead.\\n\\n#### Retrieve hotels and export their rates\\n\\nReplace `YOUR_REGION_ID` with the ID you selected:\\n\\n```bash\\npython expedia_hotels.py --api --region-id YOUR_REGION_ID --limit 10\\n```\\n\\nFor example, the API specification uses `178309` for Chicago and vicinity:\\n\\n```bash\\npython expedia_hotels.py --api --region-id 178309 --limit 10\\n```\\n\\nThe script calls `GET \u002Fregions\u002F{region_id}` with `include=property_ids`, selects the first 10 hotel IDs, fetches their Content records, and joins the returned Shopping rates with the hotel names. Open `hotels.csv` in the output directory printed by the command. Use `run.json` to confirm the selected IDs and query, and `errors.json` to inspect hotels without an accepted rate. If the region has no mapped properties, choose the appropriate nearby or wider region from the catalog and run it again.\\n\\nThe limit is a request-size cap, not a hotel ranking. `run.json` records both the number of IDs in the region response and the number selected. For larger catalogs, split the remaining IDs into batches of at most 250 and keep the comparison parameters unchanged. Cache permitted hotel details separately from frequently changing rates.\\n\\n### Step 7: Set occupancy and inspect the exported fields\\n\\nEach `occupancy` value describes one room:\\n\\n| Search | Parameter value |\\n|---|---|\\n| Two adults | `2` |\\n| One adult and an eight-year-old child | `1-8` |\\n| Two adults and children aged nine and three | `2-9,3` |\\n\\nFor the last example, set `\\\"occupancy\\\": [\\\"2-9,3\\\"]` in `SEARCH`. The mapper reads the matching occupancy key in the response. It handles one room per search; requesting several rooms requires additional allocation logic rather than just duplicating exported rows.\\n\\nFor price monitoring, compare rows with the same dates, occupancy, rate conditions, currency, and price field. Keep `run.json` with each CSV so you can reconstruct the request.\\n\\n## Which Hotel Price Should You Compare?\\n\\nThe stay total and nightly price answer different questions. Rapid's `totals` object describes the price for an occupancy over the requested stay.\\n\\n| Total | Meaning | Sample amount |\\n|---|---|---:|\\n| `exclusive` | Excludes taxes and fees | 310.00 USD |\\n| `inclusive` | Includes taxes and fees, but excludes property-collected fees such as resort fees and mandatory property taxes\u002Ffees | 342.00 USD |\\n| `property_inclusive` | Includes taxes, fees, and property-collected fees | 350.00 USD |\\n\\nThese definitions come from the `Totals` schema in the \u003Ca href=\\\"https:\u002F\u002Fa.travel-assets.com\u002Fdocumentation-hubs\u002Fprod\u002Frapid\u002Flatest\u002Fen-US\u002Fassets\u002Frapid-3-specs.yaml\\\" rel=\\\"nofollow\\\">Rapid specification\u003C\u002Fa>. The three amounts describe one offer with different inclusions.\\n\\nUse `request_currency` consistently. Property-collected amounts can have a different `billable_currency`, so combining the two can create a false comparison. A missing property-inclusive total stays empty in the export. Before booking, use the appropriate Price Check flow rather than treating an earlier CSV price as a final quote.\\n\\n## When Does an Expedia Scraper Need Proxies?\\n\\n**A proxy is useful when your task depends on the network origin of a website visit.** Examples include checking regional hotel-page displays or keeping search and hotel-detail steps on one exit. An ordinary Rapid integration can use a direct connection: its `country_code` specifies the traveler's point of sale, while `language` selects localized content.\\n\\n| Task | Network\u002Fsession choice | What to hold constant |\\n|---|---|---|\\n| Retrieve Rapid rates for a point of sale | Direct API connection is sufficient unless your network policy requires otherwise | API parameters and credentials |\\n| Compare permitted website displays across countries | A country-targeted proxy for each test group | Dates, guests, currency, locale, and account state |\\n| Search, then inspect a hotel in the same flow | One sticky session and the same browser context | Exit, cookies, and search parameters |\\n| Run unrelated, stateless checks | Separate sessions; rotation only between independent jobs | Request limits and comparison conditions |\\n\\nFor regional website checks, Rola IP's [travel fare proxy options](https:\u002F\u002Frola-ip.co\u002Ftravel-fare-use-case\u002F) provide a relevant starting point. Use a small test group before expanding to more properties. Changing an IP does not repair API credentials, product access, or a mismatched query.\\n\\n### Configure a Rola IP session for a regional check\\n\\nIn the Rola dashboard, select the proxy country, optional state\u002Fcity, session duration, and authentication method before copying the generated configuration.\\n\\n\\n![Rola IP dashboard showing United States and Alaska targeting, a 10-minute sticky session setting, and username-password authentication](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002F11-rola-session-setup-redacted.webp)\\n\\n*The dashboard example selects a US exit in Alaska and a 10-minute session.*\\n\\nStart with the gateway and credentials generated for your Rola account. The current [proxy parameter reference](https:\u002F\u002Fdoc.rola-ip.co\u002Fguide\u002Fproxy-networks\u002Fparameters.html) places the session ID after an underscore in the account name. For rotating residential accounts, its example pattern is:\\n\\n```text\\nACCOUNT_hotel01-country-us-sessiontime-10\\n```\\n\\nHere `hotel01` identifies the session, `country-us` requests a US exit, and `sessiontime-10` requests a 10-minute session. Keep the same username across related requests. Session persistence is a request to retain the exit, so verify it during your workflow rather than treating it as a guarantee.\\n\\nRola's parameter documentation specifies session durations of 1–120 minutes. Country targeting is available across its rotating residential, rotating datacenter, and mobile networks; state\u002Fcity parameters are specific to rotating residential. Use the exact account marker and gateway from your dashboard for the selected network.\\n\\nFor unrelated jobs that need a new exit on each request, the documented residential pattern is `ACCOUNT-country-us-f-1`. Avoid per-request rotation between a search and its detail view. The guide to [sticky vs rotating proxies](https:\u002F\u002Frola-ip.co\u002Fblog\u002Fsticky-vs-rotating-proxies\u002F) explains when each session model fits.\\n\\n### Verify the route with HTTPX\\n\\nSet three variables using values from the dashboard. `ROLA_PROXY_USERNAME` should contain the full parameterized username, not just the base account name.\\n\\nPowerShell:\\n\\n```powershell\\n$env:ROLA_PROXY_SERVER = 'http:\u002F\u002FYOUR_GATEWAY:YOUR_HTTP_PORT'\\n$env:ROLA_PROXY_USERNAME = 'ACCOUNT_hotel01-country-us-sessiontime-10'\\n$env:ROLA_PROXY_PASSWORD = 'your_proxy_password'\\n```\\n\\nmacOS\u002FLinux Bash:\\n\\n```bash\\nexport ROLA_PROXY_SERVER='http:\u002F\u002FYOUR_GATEWAY:YOUR_HTTP_PORT'\\nexport ROLA_PROXY_USERNAME='ACCOUNT_hotel01-country-us-sessiontime-10'\\nexport ROLA_PROXY_PASSWORD='your_proxy_password'\\n```\\n\\nSave the following as `check_rola.py`. It uses HTTPX's `proxy=` argument and keeps the password out of the proxy URL and printed output. This configuration follows the \u003Ca href=\\\"https:\u002F\u002Fwww.python-httpx.org\u002Fadvanced\u002Fproxies\u002F\\\" rel=\\\"nofollow\\\">HTTPX proxy documentation\u003C\u002Fa>; an HTTP proxy can tunnel HTTPS requests while retaining an `http:\u002F\u002F` gateway URL.\\n\\n```python\\nimport ipaddress\\nimport os\\nimport sys\\n\\nimport httpx\\n\\n\\ndef check_route():\\n    proxy = httpx.Proxy(\\n        os.environ[\\\"ROLA_PROXY_SERVER\\\"],\\n        auth=(os.environ[\\\"ROLA_PROXY_USERNAME\\\"], os.environ[\\\"ROLA_PROXY_PASSWORD\\\"]),\\n    )\\n    exits = []\\n    with httpx.Client(proxy=proxy, timeout=15, trust_env=False) as client:\\n        for _ in range(2):\\n            response = client.get(\\\"https:\u002F\u002Fapi.ipify.org?format=json\\\")\\n            response.raise_for_status()\\n            exits.append(str(ipaddress.ip_address(response.json()[\\\"ip\\\"])))\\n    print(f\\\"Exit IP: {exits[0]}\\\")\\n    if exits[0] != exits[1]:\\n        raise RuntimeError(\\\"exit changed between checks\\\")\\n    print(\\\"Same exit observed in two requests.\\\")\\n    return exits[0]\\n\\n\\nif __name__ == \\\"__main__\\\":\\n    try:\\n        check_route()\\n    except (httpx.HTTPError, KeyError, ValueError, RuntimeError) as exc:\\n        # Do not expose proxy credentials in exception output.\\n        print(f\\\"Route check failed ({type(exc).__name__}). Check gateway, credentials, and session settings.\\\")\\n        sys.exit(1)\\n```\\n\\nRun:\\n\\n```bash\\npython check_rola.py\\n```\\n\\nA successful check prints the exit IP and confirms that two requests observed the same address. Use an IP geolocation lookup to confirm the requested country, then record the exit and check time with your regional test. Two matching requests verify that brief observation; longer flows should also check the exit at the end.\\n\\nThis check verifies network routing. Use the same gateway, full username, and session settings in your permitted collection client, and keep browser cookies within the same context. Keep this website experiment separate from the direct Rapid script so you can tell whether a difference comes from API parameters or network origin.\\n\\n### Start with a measurable regional pilot\\n\\nUse two country groups, a small fixed property list, one room setup, and identical dates. Within each group, retain one session for each search\u002Fdetail sequence. Record:\\n\\n- Country requested and observed exit location.\\n- Dates, occupancy, currency, language, and account\u002Flogin state.\\n- Price field, refundability, fees, and capture time.\\n- Valid records, errors, retry count, and billed traffic from your usage records.\\n\\nCalculate **traffic per valid record = billed traffic ÷ valid records**. Estimate the next batch as **traffic per valid record × planned records**, then apply your account's billing unit and current rate. Stop when a batch reaches the budget or error threshold you set before the run. API calls, browser resources, and retries can have very different traffic costs, so measure your own workflow.\\n\\nReady to compare regional hotel displays? Choose a Rola IP country\u002Fsession setup, run the route check, and collect one small group before scaling. When you have a measured traffic estimate, compare it with the current [residential proxy pricing](https:\u002F\u002Frola-ip.co\u002Fglobal-residential-ip-pricing\u002F) and account billing terms. Keep the configuration only if it meets your location, session, data-quality, and cost requirements.\\n\\n## Troubleshooting Missing Expedia Data and Request Errors\\n\\n| Symptom | Check first | Fix and retest |\\n|---|---|---|\\n| Rapid 401\u002F403 | Key, signature timestamp, endpoint, product permissions | Correct the failing condition; repeat one small request |\\n| Proxy 407 | Gateway authentication and full parameterized username | Correct proxy credentials; rerun the route check |\\n| 429 | `Retry-After` and account request limits | Pause for the specified interval before a later retry; reduce concurrency |\\n| Timeout or connection error | Whether failure occurs on direct Rapid access or the proxy route | Test each layer separately; keep bounded timeouts |\\n| Zero CSV rows | `errors.json`, occupancy key, Content names, and rate status | Fix the specific mapper\u002Finput issue or select different inventory |\\n| Different prices | Dates, guests, currency, fees, refundability, point of sale, and session | Repeat with equivalent conditions, changing one variable at a time |\\n| Unexpected exit change | Session username, duration, and use of `-f-1` | Keep the same session settings through the related steps and verify again |\\n\\nThe API example stops on request failure instead of retrying invisibly. For scheduled jobs, use a small retry budget for transient connection\u002F5xx failures and honor `Retry-After` on 429. Do not loop on authentication failures.\\n\\nTo check record isolation locally, temporarily replace the sample's available hotel's `rooms` array with `1`. The result should be zero valid rates and two issues. Restore the sample afterwards. Missing IDs, non-finite amounts such as `NaN`, and inconsistent price totals also go into the error file.\\n\\n## Put the Hotel Data to Work\\n\\nStart with the local sample, inspect the hotel-name and rate join, then run one small Rapid batch for your own dates. Keep the completed-run manifest and errors with the CSV so every comparison has an explainable input and outcome.\\n\\nFor regional website checks, add Rola IP at the network layer: choose the country, retain a session through related steps, verify the exit, and measure traffic per valid record. That gives you a practical basis for expanding collection without confusing network settings, search parameters, and price differences.\\n\\n\\n## FAQ\\n\\n### Can I scrape Expedia without a Rapid API key?\\n\\nYou can run this tutorial's local sample without a key. Fetching Geography, Content, and Shopping data requires a Rapid account with the relevant products enabled. If you need page content instead, use a browser workflow within your access agreement; the API script does not parse Expedia's consumer pages.\\n\\n### How do I scrape Expedia hotel names and prices together?\\n\\nGet Property IDs from a region or your hotel catalog, retrieve names from Property Content, then request rates from Shopping. Join the two responses on `property_id`. The code above performs that join and exports one row per accepted rate, with dates, occupancy, currency, and refundability attached.\\n\\n### Can I enter a city name instead of a Property ID?\\n\\nYes, you can start with a city name, but Shopping itself accepts Property IDs. Follow Step 6: request the Geography catalog for the destination country, match the city's name and full location across its pages, then copy its Region ID into `--region-id`. The script retrieves the mapped hotel IDs and requests their names and rates. Check whether the selected region represents the city itself or a wider vicinity before comparing the hotel set.\\n\\n### Does a US proxy make Rapid return US prices?\\n\\nRapid's `country_code` represents the traveler's point of sale; `language` controls localized content. A US network exit is a separate setting and should not be used as a substitute for these request parameters. For website research, keep origin, cookies, dates, guests, locale, and currency recorded so regional comparisons are interpretable.\\n\\n### Should I rotate the IP for every hotel request?\\n\\nKeep one session for related search and hotel-detail steps. Per-request rotation fits independent, stateless jobs that do not rely on a shared session. With Rola IP, use the documented session username for continuity and `-f-1` for per-request rotation, choosing the behavior before you start the test.\\n\\n### Why are some properties missing from the CSV?\\n\\nUnavailable properties and invalid rates are recorded in `errors.json`. A missing Content name, malformed ID, currency mismatch, or absent occupancy total also prevents a valid export row. Check `run.json` for the selected property count: API mode samples up to 10 IDs by default rather than automatically processing the whole destination.\\n\\n### How often should I refresh hotel prices?\\n\\nUse the refresh interval allowed by your integration and required by your analysis. Cache permitted static hotel content separately from rate responses, retain the query with each export, and use Price Check before booking. For comparisons over time, preserve the same dates, occupancy, currency, and price field.\\n\\n\"},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}",{"items":34,"inline":56},[35,38,41,44,47,50,53],{"title":36,"desc":37},"Can I scrape Expedia without a Rapid API key?","\u003Cp>You can run this tutorial’s local sample without a key. Fetching Geography, Content, and Shopping data requires a Rapid account with the relevant products enabled. If you need page content instead, use a browser workflow within your access agreement; the API script does not parse Expedia’s consumer pages.\u003C\u002Fp>",{"title":39,"desc":40},"How do I scrape Expedia hotel names and prices together?","\u003Cp>Get Property IDs from a region or your hotel catalog, retrieve names from Property Content, then request rates from Shopping. Join the two responses on \u003Ccode>property_id\u003C\u002Fcode>. The code above performs that join and exports one row per accepted rate, with dates, occupancy, currency, and refundability attached.\u003C\u002Fp>",{"title":42,"desc":43},"Can I enter a city name instead of a Property ID?","\u003Cp>Yes, you can start with a city name, but Shopping itself accepts Property IDs. Follow Step 6: request the Geography catalog for the destination country, match the city’s name and full location across its pages, then copy its Region ID into \u003Ccode>--region-id\u003C\u002Fcode>. The script retrieves the mapped hotel IDs and requests their names and rates. Check whether the selected region represents the city itself or a wider vicinity before comparing the hotel set.\u003C\u002Fp>",{"title":45,"desc":46},"Does a US proxy make Rapid return US prices?","\u003Cp>Rapid’s \u003Ccode>country_code\u003C\u002Fcode> represents the traveler’s point of sale; \u003Ccode>language\u003C\u002Fcode> controls localized content. A US network exit is a separate setting and should not be used as a substitute for these request parameters. For website research, keep origin, cookies, dates, guests, locale, and currency recorded so regional comparisons are interpretable.\u003C\u002Fp>",{"title":48,"desc":49},"Should I rotate the IP for every hotel request?","\u003Cp>Keep one session for related search and hotel-detail steps. Per-request rotation fits independent, stateless jobs that do not rely on a shared session. With Rola IP, use the documented session username for continuity and \u003Ccode>-f-1\u003C\u002Fcode> for per-request rotation, choosing the behavior before you start the test.\u003C\u002Fp>",{"title":51,"desc":52},"Why are some properties missing from the CSV?","\u003Cp>Unavailable properties and invalid rates are recorded in \u003Ccode>errors.json\u003C\u002Fcode>. A missing Content name, malformed ID, currency mismatch, or absent occupancy total also prevents a valid export row. Check \u003Ccode>run.json\u003C\u002Fcode> for the selected property count: API mode samples up to 10 IDs by default rather than automatically processing the whole destination.\u003C\u002Fp>",{"title":54,"desc":55},"How often should I refresh hotel prices?","\u003Cp>Use the refresh interval allowed by your integration and required by your analysis. Cache permitted static hotel content separately from rate responses, retain the query with each export, and use Price Check before booking. For comparisons over time, preserve the same dates, occupancy, currency, and price field.\u003C\u002Fp>",true,{"@context":58,"@type":59,"@id":60,"mainEntity":61},"https:\u002F\u002Fschema.org","FAQPage","https:\u002F\u002Frola-ip.co\u002Fblog\u002Fweb-scraping-expedia\u002F#faq",[62,67,70,73,76,79,82],{"@type":63,"name":36,"acceptedAnswer":64},"Question",{"@type":65,"text":66},"Answer","You can run this tutorial’s local sample without a key. Fetching Geography, Content, and Shopping data requires a Rapid account with the relevant products enabled. If you need page content instead, use a browser workflow within your access agreement; the API script does not parse Expedia’s consumer pages.",{"@type":63,"name":39,"acceptedAnswer":68},{"@type":65,"text":69},"Get Property IDs from a region or your hotel catalog, retrieve names from Property Content, then request rates from Shopping. Join the two responses on property_id. The code above performs that join and exports one row per accepted rate, with dates, occupancy, currency, and refundability attached.",{"@type":63,"name":42,"acceptedAnswer":71},{"@type":65,"text":72},"Yes, you can start with a city name, but Shopping itself accepts Property IDs. Follow Step 6: request the Geography catalog for the destination country, match the city’s name and full location across its pages, then copy its Region ID into --region-id. The script retrieves the mapped hotel IDs and requests their names and rates. Check whether the selected region represents the city itself or a wider vicinity before comparing the hotel set.",{"@type":63,"name":45,"acceptedAnswer":74},{"@type":65,"text":75},"Rapid’s country_code represents the traveler’s point of sale; language controls localized content. A US network exit is a separate setting and should not be used as a substitute for these request parameters. For website research, keep origin, cookies, dates, guests, locale, and currency recorded so regional comparisons are interpretable.",{"@type":63,"name":48,"acceptedAnswer":77},{"@type":65,"text":78},"Keep one session for related search and hotel-detail steps. Per-request rotation fits independent, stateless jobs that do not rely on a shared session. With Rola IP, use the documented session username for continuity and -f-1 for per-request rotation, choosing the behavior before you start the test.",{"@type":63,"name":51,"acceptedAnswer":80},{"@type":65,"text":81},"Unavailable properties and invalid rates are recorded in errors.json. A missing Content name, malformed ID, currency mismatch, or absent occupancy total also prevents a valid export row. Check run.json for the selected property count: API mode samples up to 10 IDs by default rather than automatically processing the whole destination.",{"@type":63,"name":54,"acceptedAnswer":83},{"@type":65,"text":84},"Use the refresh interval allowed by your integration and required by your analysis. Cache permitted static hotel content separately from rate responses, retain the query with each export, and use Price Check before booking. For comparisons over time, preserve the same dates, occupancy, currency, and price field.","{\"@context\":\"https:\u002F\u002Fschema.org\",\"@type\":\"FAQPage\",\"@id\":\"https:\u002F\u002Frola-ip.co\u002Fblog\u002Fweb-scraping-expedia\u002F#faq\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"Can I scrape Expedia without a Rapid API key?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"You can run this tutorial’s local sample without a key. Fetching Geography, Content, and Shopping data requires a Rapid account with the relevant products enabled. If you need page content instead, use a browser workflow within your access agreement; the API script does not parse Expedia’s consumer pages.\"}},{\"@type\":\"Question\",\"name\":\"How do I scrape Expedia hotel names and prices together?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Get Property IDs from a region or your hotel catalog, retrieve names from Property Content, then request rates from Shopping. Join the two responses on property_id. The code above performs that join and exports one row per accepted rate, with dates, occupancy, currency, and refundability attached.\"}},{\"@type\":\"Question\",\"name\":\"Can I enter a city name instead of a Property ID?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes, you can start with a city name, but Shopping itself accepts Property IDs. Follow Step 6: request the Geography catalog for the destination country, match the city’s name and full location across its pages, then copy its Region ID into --region-id. The script retrieves the mapped hotel IDs and requests their names and rates. Check whether the selected region represents the city itself or a wider vicinity before comparing the hotel set.\"}},{\"@type\":\"Question\",\"name\":\"Does a US proxy make Rapid return US prices?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Rapid’s country_code represents the traveler’s point of sale; language controls localized content. A US network exit is a separate setting and should not be used as a substitute for these request parameters. For website research, keep origin, cookies, dates, guests, locale, and currency recorded so regional comparisons are interpretable.\"}},{\"@type\":\"Question\",\"name\":\"Should I rotate the IP for every hotel request?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Keep one session for related search and hotel-detail steps. Per-request rotation fits independent, stateless jobs that do not rely on a shared session. With Rola IP, use the documented session username for continuity and -f-1 for per-request rotation, choosing the behavior before you start the test.\"}},{\"@type\":\"Question\",\"name\":\"Why are some properties missing from the CSV?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Unavailable properties and invalid rates are recorded in errors.json. A missing Content name, malformed ID, currency mismatch, or absent occupancy total also prevents a valid export row. Check run.json for the selected property count: API mode samples up to 10 IDs by default rather than automatically processing the whole destination.\"}},{\"@type\":\"Question\",\"name\":\"How often should I refresh hotel prices?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Use the refresh interval allowed by your integration and required by your analysis. Cache permitted static hotel content separately from rate responses, retain the query with each export, and use Price Check before booking. For comparisons over time, preserve the same dates, occupancy, currency, and price field.\"}}]}",[87,88],"\u002Fblog\u002Fweb-scraping-expedia\u002F","\u002Fzh\u002Fblog\u002Fweb-scraping-expedia\u002F",{"prev":90,"next":101,"related":112,"popular":146,"latest":212},{"id":91,"title":92,"slug":93,"feature_image":94,"published_at":95,"twitter_title":96,"primary_tag":97,"tags":98},"6ad1e7f94956c90001bf18ff","Facebook Page Scraper: How to Scrape Facebook Pages in 2026","facebook-page-scraper","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002FFacebook-Page-Scraper-Guide-to-Page-Details-and-Proxies.webp","2026-10-16T09:08:47.000Z","how to scrape facebook pages",{"name":20,"slug":20},[99,100],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":102,"title":103,"slug":104,"feature_image":105,"published_at":106,"twitter_title":107,"primary_tag":108,"tags":109},"6ad0710c4956c90001bf180a","Walmart Inventory Checker: How to Check Stock Online by Store","walmart-inventory-checker","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002Fwalmart-inventory-checker.webp","2026-10-15T06:37:24.000Z","walmart inventory checker",{"name":20,"slug":20},[110,111],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},[113,124,135],{"id":114,"title":115,"slug":116,"feature_image":117,"published_at":118,"twitter_title":119,"primary_tag":120,"tags":121},"6b0d3e4b92ab700001dc0a73","Scrape Indeed Jobs with Python: Extract Job Fields and Export to CSV","scrape-indeed-jobs","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FScrape-Indeed-Jobs.webp","2026-11-30T09:37:05.000Z","indeed job scraper",{"name":20,"slug":20},[122,123],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":125,"title":126,"slug":127,"feature_image":128,"published_at":129,"twitter_title":130,"primary_tag":131,"tags":132},"6b0d2bcb92ab700001dc0a12","Node.js HTTP Proxy Tutorial: Send HTTPS Requests with Rola IP and Verify the Exit IP","node-js-http-proxy","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FNode.js-HTTP-Proxy-Tutorial_-Send-HTTPS-Requests-with-Rola-IP-and-Verify-the-Exit-IP.webp","2026-11-30T07:58:57.000Z","node js http proxy",{"name":20,"slug":20},[133,134],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":136,"title":137,"slug":138,"feature_image":139,"published_at":140,"twitter_title":141,"primary_tag":142,"tags":143},"6b09485d92ab700001dc0953","How to Set Up Chrome DevTools MCP for Multi-Region Geo-Testing with Residential Proxies","chrome-devtools-mcp-proxy-setup","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002Fchrome-devtools-mcp-proxy-setup.webp","2026-11-27T09:22:44.000Z","chrome-devtools-mcp proxy setup",{"name":20,"slug":20},[144,145],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},[147,162,174,186,198],{"id":148,"title":149,"slug":150,"feature_image":151,"published_at":152,"twitter_title":153,"primary_tag":154,"tags":155},"6aa1292f4956c90001bef44e","ProxySite.com Review (2026): Is It Safe? 5 Best Alternatives","proxysite-review-alternatives","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F09\u002FProxySite-Review-and--Alternatives-article-cover-image.webp","2026-09-09T10:16:50.000Z","proxysite",{"name":20,"slug":20},[156,157,160],{"name":20,"slug":20,"visibility":21},{"name":158,"slug":159,"visibility":21},"对比选型","comparisons",{"name":161,"slug":161,"visibility":21},"hot",{"id":163,"title":164,"slug":165,"feature_image":166,"published_at":167,"twitter_title":168,"primary_tag":169,"tags":170},"6a978f9a4956c90001bee8bb","BlockAway Alternatives: 6 Best Options (2026)","blockaway-alternatives","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F09\u002FBlockAway-Alternatives-article-cover-image.webp","2026-09-02T03:14:08.000Z","blockaway alternative",{"name":20,"slug":20},[171,172,173],{"name":20,"slug":20,"visibility":21},{"name":158,"slug":159,"visibility":21},{"name":161,"slug":161,"visibility":21},{"id":175,"title":176,"slug":177,"feature_image":178,"published_at":179,"twitter_title":180,"primary_tag":181,"tags":182},"6a912ce84956c90001bee35d","HTTPX vs Requests vs aiohttp: Features, Performance, and Python Use Cases","httpx-vs-requests-vs-aiohttp","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F08\u002FHTTPX-vs-Requests-vs-aiohttp-article-cover-image.webp","2026-08-28T07:27:34.000Z","httpx vs requests",{"name":20,"slug":20},[183,184,185],{"name":20,"slug":20,"visibility":21},{"name":158,"slug":159,"visibility":21},{"name":161,"slug":161,"visibility":21},{"id":187,"title":188,"slug":189,"feature_image":190,"published_at":191,"twitter_title":192,"primary_tag":193,"tags":194},"6a90fcea4956c90001bee256","8 Best Germany Proxies in 2026: Provider Comparison","best-germany-proxies","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F08\u002FBest-Germany-Proxies-article-cover-image.webp","2026-08-28T03:40:55.000Z","germany proxy",{"name":20,"slug":20},[195,196,197],{"name":20,"slug":20,"visibility":21},{"name":158,"slug":159,"visibility":21},{"name":161,"slug":161,"visibility":21},{"id":199,"title":200,"slug":201,"feature_image":202,"published_at":203,"twitter_title":204,"primary_tag":205,"tags":206},"6a8e92664956c90001beddc2","Bing Rank Tracker: Reliable Local SERP Monitoring Guide","bing-rank-tracker","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F08\u002F-------16.webp","2026-08-26T07:42:04.000Z","bing rank checker",{"name":20,"slug":20},[207,208,211],{"name":20,"slug":20,"visibility":21},{"name":209,"slug":210,"visibility":21},"应用场景","use-cases",{"name":161,"slug":161,"visibility":21},[213,226,237,248,259],{"id":214,"title":215,"slug":216,"feature_image":217,"published_at":218,"twitter_title":219,"primary_tag":220,"tags":221},"6b0946f492ab700001dc0920","Best Rotating Proxies in 2026 7 Rotating Proxy Providers Compared","best-rotating-proxies","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FBest-Rotating-Proxies-in-2026-7-Rotating-Proxy-Providers-Compared.webp","2026-11-27T09:07:09.000Z","best rotating proxies",{"name":20,"slug":20},[222,223],{"name":20,"slug":20,"visibility":21},{"name":224,"slug":225,"visibility":21},"排行榜","top-picks",{"id":227,"title":228,"slug":229,"feature_image":230,"published_at":231,"twitter_title":232,"primary_tag":233,"tags":234},"6b07a50492ab700001dc0603","How to Configure an NGINX Docker Reverse Proxy with Rola IP Egress","nginx-docker-reverse-proxy","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FHow-to-Configure-an-NGINX-Docker-Reverse-Proxy-with-Rola-IP-Egress-1.webp","2026-11-26T03:21:51.000Z","nginx docker reverse proxy",{"name":20,"slug":20},[235,236],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":238,"title":239,"slug":240,"feature_image":241,"published_at":242,"twitter_title":243,"primary_tag":244,"tags":245},"6b079b8692ab700001dc05ce","Android Proxy Settings for Mobile Network: The No-Root Guide (2026)","android-proxy-settings-mobile-network","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FAndroid-Proxy-Settings-for-Mobile-Network_-The-No-Root-Guide--2026-.webp","2026-11-26T03:10:40.000Z","android proxy settings mobile network",{"name":20,"slug":20},[246,247],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":249,"title":250,"slug":251,"feature_image":252,"published_at":253,"twitter_title":254,"primary_tag":255,"tags":256},"6b0655a092ab700001dc0440","Rammerhead Proxy: Setup, HTTP Upstreams and Alternatives","rammerhead-alternatives","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002Frammerhead-alternatives.webp","2026-11-25T03:59:48.000Z","Rammerhead Proxy",{"name":20,"slug":20},[257,258],{"name":20,"slug":20,"visibility":21},{"name":158,"slug":159,"visibility":21},{"id":260,"title":261,"slug":262,"feature_image":263,"published_at":264,"twitter_title":265,"primary_tag":266,"tags":267},"6b05417f92ab700001dc034d","ProxyEmpire Review (2026): Our Best Alternative for Predictable Bulk Residential Use","proxyempire-review","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FProxyEmpire-Review--2026-_-Our-Best-Alternative-for-Predictable-Bulk-Residential-Use.webp","2026-11-24T08:12:53.000Z","proxyempire review",{"name":20,"slug":20},[268,269],{"name":20,"slug":20,"visibility":21},{"name":158,"slug":159,"visibility":21}]