Scraping many pages one at a time wastes time and money. A bulk job sends many targets in one call. Before you run it, you can ask what it will cost.
This is how the bulk flow works in the LogPose API. The pattern is useful for any metered API.
Step 1: estimate
The estimate call takes the same body as the real submit. It does not run anything, and it is free.
curl -X POST "https://api.logposervices.com/api/v1/ecommerce/ebay/search/bulk/estimate" \ -H "Authorization: Bearer $LOGPOSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "targets": [ {"url": "https://www.ebay.com/sch/i.html?_nkw=iphone+15", "pages": 2}, {"url": "https://www.ebay.com/sch/i.html?_nkw=pixel+8", "pages": [1, 3]} ], "default_pages": 1 }' Each target has a URL and a page count. pages can be a number or a list of page numbers. default_pages applies to targets that do not set their own.
The response lists a total and a line per target:
{ "total_credits": 0, "total_targets": 2, "per_target": [ {"url": "...", "pages": 2, "base_cost": 0, "per_page": 0, "total": 0} ] } The numbers above are the shape from the docs. Your real response has your prices.
Step 2: submit
Send the same body to the same path without /estimate:
curl -X POST "https://api.logposervices.com/api/v1/ecommerce/ebay/search/bulk" \ -H "Authorization: Bearer $LOGPOSE_API_KEY" \ -H "Content-Type: application/json" \ -d @targets.json You get back a bulk_id, a list of child_job_ids (one per target), the credits charged, and two URLs: one for status and one to cancel.
Step 3: track the batch
import os, requests BASE = "https://api.logposervices.com/api/v1" H = {"Authorization": f"Bearer {os.environ['LOGPOSE_API_KEY']}"} def estimate(body, path): r = requests.post(f"{BASE}/{path}/bulk/estimate", json=body, headers=H, timeout=30) r.raise_for_status() return r.json() def submit(body, path): r = requests.post(f"{BASE}/{path}/bulk", json=body, headers=H, timeout=30) r.raise_for_status() return r.json() body = {"targets": [{"url": u, "pages": 2} for u in urls]} quote = estimate(body, "ecommerce/ebay/search") print(quote["total_credits"], "credits for", quote["total_targets"], "targets") if quote["total_credits"] <= 500: batch = submit(body, "ecommerce/ebay/search") print(batch["bulk_id"], batch["child_job_ids"]) The budget check is the point. Your script decides before any credit is spent.
Why split it up
- A bad list costs you nothing. You see a total of 5,000 credits when you expected 50, and you stop.
- Each target is its own job. If one fails, the others still finish.
- The same pattern repeats on every bulk endpoint, so you write the helpers once.
Each child job then follows the usual submit-and-poll path. The status URL in the response gives you the state of the whole batch.
Docs
The full list of bulk and estimate endpoints, with parameters for pages, proxies and cookies, is in the LogPose API docs.
